
ontomics
io.github.EtienneChollet由 GitHub 账号 EtienneChollet 发布v0.3.1更新于 Nov 3, 2026
Index your codebase's domain knowledge. 20x fewer tokens, 10x faster.
概览
ontomics 在本地为代码库建立领域概念语义索引,让编码助手一次调用即可查询概念、命名约定和相似逻辑。
- 可以做什么
- 查询和定位领域概念、列出高频概念,并描述符号的签名、文档字符串与关系
- 追踪概念或类型如何通过调用链和跨文件流动
- 列出检测到的命名约定、校验标识符、建议命名并评估词汇健康度
- 对比某个 git 引用前后的领域词汇变化,并将领域知识导出为可移植 YAML
- 查找行为相似的函数实现,并为符号组装分层上下文
- 描述文件、展示模块与概念的对应关系,并读取会话简报资源
- 适用场景
- 适合助手需要理解陌生或大型代码库的领域词汇,而不只是字符串匹配或符号定义时;也适合希望减少工具调用次数和 token 消耗,来回答某个术语含义或哪些函数行为相似这类问题。
- 运行要求
- 作为本地进程运行,可通过 npm(npx 或全局安装)、Homebrew、shell 安装脚本或源码构建安装。需要 git 仓库,会拒绝索引主目录、根目录或临时目录,除非强制。支持 Python、TypeScript、JavaScript 和 Rust。无需 API 密钥;嵌入模型首次运行时下载并缓存,索引存放在仓库内。
安装
在 SourceWeft 中
- 打开 控制台中的 ontomics,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
ontomics
[Python] [Rust] [TypeScript] [JavaScript] [platform] [MCP] [MCP Registry] [Glama] [Claude Code] [Codex] [pi]
ontomics gives any coding agent instant knowledge of your codebase. One tool call instead of 19. ~20x fewer tokens.
https://github.com/user-attachments/assets/01afa8a0-1bc2-4686-94d7-965fef7610c3
Visualization for the voxelmorph project -- a library for unsupervised learning in image registration
Benchmark
Tested with Claude Sonnet — same question, with and without ontomics.
"What does 'transform' mean in this codebase?" on voxelmorph (full transcript):
"What are the main domain concepts in this codebase?" on ScribblePrompt (full transcript):
Both conditions produced complete, correct answers. ontomics got there in one call.
What it does that search can't
Search tells you where a string appears. An LSP tells you where a symbol is defined and referenced. Neither answers: what are the domain concepts in this codebase? How do they relate? What naming conventions emerged? What changed in the domain vocabulary since last release? Which functions behave similarly, regardless of what they're named?
ontomics builds a semantic index of your project's domain — clustering related symbols into concepts, detecting naming conventions from usage frequency, resolving abbreviations, grouping functions by behavioral similarity, and tracking how the vocabulary evolves over time. That index can be exported as a portable artifact to bootstrap conventions in other repos.
Behavioral similarity
Beyond naming and concepts, ontomics embeds raw function bodies using CodeRankEmbed (768-dim, contrastive code retrieval) and clusters them by behavioral similarity. This surfaces relationships that neither naming nor call graphs expose:
The result also reveals that random_transform appears at two locations with different similarity scores — a sign of implementation duplication that concept-level search would miss entirely.
Install
Install once, available in every project. No configuration needed — ontomics auto-detects the repo and indexes it on first run.
ontomics requires a git repository (.git/ directory). It will refuse to index home, root, or temp directories. To index a non-git directory, pass --force.
1. Install the binary
npm (macOS/Linux):
macOS (Homebrew):
Shell installer (macOS/Linux):
From source:
2. Register with your harness
Claude Code:
Codex:
OpenClaw:
pi-coding-agent:
Share with your team — drop an .mcp.json in your repo root:
Supported languages
Python, TypeScript, JavaScript, Rust. Auto-detected from file extensions.
Tools
Concepts and vocabulary
Behavioral similarity
Codebase structure
Resources
How it works
ontomics runs a multi-stage pipeline entirely on your machine — no API keys required:
- Parse — tree-sitter extracts every identifier, signature, and call site from your source files
- Analyze — TF-IDF scoring identifies domain-specific concepts and detects naming conventions
- Embed (concepts) — BGE-small (384-dim) clusters related concepts by semantic similarity
- Embed (logic) — CodeRankEmbed (768-dim) embeds raw function bodies and clusters them by behavioral similarity
- Centrality — PageRank scores entities by structural importance
Both embedding models are downloaded once on first run and cached locally. The index lives at <repo>/.ontomics/index.db — subsequent startups load from cache and watch for file changes.
Configuration via .ontomics/config.toml in the repo root. All fields have sensible defaults. See SPEC.md for the full design contract.
来源:README.md,提交 897a953
工具
0版本历史
1- v0.3.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分