Counts you can check
Per file and method, with your model's encoding where it is published, and Claude's exact count through Anthropic's API on request.
ctxman's own source, 140 files, tiktoken cl100k
Open source · MIT · runs on your machine
ctxman turns any repository into model-ready context: exact token counts, method maps in 14 languages and budgets that never overflow — served to your tools over the CLI, MCP and REST, without your code leaving your machine.
npm install -g ctxmanFit a real repository into a context window
Context window: 1,000,000 tokens
ctxman on its own repository, commit fda35db, exact tiktoken counts
Dumping a repository into a prompt wastes the window on lockfiles, build output and boilerplate. ctxman measures what is there and keeps what matters.
Use it by hand, wire it into an assistant, call it from a service or embed it.
Analyse, map, review and explain from the terminal
$ ctxman --cli --changed-since main --target-model claude-sonnet-5-5
$ ctxman map --tokens 4096 --focus src/server.js
$ ctxman pr --base main --budget 30k
$ ctxman why src/cart.js:total --ask "Why round here?"Per file and method, with your model's encoding where it is published, and Claude's exact count through Anthropic's API on request.
ctxman's own source, 140 files, tiktoken cl100k
Every method with its line and its own token count, in 14 languages.
"lib/core/Analyzer.js"[10]{name,line,tokens}:
constructor,15,54
initStats,27,64
analyze,40,87
analyzeSequential,57,61
analyzeFile,71,253
updateStats,110,218Pack the highest-ranked files, whole or as signatures, into a hard token budget: ctxman pack --budget, REST or MCP.
29,989 / 30,000 · 12/140 files
Cloud keys, tokens and private keys become [REDACTED] before export.
- accessKeyId: 'AKIAABCDEFGHIJKLMNOP'
+ accessKeyId: '[REDACTED:aws-access-key-id]'ctxman pr packs a branch for review; ctxman why gathers the commits, issues and owners behind a function.
ctxman pr --budget 2500 → 2,413 tokens
TOON, JSON, YAML, Markdown, CSV, XML or a GitIngest digest — to a file, the clipboard or chunks.
No hosted service and no telemetry: analysis runs where the code is, on a laptop or a CI runner.
.contextignore, .contextinclude and .methodinclude are plain files, reviewed and versioned like code.
A policy file denies paths, requires redaction and caps exports for the CLI, API and MCP server, and every export is logged.
REST and MCP bind to localhost, refuse foreign Host headers, keep CORS off and accept an auth token.
Same commit, same context. Snapshots and diffs show how the context grows over time.
Read it, fork it, run it air-gapped. No seats, no lock-in.
Hosted context engines index your code on their servers; packers flatten it into one file. ctxman measures and shapes it locally.
| ctxman open source, local | Repomix open source | Sourcegraph enterprise | GitHub Copilot enterprise | Unblocked enterprise | |
|---|---|---|---|---|---|
| Runs without an account or server | Yes | Yes | No | No | No |
| Token counts you can see, per file | Yes | Yes | Not documented | Not documented | Not documented |
| Fit context into a token budget | Yes | Partly or limited | Partly or limited | Not documented | Partly or limited |
| Commit history and decisions in context | Yes | Yes | Yes | Not documented | Yes |
| Tickets, chat and wiki as sources | No | No | Partly or limited | Yes | Yes |
| Secrets masked before export | Yes | Partly or limited | Not documented | Not documented | Not documented |
| MCP server for agents | Yes | Yes | Yes | Yes | Yes |
| Organisation-wide exclusion policy | Partly or limited | No | Yes | Yes | Partly or limited |
| SSO, SCIM and roles | No | No | Yes | Yes | Yes |
| Open source | Yes | Yes | No | Partly or limited | No |
Yes · Partly or limited · No · Not documentedChecked 2026-10-09 · Full comparison with sources →
Planned, not shipped yet. Several come from what teams expect of enterprise context engines.
ctxman whyOn request, read the pull-request and issue discussions behind the references ctxman why finds, from GitHub or GitLab.
The local embedding index of ctxman ask as an MCP tool, ranked together with BM25.
ctxman map, search and pack across the repositories of a workspace, with one budget.
Every number on this page comes from a script that runs the CLI, the MCP server and the REST API on a clone of ctxman. Nothing is edited by hand.
Open the showcase →project:
root: ctxman
totalFiles: 4
totalTokens: 6501
methods:
"lib/core/Analyzer.js"[10]{name,line,tokens}:
constructor,15,54
initStats,27,64
analyze,40,87
analyzeSequential,57,61
analyzeFile,71,253
updateStats,110,218
…One command to install, one to measure your repository.
npm install -g ctxman && ctxman --cli