CLI reference

The engrym CLI is the primary entry point for solo developers. Every action — write a doc, query the Brain, log a decision — has a CLI command. The CLI is provider-agnostic: BYOK your Anthropic, OpenAI, or Google key once and every CLI command honors it.

Global flags

These flags apply to every engrym command:

| Flag | Description | Default | | ---- | ----------- | ------- | | --project <path> | Project root override | cwd | | --profile <name> | Named auth profile to use | default | | --json | Emit JSON output | off (human text) | | --quiet | Suppress non-error output | off | | --debug | Verbose tracing | off | | --help | Print help and exit | — | | --version | Print CLI version and exit | — |

Exit codes

| Code | Meaning | | ---- | ------- | | 0 | Success | | 1 | Generic error | | 2 | Validation error (bad input) | | 3 | Auth error (login expired, bad key) | | 4 | Conflict error (concurrent write) | | 5 | Network / upstream error |

Authentication

engrym login

Open a browser to the Engrym dashboard, pair the machine, and pull credentials into the local keychain.

engrym login
engrym login --profile work

engrym logout

Forget the active profile's credentials.

engrym logout
engrym logout --profile work

Project management

engrym init

Initialize an Engrym project in the current directory. Creates .engrym/ with project metadata and seeds the sync daemon's watch list.

engrym init
engrym init --name "My Project"

engrym status

Print sync status, watcher state, and active intents/conflicts.

engrym status
engrym status --json

Documents

engrym doc read <path>

Read a project document.

engrym doc read docs/architecture/providers.md

engrym doc write <path>

Write or update a project document. Reads stdin when --stdin is set, otherwise opens $EDITOR.

echo "# Title" | engrym doc write docs/new.md --stdin
engrym doc write docs/new.md

engrym doc list [--prefix <path>]

List project documents.

engrym doc list
engrym doc list --prefix docs/architecture

engrym doc delete <path>

Delete a project document.

engrym doc delete docs/old.md

Brain

engrym brain query <text>

Query the Brain for atoms matching the natural-language query.

engrym brain query "what's our provider strategy?"
engrym brain query "API rate limits" --limit 5 --json

engrym brain list

List Brain atoms with optional filters.

engrym brain list --tag architecture
engrym brain list --since 2026-04-01

Decisions

engrym decision log <title>

Log a project decision. Body is read from stdin or $EDITOR.

engrym decision log "Switch to Postgres for primary store" --stdin <<< "Rationale: ..."
engrym decision log "Adopt React 19 RSC"

engrym decision list

List logged decisions.

engrym decision list
engrym decision list --tag frontend --since 2026-01-01

Intents

engrym intent broadcast <text>

Broadcast an intent on the current module (or a specified one).

engrym intent broadcast "Refactoring auth module"
engrym intent broadcast "Adding billing namespace" --module packages/billing

engrym intent list

List active intents in the project.

engrym intent list

Conflicts

engrym conflict list

List active conflicts.

engrym conflict list

engrym conflict resolve <id>

Resolve a conflict by id.

engrym conflict resolve conflict-abc123

Environment variables

| Variable | Purpose | | -------- | ------- | | ENGRYM_PROFILE | Default profile (overridden by --profile) | | ENGRYM_PROJECT_ROOT | Default project root (overridden by --project) | | ENGRYM_API_BASE_URL | Override the API base URL (for self-host / staging) | | ENGRYM_LOG_LEVEL | error / warn / info / debug |

Next steps