TokenCap v3 has seven commands: make, ask, analyze, serve, update, help, and version. Every capability is a flag or subcommand of one of them. Commands removed in v3 print their replacement instead of running.
---
Installation
npm install -g tokencap
tokencap --version
---
tokencap make
Build or refresh project intelligence.
tokencap make
tokencap make --watch # Rebuild on save
tokencap make --rebuild # Full clean rebuild + health report
tokencap make --migrate # Upgrade a v2 workspace to the v3 artifact contract
tokencap make --open-graph # Build and open the interactive graph viewer
tokencap make --package <name> # Build one workspace package
Options
--profile <name> — compact | balanced | deep | gpt-4o | claude-3-5-sonnet | gemini-1.5-flash | gemini-1.5-pro | llama-3-8b--no-pointers — Skip multi-host agent pointer file generation--max-files <n> — Maximum number of files to include--max-bytes <n> — Total source byte budget
---
tokencap ask
Query your codebase.
tokencap ask "Where is authentication handled?" # Task-scoped context pack
tokencap ask brain <topic> # Project Brain cluster query
tokencap ask impact src/auth/token.js:validateToken # Callers and blast radius
tokencap ask impact --dead-code # Uncalled symbols
tokencap ask impact --clusters # Functional communities
---
tokencap analyze
Audit, inspect, and report.
tokencap analyze diff --staged
tokencap analyze review --base main
tokencap analyze tests --gaps
tokencap analyze health
tokencap analyze risk --ack <id>
tokencap analyze refactor rename src/auth/token.js:validateToken checkToken --write
tokencap analyze debug --start -- npm test
tokencap analyze security scan
tokencap analyze team status
tokencap analyze plugins list
Subcommands: diff, review, ownership, team, plugins, compress, tests, taint, schema, components, constitution, agent, simplify, stats, debt, health, risk, security, debug, refactor, feedback, verify.
---
tokencap serve
Local services: the browser Companion bridge, the MCP server, and session memory.
tokencap serve # Companion bridge on 127.0.0.1:4545
tokencap serve --daemon # Run the bridge in the background
tokencap serve --stop # Stop the background bridge
tokencap serve --mcp # MCP server over stdio
tokencap serve --mcp --init --client claude-code # Configure an MCP host
tokencap serve session save --summary "feature completed" --files src/app.js
tokencap serve session list
tokencap serve session handoff
---
tokencap update
Check for updates and upgrade TokenCap.
tokencap update
tokencap update --check
---
tokencap help / version
tokencap help
tokencap version