CLI Reference
terso emit
Compile AGENTS.md into per-agent config files at the project root.
terso emit
terso emit --check # CI gate — fail if any file would change
terso emit --dry-run # preview without writing
terso emit --watch # re-emit on every save of AGENTS.md
terso emit --targets claude,cursor
terso emit --force # overwrite files that aren't marked as terso-generated
terso emit --prune # delete generated files for targets no longer active
Flags:
--targets <list>— comma-separated subset:claude,cursor,copilot--check— exit non-zero if any target file would change. Use in CI. Reports drift, never write verbs.--dry-run— show what would change without writing--force— overwrite existing files even if not marked as generated by terso--watch— re-emit on every save ofAGENTS.md--prune— delete terso-generated files for targets no longer active (marker-stamped only — never hand-written files)
Target selection, in order: an explicit --targets flag; otherwise the targets list pinned in .terso/project.json at terso init time; otherwise auto-detection from presence hints (.cursor/, CLAUDE.md, .github/). When detection falls back to a partial set, emit prints a note naming the skipped targets, so a teammate's missing .cursor/ can't silently drop Cursor from the output. On a fresh repo with no hints, it writes all three.
emit works without Omnus — it's pure local file compilation.
terso init
Initialize Terso in a project directory.
terso init
terso init --project-id my-project
terso init --skip-verify # skip Omnus project verification
Creates .terso/ and scaffolds AGENTS.md at the project root if missing.
terso capture
Capture knowledge from the terminal (requires Omnus).
terso capture "your text here"
If offline, captures are stored locally and flushed on next terso sync.
terso auth
Manage Omnus API authentication.
terso auth set <token> # save API token
terso auth status # show auth status
terso auth clear # remove stored token
Tokens are stored in ~/.terso/config.json. Override with TERSO_API_TOKEN env var.
terso sync
Pull project context from Omnus and write to .terso/generated/.
terso sync
terso sync --force # overwrite even if unchanged
terso sync --dry-run # preview without writing
terso search
Search project knowledge (requires Omnus).
terso search "stripe webhook setup"
terso status
Show current project knowledge status.
terso status
terso doctor
Check project health and configuration.
terso doctor
Verifies: .terso/ present, API connectivity, .gitignore correctness.
terso watch
Watch .terso/ source files and auto-sync from Omnus on change.
terso watch
terso watch --interval 5000
For watching AGENTS.md instead, use terso emit --watch — that's the offline-only flow.
terso compile
Compile local .terso/ source files into a single CURRENT_CONTEXT.md artifact (offline mode for the Omnus flow).
terso compile
Note: compile is for the Omnus-style .terso/generated/ flow. For the AGENTS.md → per-agent config flow, use emit.
terso mcp
Run an MCP server over stdio that exposes project context to AI agent clients (Claude Code, Cursor, Codex).
terso mcp # run the server (used by your client)
terso mcp install --client claude # print install snippet
terso mcp install --client cursor
terso mcp install --client codex
See MCP Server for setup and tool details.