CodeNib

ai.codenib由 codenib.ai 发布v0.2.5更新于 Nov 4, 2026

Source-linked CodeGraph exploration, ranked search, and static navigation for coding agents.

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

CodeNib 为代码仓库构建本地、可溯源到源码的代码图谱,让编码助手能检索排序后的代码上下文并跳转定义与引用。

可以做什么
  • 检索带文件与行号引用的有界代码上下文
  • 跳转定义与静态引用,包括传入和传出关系
  • 一次调用获取依赖子图,深度最多 8 层
  • 为多种语言建立索引,图后端覆盖 Python、Go、Rust、C/C++、C#、Java、Ruby、PHP、Kotlin、Scala、JavaScript 和 TypeScript
  • 导出带源码引用的仓库 Wiki
适用场景
适合编码助手在较大的多语言仓库中定位某段行为的实现位置,并沿调用路径追踪超过一跳的关系,而不只依赖 grep 和逐个读文件。对已在本地检出代码上使用 Claude Code 或 Codex 的团队最有用。
运行要求
以 stdio 在本地运行,需要 Python 3.10+、Git,以及 Claude Code 或 Codex。从 PyPI 安装 codenib 的 graph 与 mcp 附加组件,再对每个仓库执行 codegraph init 初始化。核心 CodeGraph 路径不需要模型、API 密钥或 GPU;各语言工具链与前置条件不同。
安装前请注意
初始化会接受未提交的改动并保留检出状态,但应把索引与重建成本计入评估。静态引用可能遗漏外部或动态关系,描述调用路径前应先阅读源码。可选的 grep 到 Jev 路线使用 OpenRouter,会把选中的代码发送到远程模型,该路线与无需模型的核心功能相互独立。项目处于 beta 阶段,公开接口可能变化。

安装

在 SourceWeft 中

  1. 打开 控制台中的 CodeNib,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[CodeNib]

Find the right code. Follow its references.

Give Claude Code and Codex source context and typed graph navigation across languages.

71.4% code-block Recall@5 on 100 real issues.
Model-planned grep → Jev: +12.8 percentage points over the same grep candidates without reranking.
Experimental result · Method and limitations

Use with your agent  ·  Browse a Wiki  ·  Languages  ·  Reproductions  ·  Releases

[CI] [PyPI version] [Latest GitHub Release] [arXiv paper] [Hugging Face: #1 Paper of the Day] [Apache 2.0 license]

[Play a recorded Claude Code session on Requests: explore_context finds where authentication is stripped on redirects, then one dependency_subgraph call traces the four-hop caller chain from the public API]

▶ Watch the 15-second replay · real CLI output · waits condensed · Pinned source, transcript and setup details.

New in 0.2.5: saved repository Wikis and portable OKF export, Pyrefly-backed Python graphs, static entry-path navigation and call-path rule checks. Read the release notes.

Quickstart

Requires Python 3.10+, Git, and Claude Code or Codex. Initialization accepts uncommitted edits and preserves the checkout.

bash
python -m pip install "codenib[graph,mcp]"codenib codegraph init /path/to/your/repo

Then ask your agent: “Use CodeNib's explore_context to find where request retry behavior is implemented. Cite the files and lines.”

This shipping path builds local search and a typed symbol graph, then connects installed agent clients. It needs no model, API key, or GPU for CodeNib; your agent uses its own model. It is separate from the grep/Jev experiment above. Language toolchain and project prerequisites vary.

Setup and troubleshooting · Source exclusions · All MCP tools · Local Wiki

Why CodeNib

  • Inspect the evidence. Retrieve bounded code context with file and line references, then navigate definitions and static references. Read the source at each reference before describing a call path.
  • Use the same tools across languages. The registry tracks 14 language entries, including 12 with graph backends. Check capability and setup differences in the language matrix.
  • Compare methods on the same source. Pinned agent contracts, datasets, and scorer checks make the reproduction surface inspectable.
  • Share what you found. Export a Wiki with source citations to your own GitHub Pages, or browse the public examples.

How it compares

What an agent can ask each tool. Peer interfaces were checked against upstream docs on 2026-09-28. This compares capabilities, not benchmark scores.

ToolAsk in plain languageRelationships beyond one hopRelationships resolved byRuns
grep / readNo; literal or regexNoText matchLocal
CodeNib CodeGraphYes; ranked source anchors (explore_context)Incoming/outgoing static references; one dependency_subgraph call, depth ≤ 8SCIP/LSP indexers (compiler-resolved)Local
SerenaNo; symbol name or regexOne level per call (find_referencing_symbols)Live language server or IDELocal
CodeGraph (colbymchenry)Yes; FTS5 full-text (codegraph_explore)Yes; call paths in codegraph_exploreTree-sitter AST extractionLocal; telemetry opt-out
DeepWiki public MCPYes; generated answers (ask_question)No structured graph toolsGenerated WikiHosted

CodeNib's indexed references can include calls, fields, type uses and function values. Inspect the source to establish which references invoke a function; external and dynamic relationships may be missing. For a known string or file, your agent's native search and reads remain useful. Include indexing and rebuild costs when assessing graph navigation on your own tasks.

None of these repository tools needs its own model or API key; your agent uses its own model. Detailed comparison, sources and boundaries. CodeNib also includes an optional grep → Jev route using OpenRouter for planning and reranking; selected code goes to remote models. Authorization previews remain opt-in. The historical research result above is separate from the product evaluation and the model-free CodeGraph row.

Languages

Graph backends: Python, Go, Rust, C/C++, C#, Java, Ruby, PHP, Kotlin, Scala, JavaScript, and TypeScript. Swift and Lua support chunking/retrieval. Provider prerequisites and coverage differ by language.

The generated language matrix separates chunking, graph backends, incremental-backend support, and decoder parity. The product currently reuses or rebuilds views; file-level delta repair is not enabled.

Results and reproductions

Start hereWhat you can inspect
Context methods and support matrixEvery retrieval pipeline, LLM workflow and agent route, sorted by the views it reads and who controls the search
BenchmarksLocalization, agent-context and resolution layers, evidence levels, and the method × benchmark matrix over CodeNib Base/Synthesis, SWE-bench Lite, Loc-Bench, SWE-Explore, Agent Retrieval Bench and ContextBench
grep → Jev result100-issue retrieval comparison, candidate controls, model use and limitations
Agent integration matrixRevision-pinned LocAgent, Agentless, CoSIL, OrcaLoca and RepoNavigator contracts; compatibility does not imply reproduced paper scores
SWE-Explore validation1,020/1,020 real-output metric cells match the pinned official evaluator on a fixed 20-case run
DGX Spark deploymentLocal Wiki, CodeGraph and model serving on GB10; a deployment guide, not a token-saving benchmark

Documentation and community

Documentation · Architecture · Contributing · CI and testing · Changelog · Discord

CodeNib is in beta; public interfaces may change before a stable release. Historical research artifacts retain their published dataset identifiers.

Citation

If you use CodeNib in your research, please cite our arXiv paper:

bibtex
@misc{yu2026codenibmultiviewdataserving,      title={CodeNib: A Multi-View Data System for Serving Repository Context to Coding Agents},      author={Zhongming Yu and Hengjia Yu and Boqin Yuan and Shuting Zhao and Yizhao Chen and Aryan Dokania and Mihir Jagtap and Jiayu Chang and Yitong Ma and Yash Jayswal and Wentao Ni and Hejia Zhang and Zhaoling Chen and Gangda Deng and Jishen Zhao},      year={2026},      eprint={2607.25431},      archivePrefix={arXiv},      primaryClass={cs.SE},      url={https://arxiv.org/abs/2607.25431},}

CodeNib is licensed under Apache 2.0.

来源:README.md,提交 35f2fea

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:服务器未能启动。

版本历史

3
  1. v0.2.5最新Nov 4, 2026
  2. v0.2.4Sep 27, 2026
  3. v0.2.3Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分