CLI Commands¶
Complete reference for all Cognibrain CLI commands.
Global Options¶
These options are available on all commands:
| Flag | Description |
|---|---|
--json | Output machine-readable JSON |
--help | Show help for the command |
--version | Show Cognibrain version |
--quiet | Suppress non-essential output |
Setup & Lifecycle¶
cognibrain init¶
Initialize Cognibrain in a project directory.
| Option | Default | Description |
|---|---|---|
--yes | — | Accept all defaults without prompting |
--profile <name> | solo-dev | Profile: solo-dev, benchmark |
--no-start | — | Don't start the daemon after init |
--no-skill | — | Skip Codex skill installation |
--no-doctor | — | Skip the doctor check |
--runtime-root <path> | . | Override the runtime root directory |
--benchmark | — | Shorthand for --profile benchmark |
cognibrain setup¶
Alias for init. Routes to the same wizard/default flow.
Legacy flags for backward compatibility:
| Option | Description |
|---|---|
--codex | Generate Codex harness files |
--cursor | Generate Cursor harness files |
--all-harnesses | Generate all harness files |
cognibrain start¶
Start the local API daemon.
cognibrain stop¶
Stop the local API daemon.
cognibrain status¶
Display runtime state, memory health, connections, and next actions.
cognibrain doctor¶
Diagnose and optionally fix configuration issues.
Memory Operations¶
cognibrain memories add¶
Store a durable memory.
| Option | Description |
|---|---|
--scope <scope> | Memory scope: repo, user, global, task |
cognibrain memories list¶
List stored memories.
| Option | Default | Description |
|---|---|---|
--json | — | JSON output |
--scope <scope> | all | Filter by scope |
--status <status> | all | Filter by status (active, stale, review) |
--limit <n> | 50 | Maximum results |
cognibrain memories coding-context¶
Retrieve relevant memories for a coding task.
| Option | Default | Description |
|---|---|---|
--json | — | JSON output |
--budget <tokens> | 1200 | Token budget for the context pack |
Agent Lifecycle¶
cognibrain context¶
Request a context pack before starting work.
| Option | Description |
|---|---|
--task <description> | Task description for relevance matching |
--repo <owner/name> | Repository context |
--budget <tokens> | Token budget |
--json | JSON output |
cognibrain guard¶
Check an action against known guards.
| Option | Description |
|---|---|
--action <description> | Action to check |
--json | JSON output |
cognibrain outcome¶
Record the result of a command.
| Option | Description |
|---|---|
--command <cmd> | Command that was run |
--exit-code <n> | Exit code (0 = success) |
--stderr <text> | Standard error output (on failure) |
--json | JSON output |
cognibrain correction¶
Record a human correction.
| Option | Description |
|---|---|
--text <correction> | The correction text |
--json | JSON output |
cognibrain patch-evidence¶
Record what changed during a task.
| Option | Description |
|---|---|
--task <description> | Task that was completed |
--files <paths> | Files that were changed |
--commands <cmds> | Commands that were run |
--json | JSON output |
cognibrain session-end¶
Signal the end of an agent session.
| Option | Description |
|---|---|
--run-dream-if-due | Trigger dream cycle if enough time has passed |
--json | JSON output |
cognibrain handoff¶
Hand off context to another agent or session.
cognibrain release-prepare¶
Prepare release context.
cognibrain dream-plan¶
Preview what a dream cycle would do.
cognibrain source-revalidate¶
Revalidate memory sources.
cognibrain conflicts¶
Show contradicting memories.
cognibrain health¶
Check system health.
Service Management¶
cognibrain service plan¶
Preview what service installation will do.
cognibrain service install¶
Install Cognibrain as a system service.
| Option | Description |
|---|---|
--activate | Start immediately after installing |
--system | Install as system-wide service (vs user service) |
cognibrain service status¶
Check service health.
cognibrain service logs¶
View service logs.
cognibrain service restart¶
Restart the service.
cognibrain service uninstall¶
Remove the service.
Connectors¶
cognibrain connections list¶
List configured connectors.
cognibrain connections add¶
Add a connector.
| Option | Description |
|---|---|
--set <key=value> | Set a configuration value |
--token-env <VAR> | Environment variable for the token |
--url-env <VAR> | Environment variable for the URL |
cognibrain connections doctor¶
Check connector health.
Configuration¶
cognibrain config codex¶
Generate/refresh Codex harness files. By default this writes both the user-level Codex skill and the repo-owned Codex contract: AGENTS.md plus .agents/skills/cognibrain/SKILL.md.
Use --no-global-skill to skip writing under ~/.codex, or --no-skill to skip both global and repo-local Codex skills.
cognibrain config cursor¶
Generate/refresh Cursor harness files.
cognibrain config all¶
Generate/refresh all harness files and update the repo-owned harness manifest.
Audit the repo-owned contract without writing files:
--check reports drift and warnings without failing by default. Add --strict when a CI job should fail on drift.
cognibrain config doctor¶
Check harness configuration health.
Evidence & Proof¶
cognibrain proof¶
Show current evidence state.
SDK Scaffolding¶
cognibrain sdk platform¶
Scaffold a community connector:
| Option | Description |
|---|---|
--kind <type> | Connector kind: issue_tracker, chat, docs, etc. |
--direction <dir> | Data direction: ingest, emit, bidirectional |
--auth <method> | Auth method: token, oauth, api_key |
--out <path> | Output directory |
cognibrain sdk harness¶
Scaffold a harness adapter: