Repository navigation
Java Code Indexer v1.7.0
🚀 Java Code Indexer v1.7.0
Java AST-level code indexer with SQLite storage, exposed as an MCP server for AI coding assistants.
📊 开发状态
| 指标 | 状态 |
|---|---|
| 当前版本 | v1.7.0 |
| 开发阶段 | Alpha |
| 稳定性 | 核心功能稳定,API 可能调整 |
| Java 版本要求 | 21+ |
| 最后更新 | ${GITHUB_SHA::8} |
✨ 核心功能
🔍 代码索引
- 符号索引:类、方法、字段的完整定义和位置
- 引用追踪:符号在整个代码库中的使用位置
- 调用图:方法调用关系(调用者/被调用者)
- 增量索引:基于 SHA-1 哈希的智能跳过未变更文件
🛠 MCP 工具
| 工具 | 功能 |
|---|---|
find_symbol |
按名称查找符号,支持通配符 |
find_references |
查找符号的所有引用位置 |
get_call_graph |
方法调用图分析 |
search_code |
搜索符号名和代码内容 |
get_file_info |
文件详情:符号、代码块、调用关系 |
search_config |
搜索配置文件 (YAML/Properties/.env) |
find_dependencies |
搜索项目依赖 (Maven/Gradle) |
📦 分发方式
- Fat JAR:通用 Java 21+ 运行时
- Native Image:GraalVM 原生镜像,启动即时
- Docker:容器化部署,支持多平台
- 多平台支持:Linux (amd64/arm64)、macOS (amd64/arm64)、Windows (amd64)
📝 更新日志
Full Changelog: v1.6.0...v1.7.0
- fix(ci): use PowerShell Compress-Archive instead of zip for Windows native image packaging
- fix(ci): resolve relative JAR path before cd in native image build
- fix: update hardcoded version strings from 0.7.2 to 1.7.0
- fix: remove duplicate migration blocks in DatabaseManager causing spurious WARN logs
- chore: bump version to 1.7.0
- fix: resolve duplicate variable declarations in McpServer and restore v1.7.0 changelog
- docs: 更新 doc 目录下的文档,与代码保持一致
- docs: 统一中英文 README 内容
- docs: 移除 README 中的版本标注,保持描述简洁
- feat: 优化新增工具描述,提升大模型理解
- docs: 更新 README 添加 1.7.0 新工具和完整配置说明
- fix: 修复 native image 构建和 find_dependencies 参数问题
- v1.7.0: File watcher, enhanced search, code metrics
- v1.7.0: File watcher, enhanced search, code metrics
- v1.6.0: Spring ecosystem support - API routes, type hierarchy, bean dependencies, test mappings
- v1.6.0: Spring ecosystem support - API routes, type hierarchy, bean dependencies, test mappings
- docs: update README and documentation
- fix(ci): add Windows native image support
- feat(v1.5.0): enhanced annotation support release
- chore(v1.4.5): final test verification
- docs(v1.4.4): update API documentation for annotation support
- feat(v1.4.3): add annotation extended tests
- feat(v1.4.2): add comprehensive annotation tests
- feat(v1.4.1): add Spring Boot/JPA/Lombok annotation tests
- feat(v1.4.0): Scala language support release
- feat(v1.3.5): Scala integration tests and documentation
- feat(v1.3.4): verify MCP tools support Scala code
- feat(v1.3.3): integrate Scala support into Indexer
- feat(v1.3.2): add ScalaParserAdapter
- feat(v1.3.1): add Scala support fields to Symbol model
- feat(v1.3.0): annotation support release
- feat(v1.2.5): annotation integration tests and documentation
- feat(v1.2.4): add annotation MCP tools
- feat(v1.2.3): integrate annotations into Indexer
- feat(v1.2.2): add annotation extraction to parsers
- feat(v1.2.1): add Annotation model and storage
- Update CHANGELOG.md
- feat(v1.2.0): Kotlin language support release
- feat(v1.1.5): Kotlin integration tests and documentation
- feat(v1.1.4): verify MCP tools support Kotlin code
- feat(v1.1.3): integrate Kotlin support into Indexer
- feat(v1.1.2): add KotlinParserAdapter
- feat(v1.1.1): add Kotlin support fields to Symbol model
📥 安装说明
Fat JAR
# 1. 索引项目(首次使用)
java -jar java-code-indexer-1.7.0.jar --project-root /path/to/project --index
# 2. 启动 MCP 服务(供 Claude Code / Cursor 等 AI 助手使用)
java -jar java-code-indexer-1.7.0.jar --project-root /path/to/projectNative Image
# Linux/macOS
# 1. 索引项目
./jindexer --project-root /path/to/project --index
# 2. 启动 MCP 服务
./jindexer --project-root /path/to/project
# Windows
# 1. 索引项目
jindexer.exe --project-root /path/to/project --index
# 2. 启动 MCP 服务
jindexer.exe --project-root /path/to/projectDocker
# 1. 索引项目
docker pull sodlinken/jcodeindexer:1.7.0
docker run --rm -v /path/to/project:/project sodlinken/jcodeindexer:1.7.0 --project-root /project --index
# 2. 启动 MCP 服务
docker run --rm -i -v /path/to/project:/project sodlinken/jcodeindexer:1.7.0 --project-root /projectDocker 离线镜像
# 加载离线镜像
docker load < docker-image-1.7.0.tar.gz
# 索引项目
docker run --rm -v /path/to/project:/project sodlinken/jcodeindexer:1.7.0 --project-root /project --index🔧 环境变量
| 变量 | 说明 | 默认值 |
|---|---|---|
INDEXER_THREADS |
索引线程数 | 4 |
INDEXER_LOG_LEVEL |
日志级别 (DEBUG/INFO/WARN/ERROR) | INFO |
⚙️ 配置文件
在项目根目录创建 .jindexer/config.yaml(可选):
data_dir: .jindexer
indexing:
threads: 4
max_file_size_kb: 512
watch:
enabled: true
interval: 5