cd /news/ai-tools/moving-an-older-tokencap-setup-over-… · home › topics › ai-tools › article
[ARTICLE · art-176891] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=· neutral

Moving an Older TokenCap Setup Over: Three Commands and an Alias Table

A developer documented migrating repositories from an older TokenCap CLI to the current release using three commands: a global npm install, `tokencap make --migrate`, and `tokencap make`. The migration upgrades `.tokencap/config.json`, publishes JSON schemas, writes migration and build records, and removes legacy compatibility aliases in favor of a seven-command surface, with removed commands exiting 1 and naming their replacements. The writeup also notes behavior changes such as new constitution rule IDs, `.mcp.json` written at the project root for Claude Code, and `--flag=value` parsing.

key takeaway

TokenCap's migration is `tokencap make --migrate` followed by `tokencap make`, and removed aliases like `tokencap rebuild` now exit 1 pointing to `tokencap make --rebuild` rather than running the new command.

by read4 min views13 publishedNov 26, 2026

TokenCap's CLI is organised around seven commands, and the generated artifacts follow published JSON schemas. If a repository was set up with an older TokenCap, this is the whole move.

npm install -g tokencap
tokencap make --migrate
tokencap make

The install gets the latest TokenCap, which carries the fixes covered in recent posts: stricter redaction that leaves code references intact, every language parsing on Node 18 and 20, and an MCP server that no longer times out on a first run.

Check the install:

tokencap version

Then, in each repository, run the other two commands.

tokencap make --migrate upgrades .tokencap/config.json to the current format, publishes JSON schemas in .tokencap/schemas/, and writes .tokencap/migration.json. It prints the three paths and ends by telling you to run tokencap make.

The following tokencap make regenerates the artifact manifest and writes a build record, .tokencap/build.json, with the commit, time and the layers that built. Migration is a make flag on purpose, so the CLI stays at seven commands: make, ask, analyze, serve, update, help, version.

The old compatibility aliases are gone. The ones you are most likely to have in scripts:

Old command Current command
tokencap impact <file>:<sym> tokencap ask impact <file>:<sym>
tokencap health tokencap analyze health
tokencap rebuild tokencap make --rebuild
tokencap remember tokencap serve session save
tokencap memory tokencap serve session list
tokencap handoff tokencap serve session handoff
tokencap migrate tokencap make --migrate
tokencap compress <file> tokencap analyze compress <file> --write
tokencap stats tokencap analyze stats
tokencap debt tokencap analyze debt
tokencap risk tokencap analyze risk
tokencap refactor tokencap analyze refactor
tokencap verify tokencap analyze verify
tokencap security scan tokencap analyze security scan

You do not have to grep your scripts first. A removed command prints a one-line error that says it was removed and names its replacement, then exits 1. tokencap rebuild points you to tokencap make --rebuild, and tokencap remember to tokencap serve session save.

It does not guess and run the new command for you. A CI job that calls an old name fails loudly, with the fix in the log line.

tokencap mcp is the one exception to the removals. It still starts the MCP server, so host configs written for the old CLI keep working without edits. New configs written by tokencap serve --mcp --init launch tokencap serve --mcp.

The MCP tool contract is stable: tools are not renamed and documented fields keep their meaning. tokencap_mcp_status reports the contract the server speaks.

One thing to check if you use Claude Code: older builds wrote the config to .claude/mcp.json, which Claude Code does not read. TokenCap now writes .mcp.json at the project root:

tokencap serve --mcp --init --client claude-code

An existing tokencap entry is kept unless you pass --force.

Coming from an older setup also brings a few behaviour changes. The ones most likely to touch you:

CONST-API-F5BF63). Every ID changes once. A manual override that reuses an old positional ID like CONST-API-001 becomes an extra rule; copy the new ID from .tokencap/constitution/constitution.yaml. AGENTS.md is no longer overwritten.make only refreshes it while it still holds a TokenCap template.OPENAI_API_KEY = '[REDACTED:KEY]' instead of OPENAI_API_KEY=[REDACTED:KEY]. Update anything that matches the old form.--flag=value is parsed, so make --root=X now builds into X. After this, tokencap update keeps you current. It is the only command that uses the network. make, ask, analyze health, diff and update each end with one Next: line, and when the index is behind your commits that line tells you to rebuild first.

The open work is evidence, and it is listed in HONEST-NUMBERS.md. The model-in-the-loop harness, benchmarks/fair/answer-eval.js, exists but has not been run, so there is no published answer-quality result yet. The current benchmark measures whether the task pack holds the files a real commit changed, on 100 tasks: 89% of the needed files are shown as code, 74% of the edited lines are in the pack, at a median 18.4x fewer tokens than a keyword grep. On the held-out tasks: 88.9%, 74.5% and 18.0x. Grepping everything still finds more files (96%), and that limit is written down next to the number.

What would help most:

Migration notes, docs and the changelog are at tokencap.vansharora.app

── more in #ai-tools 4 stories · sorted by recency
── more on @tokencap 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/moving-an-older-toke…] indexed:0 read:4min 2026-11-26 · —