Show HN: cairn, a map of all your repos for coding agents A developer released cairn, an open-source tool that scans every git repo in a folder once and generates a shared map so coding agents can locate the right repo and file without re-exploring. The tool, installed via the Python package cairnmap (Python 3.11+ and git required), produces a roughly 25-token-per-repo always-loaded index plus per-repo cards capped at 800 tokens, and works with Claude Code, Codex, Gemini CLI, and Cursor on Windows, macOS, and Linux. Each relationship carries evidence with file and line plus a trust level of extracted, inferred, or ambiguous, with ambiguous links hidden until confirmed. A map of all your repos for coding agents. cairn scans every git repo in a folder once, works out how they connect, and gives your agent: - a tiny always-loaded index; - a short card per repo. The agent knows where things live without re-exploring. Cairns are the stacked-stone markers that guide hikers along a trail. cairn leaves small, cheap markers that guide coding agents to the right repo, and then to the right file. Works with Claude Code, Codex, Gemini CLI, and Cursor , on Windows, macOS, and Linux . Coding agents work inside one repo. Real work spans many: a web app, an API, a shared types package, a payments service, a reporting job. Say "add a tip amount to trips end to end" and the agent has to: 1. discover that sibling repos exist; 2. grep through all of them; 3. read a pile of files; 4. guess which service owns the trips table. That costs tokens and turns, and weaker models guess wrong. Hand-maintained "related repos" docs help until they go stale. cairn builds that map from the code itself and keeps it fresh: ~/code/ ~/code/.cairn/ ├── rider-web/ cairn ├── INDEX.md ← ~25 tokens per repo, always loaded ├── trips-svc/ ─────▶ ├── cards/trips-svc.md ← read on demand ≤ 800 tokens ├── payments-svc/ scan ├── workspace.json ← the full graph ├── analytics-etl/ └── authored/ ← your summaries and decisions └── … The index is a few lines, loaded into every session through CLAUDE.md or an equivalent: Workspace repos cairn - admin-console @fleetline/admin-console : Next.js back-office for ops staff; queries trips… · nextjs - analytics-etl: Nightly SQL reporting jobs over trips, payments, drivers… · python - payments-svc payments : Go service that charges completed trips and records weekly payouts · go - trips-svc: FastAPI service owning the trip lifecycle and the trips/trip events tables · fastapi · used by admin-console - ui-kit @fleetline/ui-kit : Shared React components Button, Card · react · used by admin-console used by lists the repos that depend on, call, or reference that one, so a change's blast radius is visible before any card is opened. A card is read only when the agent needs that repo: trips-svc FastAPI service owning the trip lifecycle and the trips/trip events tables. ./trips-svc · python, fastapi · HEAD 1fee22d Relates ← infra: references path trips-svc extracted · infra/docker-compose.dev.yml:3 → admin-console: shares tables trips inferred · admin-console/lib/db.ts:4 → analytics-etl: shares tables trips inferred · analytics-etl/jobs/daily revenue.sql:2 → payments-svc: shares tables trips inferred · payments-svc/internal/charge/charge.go:3 Run test pytest Layout app/ → routes/pages migrations/ → DB migrations Every relationship comes with evidence file and line and a trust level: - extracted : found directly, such as a package dependency or a path reference; - inferred : strong signals, such as a table that only one repo creates; - ambiguous : hidden until you confirm it. You need Python 3.11+ and git. | Tool | Command | |---|---| | uv https://docs.astral.sh/uv/ recommended | uv tool install cairnmap | | pipx | pipx install cairnmap | | run once, no install | uvx --from cairnmap cairn init | | pip | pip install cairnmap | The package is called cairnmap ; the command is cairn . cd ~/code the folder that CONTAINS your repos cairn init scan, then add the index to ./CLAUDE.md asks first cairn install all optional: Codex, Gemini CLI, Cursor, the /cairn skill, the MCP server Open your agent in any repo under that folder. It now knows about every sibling repo. To give each repo a good one-line summary, run /cairn inside your agent. It writes the summaries with cairn set-summary and settles uncertain links. Until then, the index says "no summary yet" for that repo. README text is deliberately kept out of always-loaded context. cairn status repos, relationships, unconfirmed links, missing/stale summaries cairn refresh re-read only repos that changed fast cairn hooks install optional: refresh automatically after each commit/merge php cairn annotate-edge "web- api:shares db" --confirm cairn annotate-edge "shop- blog:shares db" --reject --why "different databases" cairn set-summary payments-svc "Charges completed trips and pays drivers weekly." --alias payments These decisions live in .cairn/authored/ and .cairn/relations.yaml . They survive every re-scan, and you can commit them so your team shares them. cairn install