CLI Reference

This page lists commands that exist in the current beta CLI. Use node packages/cli/dist/index.jsfrom a local checkout until the package is published as a global contextpilot binary.

Setup

install

Start the worker, install managed Claude Code hooks, register the MCP server, and launch the Codex watcher.

terminalbash
contextpilot install

uninstall

Remove managed hooks and local processes. Keeps local data unless explicitly told to delete it.

terminalbash
contextpilot uninstall
contextpilot uninstall --delete-data

init

Create a default .contextpilotignore and store a project-initialized memory.

terminalbash
contextpilot init

Worker

terminalbash
contextpilot start
contextpilot stop
contextpilot restart
contextpilot status
contextpilot doctor
contextpilot selftest

Analytics

savings

Show estimated repeated-read tokens and AI credits saved.

terminalbash
contextpilot savings
contextpilot savings --json
contextpilot savings --limit 10

events

Show recent hook ingestion events plus stored, deduped, ignored, and error counts.

terminalbash
contextpilot events
contextpilot events --json
contextpilot events --limit 20

analyze

Estimate project instruction-file waste without storing source bodies.

terminalbash
contextpilot analyze .
contextpilot analyze ~/code/my-app --runs 120
contextpilot analyze . --json

Auto model selection

auto

Score a prompt and recommend the cheapest model that can handle the task. Prints the exact agent CLI command to run and waits for confirmation before printing it. Pass --yes to skip the prompt or --json for machine-readable output.

terminalbash
contextpilot auto "fix typo in README"
contextpilot auto "refactor billing service" --provider openai
contextpilot auto "architect a migration plan" --json --yes

See the agent-specific guides — Claude Code · Codex CLI — for example output and the matching MCP tool.

Memory

search

Search saved compact memories.

terminalbash
contextpilot search "stripe webhook"
contextpilot search "billing" --limit 5

remember

Add a manual memory for the current project.

terminalbash
contextpilot remember "Billing rule" "Tenant billing uses plan limits from subscriptions."

License

Customer licensing is scaffolded for the paid beta. Activation calls the website license API and stores the verified license in ~/.contextpilot/license.json.

terminalbash
contextpilot license status
contextpilot license activate cp_live_xxx
contextpilot login cp_live_xxx

Set CONTEXTPILOT_LICENSE_API to point at your deployed website if you are testing before the production domain is live.