● repoctx v1.3.3 · node · 100% local-first · MIT
____ _____ ____ ___ ____ _____ __ __ | _ \ | ____| | _ \ / _ \ / ___| |_ _| \ \/ / | |_) || _| | |_) || | | || | | | \ / | _ < | |___ | __/ | |_| || |___ | | / \ |_| \_\|_____| |_| \___/ \____| |_| /_/\_\
▸ repository context, mapped locally.
A local-first CLI and MCP server that turns a repository into deterministic context for coding agents and reviewers — before they plan, edit, or merge. No cloud. No guessing. Just your repo, mapped.
// a context pack, generated locally in milliseconds
# task-aware context, fully deterministic $ repoctx context "add a new MCP tool" ▸ intent add · mcp, tool, server ▸ primary src/lib/mcp.js src/cli.js ▸ related src/lib/context-engine.js src/lib/repo.js ▸ tests tests/context-engine.test.js ✓ ▸ pattern register command → add handler → update help ▸ verify npm run ci ~4,088 context tokens · 100% local · 0 network calls
$ works with claude-code · codex-cli · cursor · vscode · ollama
// trust-layer
Five things an agent has to get right
repoctx turns a repository into a trust layer with five durable parts. Each one is deterministic, inspectable, and produced from your code — not a model's memory.
▸ context
[01]Task-aware packets before an agent plans or edits — primary files, related files, tests, patterns, and the exact validation commands.
▸ tests
[02]Every packet surfaces the matching tests and the repo's own quality gate, so changes ship with the checks that prove them.
▸ permissions
[03]Scoped to the smallest owner files that actually need to move. Code owners and protected-branch rules stay in the loop.
▸ review
[04]PR review context from local diffs and GitHub comments — changed files, risk prompts, review targets, merge-readiness.
▸ evidence
[05]Deterministic, local-first reports you can keep. Durable Markdown and JSON artifacts instead of disposable model guesses.
context
└─ tests
└─ permissions
└─ review
└─ evidence one loop, kept honest every session.
// features
One CLI for the whole repo-context job
It doesn't replace your editor or your model. It gives developers and agents a single, scriptable source of truth about the code in front of them.
▸ discover & index
Find repo roots under any directory and build local .dev-context indexes. No cloud, no upload.
▸ ast code maps
JSON-first maps of files, domains, imports, exports, symbols, and routes — parsed with the TS compiler.
▸ search across repos
Rank matches by path, domain, route, controller, imports, exports, and symbols across your catalog.
▸ agent harnesses
Generate setup, validation, and runtime commands as the first artifact an agent or CI reads.
▸ pr review packs
Turn a git diff into review targets, risk flags, and verification commands — posted as a sticky comment.
▸ token-aware
Every artifact estimates its own context-token footprint. Never blow an agent's window by accident.
▸ multi-repo workspaces
One product-level report across related repos — web, API, and everything wired between them.
▸ github actions ready
Scaffold a review workflow into any repo with one init, generating PR context on every pull request.
// mcp-server
Wire it straight into your agent
repoctx mcp starts a stdio MCP server that exposes repoctx as agent-callable tools, with a persisted repo-index cache that refreshes when files change.
- repo_inspect
- repo_map
- context_pack
- change_impact
- merge_readiness
- pr_merge_readiness
- review_pr
- repo_harness
- workspace_report
- pr_review
- find_domain
- find_backend_route
{
"mcpServers": {
"repoctx": {
"command": "npx",
"args": ["-y", "@nugehs/repoctx", "mcp"]
}
}
} ____ _____ ____ ___ ____ _____ __ __ | _ \ | ____| | _ \ / _ \ / ___| |_ _| \ \/ / | |_) || _| | |_) || | | || | | | \ / | _ < | |___ | __/ | |_| || |___ | | / \ |_| \_\|_____| |_| \___/ \____| |_| /_/\_\
Give your agents context they can trust
Install globally, or run it once with npx. Then point your agent at it.