Skip to content
Kokumi

CLI and agent skills

Live

The kokumi Rust binary emits strict JSON envelopes on stdout, isolates visitor-written strings from prompt injection, and ships built-in skills for coding agents. Run it yourself or hand it to an assistant with least-privilege guardrails.

15 live commands in cli/: JSON envelopes, read and onboarding skills, cost guards.

Prompt-injection boundaries and deterministic exit codes

Every visitor-controlled path and referrer is NFKC-normalized, stripped of control and bidi characters, capped at 120 characters, and wrapped as {"untrusted": "..."}. Bearer tokens are stored in a chmod 600 config and never print to stdout or stderr.

  • Exit 0 (ok), 1 (error), 2 (bad_usage) before any network call.
  • Exit 3 (health_alert) on quiet beacons, write drops, or canary drift.
  • Exit 4 (auth) on missing or wrong-scope tokens; exit 5 (limit) on rate or free-plan quota caps.
sh
kokumi moved --since 7d --budget 2k

Two self-generated agent skills, ending in least-privilege handover

Print a read-only skill for daily check-ins or a full onboarding skill for guided setup directly from the binary. Onboarding ends with kokumi handover, which drops the local write_token and proves the Worker now returns 403 on writes.

  • kokumi describe --format json prints the live command and flag contract.
  • kokumi describe --format skill outputs read-only daily heartbeat instructions.
  • kokumi describe --format onboarding-skill guides init, deploy, verify, and kokumi handover.
sh
kokumi describe --format skill

One binary from setup to daily queries

Use the same CLI to initialize site config, generate framework snippets, verify live hits, import history, add goals, and inspect AI crawler traffic. Mutating commands support --dry-run so you can inspect payloads before touching production.

  • Setup and ops: init, deploy, snippet, verify, handover, health, privacy.
  • Reporting and writes: moved, post <slug>, agents --cited, goal add, import, digest on.
sh
kokumi init --site main --url https://example.com --token "<READ_TOKEN>"
kokumi health --site main