How sysevol-ai/codenib works
CodeNib helps coding agents locate relevant repository code and navigate typed symbol relationships; it also generates citation-backed repository Wikis for people to browse. The principal workflow is local repository setup and indexing, followed by agent queries through MCP for bounded source context and graph navigation. Separate capabilities include Wiki generation and publication, and an optional model-backed grep-to-Jev retrieval route. The README documents these product paths; sampled excerpts confirm the retrieval pipeline, multimodal Wiki construction, Wiki storage boundary, and web/API surfaces, but do not expose all runtime wiring.
Main entry points: tools MCP tools · index_compiler.py Index compiler · builder.py Wiki generation · app.py Wiki and graph API
Components 20
Repository indexing
- CodeNib CLI
codenib/cli.py - Index compiler
codenib/compiler/index_compiler.py - Code chunkers
codenib/code_chunking - Typed symbol graph
codenib/graph/code_graph.py - Search indexes
codenib/index
Search and navigation
- Context retrieval
codenib/model/retrieve_rerank_pipeline.py - Graph retrieval
codenib/model/graph_retrieve_pipeline.py - LSP navigation
codenib/ls_router.py - Source context
codenib/context_delivery.py
Agent access
- MCP server
codenib/mcp/server.py - MCP tools
codenib/mcp/tools - Agent integrations
codenib/clients
Wiki and browsing
- Wiki generation
codenib/wiki/builder.py - Multimodal knowledge
codenib/wiki/media_pipeline.py - Wiki storage
codenib/wiki/sqlite_store.py - Wiki and graph API
codenib/web/app.py - Web interface
web/src/main.tsx
Optional methods
- Grep-to-Jev route
codenib/agent/runtime/grep_jev.py - Remote model provider
Other components
- Developer / agent
Connections 22
- Developer / agent → CodeNib CLI: sets up
- CodeNib CLI → Index compiler: builds indexes
- Index compiler → Code chunkers: chunks source
- Index compiler → Typed symbol graph: builds graph
- Index compiler → Search indexes: builds views
- Developer / agent → MCP server: queries
- Agent integrations → MCP server: connect
- MCP server → MCP tools: dispatches tools
- MCP tools → Context retrieval: retrieves context
- MCP tools → Graph retrieval: searches graph
- MCP tools → LSP navigation: routes navigation
- Context retrieval → Search indexes: searches
- Graph retrieval → Typed symbol graph: expands candidates
- MCP tools → Source context: returns citations
- Developer / agent → Wiki generation: requests Wiki
- Wiki generation → Wiki storage: stores pages
- Wiki generation → Multimodal knowledge: builds media knowledge
- Developer / agent → Wiki and graph API: browses
- Wiki and graph API → Wiki storage: reads Wiki
- Wiki and graph API → Web interface: serves data
- Developer / agent → Grep-to-Jev route: opts into
- Grep-to-Jev route → Remote model provider: plans and reranks