
codemap
给 AI 一张项目地图,少烧 token 也能看懂代码
项目预览
项目数据
项目介绍
Star 增长趋势
本站每日记录该项目 GitHub 星标变化,观测越久曲线越完整
数据来源:GitHub API 逐日快照 · 收录于 2026-09-16 · 当前星标 ★ 708
技术标签
使用教程
环境要求
- macOS 或 Linux
- 一个待分析的代码仓库
安装与启动步骤
-
1安装二进制
单个静态二进制,通过 Homebrew tap 安装最省事。
brew tap JordanCoin/tap && brew install codemap -
2在项目里建索引
索引会解析符号和调用关系,大仓库首次建索引要等一会儿。
codemap index . -
3查调用关系
按符号查谁调用了它、它又调用了谁,比全文搜索准得多。
codemap query <symbol> -
4接给 AI 助手用
把查询命令写进 agent 的工具说明,让它按需查而不是整库读。
如何确认成功
codemap 命令可用,查询能返回调用链
注意事项
- 它同时用 ast-grep 做语法层解析,语言支持面取决于 ast-grep。
- 索引文件建议加进 gitignore,不要提交。
核心亮点
- 用静态分析生成结构化架构图,比让 LLM 直接读源码更省 token
- 支持 Claude Code、Codex CLI、Cursor 等主流 AI 编码工具,集成成本低
- Go 单二进制分发,安装和运行轻量,适合本地开发环境
不足之处
- 项目处于早期,694 星标,生态和文档完善度有限
- 对动态语言或高度元编程的项目,静态分析准确度可能下降
适用场景
- 接手大型陌生代码库时,先用 codemap 生成架构概览再让 AI 分析
- 在 Claude Code / Codex CLI 中开发时,按需注入模块上下文减少 token 消耗
- 团队协作中统一 AI 助手的项目理解口径,避免每次对话重复解释结构
替代项目
repomix、aider、sourcegraph
下一篇:flutter-ai-rules
同类项目推荐
PythonIDE-iOS
开源
在 iPhone/iPad 上跑完整 Python 与 AI Agent,随时随地写代码
面向 iPhone/iPad 的 Python 3.14.6 与 HTML/CSS/JavaScript 开发工作台:AI Agent、Noteb···
ultimate_bug_scanner
开源
给 AI 写的代码加一道自动查 bug 的关卡
Static analysis tool that catches 1000+ bug patterns across all popular programming ···
hey
开源
在终端里喊一声 hey,AI 立刻帮你写代码、解 bug!
AI-Powered Pair Programming Friend!
development-plugin-for-avalonia
开源
在 Avalonia 开发中直接调用多种 AI 助手,提升编码效率。
Development Plugin for Avalonia
oh-my-openagent
开源
让 Codex 和 OpenCode 在大型代码库中省 token 又听话
OmO: Just type "mass ulw" keyword with your prompt. Now you are the master of graph ···
code-assistant
开源
多模型自主编程代理,能自己读代码改代码
An LLM-powered, autonomous coding assistant. Also offers an MCP and ACP mode.
AI-Git-Narrator
开源
一条命令,AI 帮你写好 Git 提交信息和 PR 描述
Command-line tool for generating Git commit messages and PR descriptions with AI. Su···
claude-code-handbook
开源
从零到精通 Claude Code,中英双语速查手册
The definitive guide to Claude Code — from zero to mastery. Bilingual EN/CN.
ogpt.nvim
开源
在 Neovim 里直接聊大模型,写代码不切屏
Chat with Ollama/OpenRouter/Huggingface/TextGen/OpenAI/Gemini/Anthropic GPT Neovim P···