Skip to Content
CLI Reference

CLI Reference

The Context Nest CLI (ctx) provides commands for managing vaults, documents, queries, and version history.

Install

npm install -g @promptowl/contextnest-cli

Commands

Vault management

CommandDescription
ctx initInitialize a new vault
ctx init --starter <recipe>Initialize with a starter recipe
ctx init --list-startersList available starters
ctx indexRegenerate context.yaml and INDEX.md files
ctx welcomeRegenerate and open the welcome page

Document operations

CommandDescription
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 listList documents (filter with --type, --status, --tag)
ctx search <query>Full-text search

Querying

CommandDescription
ctx query <selector>Query context from vault or cloud
ctx resolve <selector>Resolve a selector (metadata only)

Versioning

CommandDescription
ctx history <path>Show version history
ctx reconstruct <path> <version>Reconstruct a specific version
ctx verifyVerify all hash chains

Packs

CommandDescription
ctx pack listList context packs
ctx pack show <id>Show pack details

Checkpoints

CommandDescription
ctx checkpoint listList checkpoints
ctx checkpoint rebuildRebuild checkpoint history

Global options

FlagDescription
--jsonJSON output (supported by most commands)
--versionShow CLI version
--helpShow 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

RecipeForWhat you get
developerEngineering teamsArchitecture, API reference, dev setup
executiveLeadershipStrategic vision, market landscape, decision log
analystResearch / OSINTCase files, source registry, methodology
teamGeneral teamsHandbook, onboarding guide, runbook
Last updated on