Vault Terminal · Workflow
Capture a coding session from the terminal
The CLI writes session events to Markdown in the current project's `.contextvault/sessions/` folder. Capture decisions and failures while they are fresh; search and prepare handoffs later.
1. Install and initialize
bash
# Run without a global install
npx @aliabdm/contextvault init
# Optional: install a reusable global command
npm install --global @aliabdm/contextvault
cd my-project
contextvault initGlobal install is optional. With npx, replace contextvault with npx @aliabdm/contextvault.
2. Record the work
bash
contextvault record
/source codex
/title Fix authentication callback
/user Callback redirects users back to sign-in.
/agent Cookie is read before the callback writes it.
/problem Session cookie is missing after OAuth callback.
/decision Keep authentication checks in middleware.
/task Add regression coverage for redirect loop.
/endSupported event types
/user, /agent, /note, /decision, /task, and /problem each record a dated event.Recorder controls
/source sets the source; /title sets the title; /paste captures multiline text until /endpaste; /help lists the commands; /end saves and exits.3. Review and search
bash
contextvault list
contextvault show latest
contextvault search "OAuth callback"
contextvault history --since 14d
contextvault decisions authentication --source codex
contextvault problems callback --since 30d4. Retrieve evidence and prepare the next handoff
bash
contextvault retrieve "authentication callback" --type decision,problem --source codex --since 30d --limit 10
contextvault prepare "Fix callback redirect and add regression coverage" --source codex --since 30d
contextvault memory
contextvault timelinePrepare writes an agent-ready Markdown file under .contextvault/exports/. Give that file to the next agent; the CLI does not call an AI provider.
Keep the project consistent
Run CLI commands from the intended project directory. Desktop displays these sessions when its active project points at that same folder.