Hysen Labs
Open-source project
sysevol-ai/CodeNib avatar
sysevol-ai

CodeNib

A multi-view data system for serving repository context to coding agents.

84 stars3 forksPythonApache-2.0
DEEP OPEN-SOURCE ANALYSIS

A multi-view data system for coding agent context

CodeNib is an Apache-2.0 Python system that turns any repository into a searchable wiki and an MCP server that serves verified context to coding agents.

What CodeNib builds from a repository

CodeNib presents itself as a multi-view data system for serving repository context to coding agents. The README leads with a single command, codenib codegraph init pointed at a repository, that detects the repository languages, installs the pinned package-level graph providers it can manage, builds a BM25 index plus a source-linked symbol graph, and registers the resulting MCP server with installed Codex and Claude Code clients. The project states it is local, open source, requires no model or cloud, and does not write configuration or indexes into the target repository. The architecture is described as four layers. A view compiler chunks source and materializes BM25, dense, graph, and navigation views while reusing current artifacts and rebuilding only affected views atomically. A view manifest records repository identity, source fingerprint, builder profile, capabilities, status, and artifact location for each view. A context serving layer executes lexical, semantic, hybrid, reranked, and structural query plans while preserving repository-relative source locations. An agent runtime exposes capability-aware MCP and LSP-shaped tools, assembles bounded evidence, and returns citations that agents and humans can inspect. The framing is that context should be sourced and verified, not guessed. The documented command flow keeps the target repository untouched, which matters for safety because the index and client configuration never land inside the project being analyzed.

How retrieval and reuse work

The README explains that on a later commit CodeNib reuses views whose source and builder identities are still current, which avoids rebuilding the whole index for small changes. A requested view affected by source or policy changes currently rebuilds in an isolated generation, and file and symbol level delta repair remains disabled until it can use the same pinned source authority. The retrieval surface covers BM25, dense-vector, regex or trigram, Zoekt, fusion, and reranking paths, with a validated model matrix referenced in the docs. Structural context comes from SCIP and LSP backed symbol graphs with source locations and typed edges. The MCP and LSP-shaped tools serve one manifest to coding agents without tying the runtime to one agent framework, and the README lists compatibility with revision-pinned external contracts such as LocAgent, Agentless, CoSIL, and OrcaLoca, plus a published jump contract over SCIP and LSP definition signals. The toolchain install and doctor commands manage only the detected languages' package-level providers, while operating system and project prerequisites remain explicit. The README also describes exclusion options, where repositories can persist exact root-relative subtree exclusions so generated or vendored content is not indexed, using POSIX spelling and repeated exclude-dir flags rather than globs. The retrieval surface also covers BM25, dense vector, regex, Zoekt, fusion, and reranking paths, and the docs reference a validated model matrix that records which combinations the project has tested.

Serving agents and shipping a wiki

The recommended serving path configures installed Codex and Claude Code clients through their native command line interfaces by running the init command, then asks the agent to start with explore_context for bounded, source-verified repository context and dependency_subgraph for caller impact or callee dependencies. The MCP server also exposes ranked BM25, regex, definition, reference, route, and bounded source-read tools. For Python agents the same planner is available directly through a RepositoryContextExplorer that is opened from a repository with a policy and returns results that include source-validated evidence plus the selected plan, capabilities, loaded views, fusion, graph, and reranking trace. Beyond live agents, CodeNib can export an indexed commit as a serverless wiki containing a versioned provenance manifest, precomputed wiki pages, source citations, and page-level dependency data, with no provider credential included. A repository-hosted wiki path ships a reusable GitHub workflow that builds or reuses the same manifest, deploys the static site to Pages, and uploads the matching commit-addressed context artifact. The default semantic route builds BM25 and vector views with a cached local Hugging Face model and needs no API token, while a fast route avoids the model download and a bring-your-own OpenAI-compatible endpoint can replace local embedding. The repository-hosted wiki path ships a reusable GitHub workflow that builds or reuses the same manifest and deploys the static site to Pages with the matching context artifact.

Editorial conclusion

CodeNib is distributed under the Apache-2.0 license, is written in Python, and was last updated on GitHub on 2026-08-24 with 84 stars recorded at the time of the snapshot.

DEEP OPEN-SOURCE ANALYSIS

Official sources

Community notes

Community notes