{
  "markdown": "<!--\nSPDX-FileCopyrightText: 2025-2026 CodeNib Contributors\n\nSPDX-License-Identifier: Apache-2.0\n-->\n<!-- mcp-name: ai.codenib/codenib -->\n\n<div align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/sysevol-ai/CodeNib/main/assets/codenib_logo.svg\" alt=\"CodeNib\" width=\"560\">\n  <h1>Searchable codebase wikis and context for coding agents</h1>\n  <p>\n    Point it at any repo, get a searchable Wiki and an MCP server for your coding agent.\n  </p>\n  <p>\n    <a href=\"https://arxiv.org/abs/2607.25431\"><img src=\"https://img.shields.io/badge/arXiv-2607.25431-b31b1b.svg?logo=arxiv&amp;logoColor=white\" alt=\"arXiv 2607.25431\"></a>\n    <a href=\"https://huggingface.co/papers/2607.25431\"><img src=\"https://img.shields.io/badge/Hugging_Face-%232_Paper_of_the_Day-FFD21E.svg?logo=huggingface&amp;logoColor=black\" alt=\"Hugging Face: #2 Paper of the Day\"></a>\n  </p>\n  <p>\n    <a href=\"#quickstart\">Quickstart</a>\n    &nbsp;&middot;&nbsp;\n    <a href=\"https://codenib.ai\">Website</a>\n    &nbsp;&middot;&nbsp;\n    <a href=\"https://discord.gg/ySer6CGn4\">Discord</a>\n    &nbsp;&middot;&nbsp;\n    <a href=\"https://docs.codenib.ai/\">Documentation</a>\n    &nbsp;&middot;&nbsp;\n    <a href=\"https://docs.codenib.ai/news/\">News</a>\n    &nbsp;&middot;&nbsp;\n    <a href=\"https://docs.codenib.ai/codegraph/\">CodeGraph</a>\n    &nbsp;&middot;&nbsp;\n    <a href=\"https://docs.codenib.ai/mcp/\">MCP</a>\n    &nbsp;&middot;&nbsp;\n    <a href=\"https://docs.codenib.ai/agent_integrations/\">Agent Integrations</a>\n    &nbsp;&middot;&nbsp;\n    <a href=\"https://docs.codenib.ai/language_capabilities/\">Languages</a>\n  </p>\n  <p>\n    <a href=\"https://github.com/sysevol-ai/CodeNib/actions/workflows/ci-full.yml\"><img src=\"https://github.com/sysevol-ai/CodeNib/actions/workflows/ci-full.yml/badge.svg\" alt=\"CI\"></a>\n    <a href=\"https://pypi.org/project/codenib/\"><img src=\"https://img.shields.io/pypi/v/codenib.svg?cacheSeconds=300\" alt=\"PyPI version\"></a>\n    <a href=\"https://docs.codenib.ai/codegraph/#one-command-setup\"><img src=\"https://img.shields.io/badge/Claude_Code-D97757?logo=claude&amp;logoColor=fff\" alt=\"Claude Code supported\"></a>\n    <a href=\"https://docs.codenib.ai/codegraph/#one-command-setup\"><img src=\"https://img.shields.io/badge/Codex-000?logo=openai&amp;logoColor=fff\" alt=\"Codex supported\"></a>\n    <a href=\"https://github.com/sysevol-ai/CodeNib/blob/main/LICENSE\"><img src=\"https://img.shields.io/badge/License-Apache_2.0-blue.svg\" alt=\"License: Apache 2.0\"></a>\n    <a href=\"https://github.com/sysevol-ai/CodeNib/blob/main/pyproject.toml\"><img src=\"https://img.shields.io/badge/Python-3.10%2B-3776AB.svg\" alt=\"Python 3.10+\"></a>\n  </p>\n</div>\n\n```bash\npython -m pip install \"codenib[graph,mcp]\"\ncodenib codegraph init /path/to/your/repo\n```\n\nThat one command detects the repository languages, installs the pinned\npackage-level graph providers it can manage, builds BM25 plus a source-linked\nsymbol graph, and registers the resulting MCP server with installed Codex and\nClaude Code clients. It is local, open source, requires no model or cloud, and\ndoes not write configuration or indexes into the target repository.\n\n## System Architecture\n\n| Layer | Responsibility |\n|---|---|\n| View compiler | Chunk source and materialize BM25, dense, graph, and navigation views; reuse current artifacts and atomically rebuild affected views |\n| View manifest | Record repository identity, source fingerprint, builder profile, capabilities, status, and artifact location independently for each view |\n| Context serving | Execute lexical, semantic, hybrid, reranked, and structural query plans while preserving repository-relative source locations |\n| Agent runtime | Expose capability-aware MCP and LSP-shaped tools, assemble bounded evidence, and return citations that agents and humans can inspect |\n\n```text\nrepository change\n  -> reuse current views or rebuild affected views\n  -> publish a capability-bearing manifest\n  -> plan repository queries\n  -> deliver bounded, source-linked context\n```\n\nOn a later commit, CodeNib reuses views whose source and builder identities are\nstill current. A requested view affected by source or policy changes currently\nrebuilds in an isolated generation; file- and symbol-level delta repair remains\ndisabled until it can use the same pinned source authority.\n\n## Quickstart\n\nRequires Python 3.10+ and Git. For an agent-ready CodeGraph with no model or API\nkey, install the graph and MCP extras and run one command:\n\n```bash\npython -m pip install \"codenib[graph,mcp]\"\ncodenib codegraph init /path/to/repository\n```\n\n`codegraph init` detects Codex and Claude Code, installs only the detected\nlanguages' package-managed providers, builds reusable `bm25` and\n`symbol_graph` views, and asks each native client CLI to own its configuration.\nRun `codenib codegraph status /path/to/repository` to diagnose the complete\npath or `codenib codegraph uninstall /path/to/repository` to remove only the\nmanaged client registrations. The index remains reusable.\n\nRepositories can persist exact root-relative subtree exclusions when generated\nor vendored content should not be indexed:\n\n```bash\ncodenib codegraph init /path/to/repository \\\n  --exclude-dir ios/Pods \\\n  --exclude-dir generated/api\n```\n\nPaths use repository-relative POSIX spelling (`/`) and name exact subtrees,\nnot globs. Repeat `--exclude-dir` to replace the complete custom exclusion set. Later\n`init` and `index` runs reuse that policy from the manifest; use\n`--clear-exclude-dirs` to return to the default source surface. CodeNib does not\nimplicitly treat `.gitignore` as an indexing policy, because tracked and local\nignored source can still be intentional input.\n\nZoekt supports the default source policy only when its fixed commit tree\nexactly matches the authenticated checkout and contains no tracked path that\nthe default policy excludes. It does not currently support a non-empty custom\nexclusion set. A command that explicitly requests the `zoekt` view, including\n`--preset full`, fails closed when either condition is unmet; use the\nCodeGraph, `fast`, or semantic paths instead. Authenticated MCP serving for\nZoekt currently requires Linux `/proc`; see the\n[source-surface boundaries](https://docs.codenib.ai/codegraph/#select-the-repository-source-surface).\n\nFor a browser Wiki with hybrid BM25+dense retrieval, install the semantic extra:\n\n```bash\npython -m pip install \"codenib[semantic]\"\ncodenib wiki /path/to/repository\n```\n\nBoth paths keep reusable state under `~/.codenib/repositories` and leave the\ntarget checkout unchanged. Set `CODENIB_HOME` to relocate state.\n\nPreview the CodeGraph operations without installing, indexing, or configuring\nan agent:\n\n```bash\ncodenib codegraph init /path/to/repository --dry-run\n```\n\nFor a structural view, CodeNib detects the repository languages and manages\nonly their package-level providers; operating-system and project prerequisites\nremain explicit:\n\n```bash\npython -m pip install \"codenib[graph]\"\ncodenib toolchain install /path/to/repository --scope graph\ncodenib doctor /path/to/repository --require graph\n```\n\nExport that indexed commit as a serverless Wiki when a live Ask backend is not\nneeded:\n\n```bash\ncodenib export /path/to/repository --output /tmp/repository-wiki\n```\n\nThe export contains a versioned provenance manifest, precomputed Wiki pages,\nsource citations, and available page-level dependency data. It contains no\nprovider credential; interactive Ask and runtime graph exploration remain on\nthe local or MCP serving path.\n\nFor a repository-hosted Wiki, CodeNib also ships a reusable GitHub workflow\nthat builds or reuses the same manifest, deploys the static site to Pages,\nand uploads the matching commit-addressed context artifact. Its default\n`semantic` route builds BM25 and vector views with a cached local Hugging Face\nmodel and needs no API key. An explicit `fast` route avoids the model download;\na BYO OpenAI-compatible endpoint can replace local embedding. Query-time search\nremains in the local or MCP runtime. See\n[GitHub Pages](https://docs.codenib.ai/github_pages/).\nThe published BM25/vector artifact can then be verified against an exact local\ncheckout and served through MCP without rebuilding the repository views.\n\nSee the\n[Quickstart](https://docs.codenib.ai/quickstart/)\nfor ports, advanced indexing, and troubleshooting.\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/sysevol-ai/CodeNib/main/assets/codenib_wiki.png\" alt=\"CodeNib Wiki showing the source-linked reverse proxy guide for Caddy\" width=\"100%\">\n</p>\n\n## Serve An Agent\n\nThe recommended path configures installed Codex and Claude Code clients through\ntheir native CLIs:\n\n```bash\npython -m pip install \"codenib[graph,mcp]\"\ncodenib codegraph init /path/to/repository\n```\n\nAsk the agent to start with `explore_context` for bounded, source-verified\nrepository context and use `dependency_subgraph` for caller impact or callee\ndependencies. The MCP server also exposes ranked BM25, regex, definition,\nreference, route, and bounded source-read tools. See the\n[CodeGraph guide](https://docs.codenib.ai/codegraph/) for client scopes,\ndiagnostics, uninstall behavior, and language prerequisites, and the\n[MCP Server](https://docs.codenib.ai/mcp/) for the complete tool contract.\n\nThe same planner is available directly to Python agents:\n\n```python\nfrom codenib.agent import RepositoryContextExplorer\n\nwith RepositoryContextExplorer.from_repository(\n    \"/path/to/repository\", policy=\"auto\"\n) as explorer:\n    result = explorer.explore(\"where is request retry behavior implemented?\", top_k=10)\n```\n\nEach result includes source-validated evidence plus the selected plan,\ncapabilities, loaded views, fusion, graph, and reranking trace.\n\n## What CodeNib Provides\n\n| Surface | Purpose |\n|---|---|\n| View compiler | Build independently managed views, reuse current generations, and atomically rebuild changed views under one source identity |\n| Agent context runtime | Plan capability-aware retrieval and navigation, then assemble bounded source-linked evidence |\n| Retrieval | BM25, dense-vector, regex/trigram, Zoekt, fusion, and reranking paths; see the [validated model matrix](https://docs.codenib.ai/rag_ops/#validated-models) |\n| Structural context | SCIP/LSP-backed symbol graphs with source locations and typed edges |\n| MCP and LSP-shaped tools | Serve one manifest to coding agents without tying the runtime to one agent framework |\n| Agent compatibility | Reuse one manifest across revision-pinned [LocAgent](https://github.com/gersteinlab/LocAgent), [Agentless](https://github.com/OpenAutoCoder/Agentless), [CoSIL](https://github.com/ZhonghaoJiang/CoSIL), and [OrcaLoca](https://github.com/fishmingyu/OrcaLoca) contracts, plus the published [RepoNavigator](https://arxiv.org/abs/2512.20957v6) `jump` contract over SCIP/LSP definition signals; see the [support matrix](https://docs.codenib.ai/agent_integrations/) |\n| Benchmark compatibility | Evaluate native exploration against pinned external datasets and scorers, including [SWE-Explore](https://github.com/Qiushao-E/SWE-Explore-Bench); see the [dataset and benchmark matrix](https://docs.codenib.ai/evaluation/) |\n| Local inspection | Audit the same context through Wiki pages, Ask answers, citations, and the Dependency Map |\n| Evaluation harness | Measure retrieval, navigation, incremental maintenance, and context policies on the same artifacts |\n\nLanguage support varies by surface. The generated\n[capability matrix](https://docs.codenib.ai/language_capabilities/)\nrecords chunking, graph, incremental, and C++ decoder support.\n\n## Documentation\n\n- [Quickstart](https://docs.codenib.ai/quickstart/)\n- [GitHub Pages](https://docs.codenib.ai/github_pages/)\n- [MCP Server](https://docs.codenib.ai/mcp/)\n- [Agent Integrations](https://docs.codenib.ai/agent_integrations/)\n- [RAG Models and Planner](https://docs.codenib.ai/rag_ops/)\n- [Benchmarks and Evaluation](https://docs.codenib.ai/evaluation/)\n- [Web UI](https://docs.codenib.ai/web_demo/)\n- [Language Capabilities](https://docs.codenib.ai/language_capabilities/)\n- [Concepts and development guides](https://docs.codenib.ai/)\n\nBuild the documentation site locally with:\n\n```bash\npython -m pip install -e \".[dev]\"\nmkdocs serve\n```\n\n## Development\n\n```bash\ngit clone https://github.com/sysevol-ai/CodeNib.git\ncd CodeNib\nmake dev\nmake test\n```\n\nThe test suite is split into unit, integration, serial integration, core,\ngraph-consumer, and slow tiers. See\n[CI/CD](https://docs.codenib.ai/ci_cd/) before\nrunning the credential- or toolchain-dependent tiers.\n\n## Status\n\nCodeNib is currently in beta. The CLI and manifest format are usable, but\npublic interfaces may still change before a stable release. Historical\nresearch artifacts retain their published dataset identifiers; the maintained\npackage, import namespace, commands, and repository use `CodeNib`. See\n[Naming](https://docs.codenib.ai/branding/).\n\n## Citation\n\nIf you use CodeNib in your research, please cite our\n[arXiv paper](https://arxiv.org/abs/2607.25431):\n\n```bibtex\n@misc{yu2026codenibmultiviewdataserving,\n      title={CodeNib: A Multi-View Data System for Serving Repository Context to Coding Agents},\n      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},\n      year={2026},\n      eprint={2607.25431},\n      archivePrefix={arXiv},\n      primaryClass={cs.SE},\n      url={https://arxiv.org/abs/2607.25431},\n}\n```\n\n## Project\n\n[Website](https://codenib.ai)\n&nbsp;&middot;&nbsp;\n[Releases](https://github.com/sysevol-ai/CodeNib/releases)\n&nbsp;&middot;&nbsp;\n[Changelog](https://github.com/sysevol-ai/CodeNib/blob/main/CHANGELOG.md)\n&nbsp;&middot;&nbsp;\n[Contributing](https://github.com/sysevol-ai/CodeNib/blob/main/CONTRIBUTING.md)\n\n## License\n\nCodeNib is licensed under the\n[Apache License, Version 2.0](https://github.com/sysevol-ai/CodeNib/blob/main/LICENSE).\n",
  "bytes": 13996,
  "sha": "142bfdac5abe4e24dc353526a155709f46ccd87c600d9a192d2220a4f32a5b84",
  "repo_slug": "sysevol-ai/codenib",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_ai_codenib_codenib_209e0514/readme"
}