CLI Reference
contxt add
The fastest way to capture anything. Type it in plain English — Contxt figures out whether it's a decision, pattern, or context automatically.
Basic usage
$contxt add"We're using Postgres for ACID compliance and relational joins"Classified as:decisionSave as decision? (Y/n/type) ›✓ Decision saved: "We're using Postgres for ACID compliance..."
Contxt reads the text, classifies it by keyword signals, shows you the result, and saves it on confirmation. No API key required — classification is done locally, instantly.
How classification works
Contxt scans the text for keyword signals and picks the best match. No AI call needed.
| Type | Signals detected |
|---|---|
| decision | "decided", "we use", "we chose", "we're using", "switched to", "migrated to", "going with", "instead of", "rationale" |
| pattern | "always", "never", "every time", "convention", "best practice", "when you", "make sure to", "should always" |
| context | "working on", "currently", "this sprint", "blocked by", "in progress", "implementing", "building" |
| document | default — no strong signals detected |
Confirmation prompt
After classification, you're shown the result and asked to confirm:
| Input | Action |
|---|---|
| Y (or Enter) | Save with the classified type |
| n | Discard — nothing is saved |
| type | Show a list to manually pick: decision / pattern / context / document |
Skip classification with --type
If you already know the type, pass --type to skip the classification step entirely:
$contxt add"Always wrap API calls in try/catch"--type pattern✓ Pattern saved: "Always wrap API calls in try/catch"
$contxt add"Working on the auth flow this sprint"--type context✓ Context saved: "Working on the auth flow this sprint"
Options
| Flag | Description |
|---|---|
| -t, --type <type> | Override auto-classification. Values: decision, pattern, context, document |
| --tags <tags...> | Tags to apply to the entry |
contxt add vs. contxt decision add
contxt add is the fast path — write it in plain language and move on. The typed commands (contxt decision add, contxt pattern add, etc.) give you additional fields like alternatives, category, and consequences — use them when you want to be thorough.