Skip to main content
Reference · Information

CLI commands

Every MCP tool has a CLI equivalent for shell use: senkani exec, senkani search, senkani fetch, senkani bench, senkani kb, senkani learn. Scriptable, pipeable, CI-friendly.

Command
What it does
Status
senkani exec
Run a command with the filter pipeline applied to output. Mutating commands pass through unchanged.
Live
senkani search
Symbol lookup from the tree-sitter index.
Live
senkani fetch
Read a symbol's source lines by name.
Live
senkani explore
Navigate the codebase via the import graph from an entry point.
Live
senkani index
Build or update the symbol index manually.
Live
senkani validate
Local syntax validation across 25 languages. Zero API calls.
Live
senkani stats
Lifetime metrics from the session database. FTS5 search over tool output history.
Live
senkani export
JSONL dump of sessions + commands + token_events. GDPR-adjacent data portability.
Live
senkani wipe
Destructive: delete session DB + socket-auth token.
Live
senkani bench
Run the benchmark suite: 10 tasks × 7 configs. Plus bench pii: headless PII-classifier cold/warm/shape bench (stub backend, no model load).
Live
senkani init
Register Senkani's hooks for the current project. Idempotent.
Live
senkani doctor
Diagnose and optionally repair hook registration, binary paths, grammar versions, config.
Live
senkani compare
Diff two files or git revisions through the filter pipeline.
Live
senkani grammars
Show installed tree-sitter grammar versions.
Live
senkani schedule
Schedule recurring commands via launchd.
Live
senkani uninstall
Clean removal of all senkani config, hooks, and MCP entries.
Live
senkani kb
Query and manage the project knowledge base.
Live
senkani eval
Quality gates: bench savings + KB health + regression detection.
Live
senkani ml-eval
Per-tier Gemma 4 output quality eval — drives the 20-task harness against each installed tier and writes ~/.senkani/ml-tier-eval.json.
Live
senkani learn
Compound learning CLI — review staged proposals, accept/reject, audit.
Live
senkani authorship
Bulk-tag legacy KB rows whose authorship column is NULL. Operator-triggered; never automatic.
Live
senkani skill
Lint and export HandManifest skill packages. Round-trips one canonical manifest into Claude Code, Cursor, Codex, OpenCode, or Senkani output.
Live
senkani pack
Install, uninstall, and list SkillPacks (multi-skill bundles + HookRouter policy fragment + context doc). Collision-diff on install; chained provenance via pack_audits.
Live
senkani models
List, pull, or verify Senkani's local ML models (vision, embeddings, Layer-3 PII classifier). Operator-explicit pulls; no auto-download.
Live
senkani onboarding milestones
Read-only verification surface for ~/.senkani/onboarding/milestones.json. Prints the live SENKANI_ONBOARDING_MILESTONES gate state, resolved path, file's JSON, and a derived summary.allComplete line — bypasses the env gate on reads so =off still surfaces on-disk truth.
Live
senkani walk rebuild-bundle
Rebuild SenkaniApp from current HEAD and refresh the wrapped .app bundle under tools/soak/runner/: swift build --product SenkaniApp → copy debug binary into Contents/MacOS/SenkaniApp → ad-hoc codesign --force --sign -lsregister -f. Shared callable form used by senkani doctor check #20 and the walk-runner .command scripts (eliminating the inline rebuild dance). Fast swift build path — fine for the soak runner, which never exercises the crashing Bundle.module access.
Live
senkani walk rebuild-bundle-xcodebuild
GUI-Cowork-walk path. Builds SenkaniApp via xcodebuild -scheme SenkaniApp -destination 'platform=macOS' -configuration Debug build (NOT swift build), locates the product (build-log Ld parse → DerivedData glob fallback), then wraps it into an open-launchable .app: copy exe into Contents/MacOS/ → dynamically discover & copy every *.bundle resource into Contents/Resources/ → ad-hoc codesign --force --deep --sign -lsregister -f. Only the xcodebuild product resolves Bundle.module correctly under an open-launch; a swift build-wrapped bundle crash-loops. Distinct from rebuild-bundle by design — the fast path and senkani doctor auto-rebuild stay untouched.
Live
senkani monitor
Read-only operator dashboard in the terminal — a live view over the session database (no mutations). --tui enters the interactive event loop (raw mode; q quit, j/k cursor nav, r refresh, / filter) and restores cooked mode on exit, including the SIGINT/SIGTERM paths. --single-frame prints a single ANSI render and exits — useful for scripts and snapshot tests. --app-version <string> sets the version shown in the header bar (default 0.4.0). --poll-interval=<Duration> sets the TUI refresh cadence with an ms/s/m/h suffix (e.g. 500ms, 5s, 30s, 5m) — default 5s, must be ≥ 1s (anything below is rejected with --poll-interval must be ≥ 1s), no upper bound. After the first paint each tick repaints only the changed cells (RenderFrame.diff delta painting), keeping steady-state updates byte-cheap over a remote/SSH session. Plain senkani monitor (no flag) prints use --tui and exits 0.
Live