Skip to main content
CodeNib

A Multi-View Data System for Serving Repository Context to Coding Agents

Incremental compilation, explicit per-view manifests, and agent-native context serving.

Quickstart  ·  Website  ·  Discord  ·  Documentation  ·  MCP  ·  Languages

CI License: Apache 2.0 Python 3.10+ Developer Preview

CodeNib is a multi-view data system for serving repository context to coding agents. Its native runtime compiles a checkout into manifest-linked lexical, semantic, structural, and static-navigation views, incrementally maintains supported transitions, and serves bounded source evidence through MCP, LSP-shaped providers, Python, and HTTP APIs.

The Wiki, Ask view, and Dependency Map are inspection clients of that same runtime, not the system boundary. The core implementation lives in CodeNib; optional model endpoints and language servers are providers rather than a host agent or code-Wiki framework.

System Architecture

Layer Responsibility
Incremental compiler Chunk source and materialize BM25, dense, graph, and navigation views; reuse or repair supported artifacts and rebuild when an update cannot be admitted
View manifest Record repository identity, source fingerprint, builder profile, capabilities, status, and artifact location independently for each view
Context serving Execute lexical, semantic, hybrid, reranked, and structural query plans while preserving repository-relative source locations
Agent runtime Expose capability-aware MCP and LSP-shaped tools, assemble bounded evidence, and return citations that agents and humans can inspect
repository change
  -> materialize or repair affected views
  -> publish a capability-bearing manifest
  -> plan repository queries
  -> deliver bounded, source-linked context

On a later commit, CodeNib can reuse unchanged vector content and patch supported graph transitions at file or symbol granularity. Unsupported, inconsistent, or unverified transitions fall back to a fresh build instead of publishing a partially updated view.

Quickstart

Requires Python 3.10+ and Git.

pip install codenib
codenib wiki /path/to/repository

CodeNib detects the repository languages, builds a reusable index under ~/.codenib/repositories, launches the local Wiki, and opens http://localhost:3000. The wheel includes the production Wiki frontend, so normal use does not require Node.js or npm and the target repository stays untouched. This command exercises the same compiler and serving runtime used by agents. Set CODENIB_HOME to relocate state.

Check the environment or index without opening the Wiki:

codenib doctor --require core --require wiki
codenib index /path/to/repository

See the Quickstart for ports, advanced indexing, and troubleshooting.

CodeNib Wiki showing the source-linked reverse proxy guide for Caddy

Serve An Agent

Install the MCP extra, build once, and serve the same repository manifest over stdio:

pip install "codenib[mcp]"
codenib index /path/to/repository
codenib mcp /path/to/repository

The MCP server advertises its full tool set and uses the compiled manifest to decide which calls have a fresh backing view. An agent can therefore reuse available repository work instead of rebuilding context through unbounded grep and read loops, while unavailable searches fail explicitly. BM25, semantic, regex, Zoekt, dependency, and static-navigation results retain source locations for follow-up reads and citations. See MCP Server for client configuration and tool contracts.

What CodeNib Provides

Surface Purpose
Incremental compiler Build independently managed views, reuse unchanged content, repair supported transitions, and conservatively rebuild outside those boundaries
Agent context runtime Plan capability-aware retrieval and navigation, then assemble bounded source-linked evidence
Retrieval BM25, dense-vector, regex/trigram, Zoekt, fusion, and reranking paths
Structural context SCIP/LSP-backed symbol graphs with source locations and typed edges
MCP and LSP-shaped tools Serve one manifest to coding agents without tying the runtime to one agent framework
Local inspection Audit the same context through Wiki pages, Ask answers, citations, and the Dependency Map
Evaluation harness Measure retrieval, navigation, incremental maintenance, and context policies on the same artifacts

Language support varies by surface. The generated capability matrix records chunking, graph, incremental, and C++ decoder support.

Documentation

Build the documentation site locally with:

pip install "codenib[dev]"
mkdocs serve

Development

git clone https://github.com/sysevol-ai/CodeNib.git
cd CodeNib
make dev
make test

The test suite is split into unit, integration, serial integration, core, graph-consumer, and slow tiers. See CI/CD before running the credential- or toolchain-dependent tiers.

Status

CodeNib 0.1.0 is a developer preview. The CLI and manifest format are usable, but public interfaces may still change before a stable release. Historical research artifacts retain their published dataset identifiers; the maintained package, import namespace, commands, and repository use CodeNib. See Naming.

Citation

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

@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},
}

Project

Website  ·  Changelog  ·  Contributing

License

CodeNib is licensed under the Apache License, Version 2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codenib-0.1.0.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codenib-0.1.0-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file codenib-0.1.0.tar.gz.

File metadata

  • Download URL: codenib-0.1.0.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for codenib-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8aabf0b48bd669d7ec204960a7ee91f315857f7fda1ba890f0398ae57a06d4da
MD5 d64824dac8e06572936db47032326717
BLAKE2b-256 35b3fa2dde26f19249e865d0e2cbe17de660be5fd6fab162e8ac2053bd112628

See more details on using hashes here.

File details

Details for the file codenib-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: codenib-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for codenib-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 168a392d137ff1d7cb4cacea41855b588f674cf3256df4cfaab0765864ae1481
MD5 b4a7a451bef36239ece36584b12c2b3b
BLAKE2b-256 3803c454586bb60a1e0f8f4a5cd394c3e62a5389df3c5b5cec1a2bb7e4cf19c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page