CLI Reference
The Context Nest CLI (ctx) provides commands for managing vaults, documents, queries, and version history.
Install
npm install -g @promptowl/contextnest-cliCommands
Vault management
| Command | Description |
|---|---|
ctx init | Initialize a new vault |
ctx init --starter <recipe> | Initialize with a starter recipe |
ctx init --list-starters | List available starters |
ctx index | Regenerate context.yaml and INDEX.md files |
ctx welcome | Regenerate and open the welcome page |
Document operations
| Command | Description |
|---|---|
ctx add <path> | Create a new document |
ctx update <path> | Update a document |
ctx delete <path> | Delete a document and its history |
ctx publish <path> | Publish (bump version, create checkpoint) |
ctx validate [path] | Validate against the spec |
ctx list | List documents (filter with --type, --status, --tag) |
ctx search <query> | Full-text search |
Querying
| Command | Description |
|---|---|
ctx query <selector> | Query context from vault or cloud |
ctx resolve <selector> | Resolve a selector (metadata only) |
Versioning
| Command | Description |
|---|---|
ctx history <path> | Show version history |
ctx reconstruct <path> <version> | Reconstruct a specific version |
ctx verify | Verify all hash chains |
Packs
| Command | Description |
|---|---|
ctx pack list | List context packs |
ctx pack show <id> | Show pack details |
Checkpoints
| Command | Description |
|---|---|
ctx checkpoint list | List checkpoints |
ctx checkpoint rebuild | Rebuild checkpoint history |
Global options
| Flag | Description |
|---|---|
--json | JSON output (supported by most commands) |
--version | Show CLI version |
--help | Show help |
Vault discovery
The CLI walks up from the current directory to find the nearest vault root (a directory containing .context/config.yaml), similar to how git finds .git/.
Override with the CONTEXTNEST_VAULT_PATH environment variable.
Starter recipes
| Recipe | For | What you get |
|---|---|---|
developer | Engineering teams | Architecture, API reference, dev setup |
executive | Leadership | Strategic vision, market landscape, decision log |
analyst | Research / OSINT | Case files, source registry, methodology |
team | General teams | Handbook, onboarding guide, runbook |
Last updated on