CodeArchy
v0.2.0Your codebase’s architecture for your AI agent: map, search, dependencies, request flows, code.
Your codebase's architecture, for you and your AI agent. codearchy is the command line of CodeArchy. It indexes a repository on your machine (TypeScript, JavaScript, Python, Java, Kotlin, Go, Rust, C#, PHP and Ruby, parsed with tree-sitter) and gives you: It prints a one-time pairing link. Open it, and the web app shows the repository from this machine. Only pages on this machine, from the app (or origins you allow with --allow-origin), can connect. It never writes to your files.
Summary extracted from the README.
codearchy
Your codebase's architecture, for you and your AI agent.
codearchy is the command line of CodeArchy. It
indexes a repository on your machine (TypeScript, JavaScript, Python, Java,
Kotlin, Go, Rust, C#, PHP and Ruby, parsed with tree-sitter) and gives you:
- The Companion for the web app at app.codearchy.com: the engine runs natively here, with no size limit, live updates as you edit, and authorship from your git history.
- An MCP server, so Claude Code, Codex, Gemini CLI, Copilot and other agents can explore your architecture.
- AI authorship reports: which lines AI tools wrote, from the evidence they leave in git.
Node.js 22 or later.
The Companion
npx codearchy serve --root .
It prints a one-time pairing link. Open it, and the web app shows the
repository from this machine. Only pages on this machine, from the app (or
origins you allow with --allow-origin), can connect. It never writes to your
files.
For your AI agent (MCP)
claude mcp add codearchy -- npx -y codearchy mcp --root /path/to/repo
The agent gets these tools: overview, search, get_node, neighbors,
explain_edge, find_flows, find_risks and read_code. If the agent shouldn't read
source, add --no-code: it then sees names, signatures, docs and structure
only.
Risk
npx codearchy risk # the riskiest files, per kind (Markdown)
npx codearchy risk --kind ai --json # unreviewed AI code only, as JSON
npx codearchy risk --scope dir:src/api # inside one part
Three kinds, from git history and the dependency graph (nothing is guessed): AI risk (unreviewed AI-written lines, weighted up for recent churn, no test file importing it directly and owners with no recent commits), knowledge risk (code only one person knows, or whose authors stopped committing) and hotspots (commits in the last 12 months × lines). Each file comes with why and one suggested action. People are never named.
Authorship
npx codearchy authorship report # what this branch adds, and who wrote it (Markdown)
npx codearchy authorship notes # record HEAD's AI lines as a git note
npx codearchy authorship hook install # …after every commit
Run codearchy --help for every option.
Privacy
Everything runs on your machine. Nothing is uploaded. Agent session logs
(--agent-logs) are opt-in, and only line ranges are kept from them.
License
MIT. Source and issues: github.com/CodeArchy/codearchy.