{"id":49761275,"url":"https://github.com/gjczone/repomap","last_synced_at":"2026-05-30T19:00:54.114Z","repository":{"id":355966509,"uuid":"1230031946","full_name":"gjczone/repomap","owner":"gjczone","description":"Codebase awareness for coding agents: tree-sitter AST maps, 13-language LSP, pre/post-edit impact analysis","archived":false,"fork":false,"pushed_at":"2026-05-26T07:27:14.000Z","size":28339,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-26T08:29:42.273Z","etag":null,"topics":["agent-skills","ai-agent","ast","cli","code-analysis","code-base-indexing","harness-engineering","lsp","mcp","mit-license","model-context-protocol","python","repository-intelligence","skills","tree-sitter"],"latest_commit_sha":null,"homepage":"https://github.com/gjczone/repomap","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gjczone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-05T15:58:39.000Z","updated_at":"2026-05-26T07:27:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gjczone/repomap","commit_stats":null,"previous_names":["gjczone/repomap"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/gjczone/repomap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjczone%2Frepomap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjczone%2Frepomap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjczone%2Frepomap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjczone%2Frepomap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gjczone","download_url":"https://codeload.github.com/gjczone/repomap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjczone%2Frepomap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33544086,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-skills","ai-agent","ast","cli","code-analysis","code-base-indexing","harness-engineering","lsp","mcp","mit-license","model-context-protocol","python","repository-intelligence","skills","tree-sitter"],"created_at":"2026-05-11T07:18:06.755Z","updated_at":"2026-05-30T19:00:54.102Z","avatar_url":"https://github.com/gjczone.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RepoMap — Codebase Awareness for Coding Agents\n\n\u003e Tree-sitter project maps, 17-language LSP, pre/post-edit impact analysis — for Claude Code, Cursor, Codex, OpenCode.\n\u003e\n\u003e Inspired by [aider](https://github.com/Aider-AI/aider)'s repo map. Built by [@gjczone](https://github.com/gjczone) with deepseek-v4-pro, mimo-v2.5-pro, glm-5.1 and qwen3.7-max.\n\n[中文 README](README.zh-CN.md)\n\n**What agents get**: structured repo context instead of grep + raw reads:\n\n- **Where to start**: `overview`, `query` (synonym expansion), `routes`\n- **What will break**: `impact` (incl. type-level), `call-chain` (incl. references)\n- **What was missed**: `verify` (contract risk + missed-files + orphan symbols), `check`\n- **Auto-fix \u0026 ready**: `fix` (ruff + eslint auto-fix), `ready` (pre-commit check)\n- **Encoding auto-detect**: UTF-8 → GBK → GB2312 fallback for legacy projects\n- **Adaptive search**: never returns empty — keyword expansion → hotspot fallback\n\n---\n\n## Quick Start\n\nOne command installs everything. The skill tells agents *when* to call each repomap command; the CLI does the actual work.\n\n```bash\n# 1. Install skill (agent decision procedure)\nmkdir -p ~/.claude/skills\ngit clone https://github.com/gjczone/repomap.git /tmp/repomap-install\ncp -r /tmp/repomap-install/skills/repomap ~/.claude/skills/repomap\nrm -rf /tmp/repomap-install\n\n# 2. Install CLI (Linux x64 only)\nnpm install -g repomap-bin\n\n# 3. Verify\nrepomap doctor --project .\n```\n\n**Result**: The agent reads `~/.claude/skills/repomap/SKILL.md` and automatically calls `repomap overview`, `repomap impact`, `repomap verify` at the right moments. Use the CLI directly for manual analysis.\n\n\u003e **Note**: `--project` is optional. If not specified, repomap auto-detects the git root directory.\n\n---\n\n\n### Build from Source (Windows / macOS)\n\nPre-built binaries are Linux x64 only. Windows and macOS users can build from source:\n\n```bash\n# 1. Clone the repo\ngit clone https://github.com/gjczone/repomap.git\ncd repomap\n\n# 2. Install uv (Python package manager)\n# macOS:    brew install uv\n# Windows:  powershell -c \"irm https://astral.sh/uv/install.ps1 | iex\"\n\n# 3. Install dependencies\nuv sync --all-extras\n\n# 4. Run from source\nuv run repomap doctor --project .\n```\n\nOr build a binary: `uv run --with pyinstaller python -m PyInstaller --onefile --name repomap src/cli/__main__.py`\n\n### LSP Setup\n\nAdds compiler-grade precision for symbol lookups. The agent handles this automatically:\n\n```bash\nrepomap doctor --project .                # check runtime + LSP status (default)\nrepomap lsp setup --dry-run --project .   # preview install plan\nrepomap lsp setup --project .             # install missing servers\n```\n\n| Language | Server | Install |\n|----------|--------|---------|\n| Python | `pyright` | `npm install -g pyright` |\n| TypeScript / JS | `typescript-language-server` | `npm install -g typescript-language-server typescript` |\n| Rust | `rust-analyzer` | `rustup component add rust-analyzer` |\n| Go | `gopls` | `go install golang.org/x/tools/gopls@latest` |\n| C / C++ | `clangd` | `apt install clangd` / `brew install llvm` |\n| C# | `csharp-ls` | `dotnet tool install -g csharp-ls` |\n| Java | `jdtls` | mason or manual |\n| Lua | `lua-language-server` | `npm install -g lua-language-server` |\n| PHP | `intelephense` | `npm install -g intelephense` |\n| Ruby | `ruby-lsp` | `gem install ruby-lsp` |\n| Swift | `sourcekit-lsp` | bundled with Xcode / Swift toolchain |\n| Kotlin | `kotlin-language-server` | mason or manual |\n| Bash | `bash-language-server` | `npm install -g bash-language-server` |\n| CSS / SCSS | `vscode-css-language-server` | `npm install -g vscode-langservers-extracted` |\n| HTML | `vscode-html-language-server` | `npm install -g vscode-langservers-extracted` |\n| JSON | `vscode-json-language-server` | `npm install -g vscode-langservers-extracted` |\n| YAML | `yaml-language-server` | `npm install -g yaml-language-server` |\n\nLSP-backed commands automatically use local LSP servers when available. All commands work without LSP; missing servers are reported as skipped.\n\n---\n\n## Commands\n\n| Command | Purpose |\n|---------|---------|\n| `overview` | Project map: entry points, hotspots, key symbols (PageRank), reading order |\n| `query --query \u003ckeywords\u003e` | Topic search with synonym expansion; `--context-lines \u003cN\u003e` for matched code; `--json` |\n| `query --symbol \u003cname\u003e` | Exact/fuzzy symbol lookup; LSP hover + definition/reference + state map; `--json` |\n| `query --search \u003ctext\u003e` | BM25 semantic symbol search; `--top-k \u003cN\u003e` for result count; `--json` |\n| `query --file \u003cpath\u003e` | File symbols + signatures + callers; LSP symbol tree by default; `--json` |\n| `impact --files \u003cf...\u003e --with-symbols` | Pre-edit blast radius: key symbols, affected files, risk, suggested tests |\n| `call-chain --symbol \u003cname\u003e` | Callers, callees, and references with configurable depth; `--direction`; `--json` |\n| `routes [--json] [--with-consumers]` | HTTP/API route inventory (FastAPI, Express, Axum, Spring Boot) |\n| `verify [--quick] [--no-diff]` | Post-edit evidence gate: git changes, risk, diagnostics, orphan symbols, graph diff |\n| `check` | Compiler/type/lint diagnostics (tsc, pyright, ruff, cargo check, go vet) |\n| `cache save` | Graph baseline save for diff comparison |\n| `doctor [--no-lsp]` | Health check: parsers, runtime, LSP status (default) |\n| `lsp setup [--dry-run]` | Auto-install missing LSP servers for detected languages |\n| `fix [--dry-run]` | Auto-fix: ruff --fix + eslint --fix |\n| `ready` | Pre-commit readiness: verify + check + format in one command |\n\n---\n\n## Agent Workflow\n\nThe agent follows this pattern automatically (guided by the skill instructions):\n\n```bash\n# Before editing\nrepomap overview                                      # first contact\nrepomap query --query \"auth token\"                    # find by keywords\nrepomap query --file src/auth/login.ts                # file detail\nrepomap impact --files src/auth/login.ts --with-symbols\nrepomap routes --with-consumers                       # API consumer map\nrepomap call-chain --symbol refreshToken\n\n# After editing\nrepomap verify                                        # full evidence gate (incl. orphan symbols + graph diff)\nrepomap fix                                           # auto-fix lint issues\nrepomap ready                                         # pre-commit readiness check\nrepomap check                                         # compiler diagnostics\n```\n\n---\n\n## Origin\n\n`repomap`'s core idea comes from **[aider](https://github.com/Aider-AI/aider)** — tree-sitter + PageRank for coding-agent codebase awareness. LSP integration patterns draw from **[serena](https://github.com/oraios/serena)**, including server auto-detection, search result formatting, and hierarchical symbol indexing.\n\n---\n\n## License\n\nMIT — [LICENSE](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgjczone%2Frepomap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgjczone%2Frepomap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgjczone%2Frepomap/lists"}