Optave's `ops-codegraph-tool` is a new CLI that creates and maintains a function-level dependency graph for entire codebases. It supports 11 programming languages and uses native Rust or WASM for parsing, storing the graph in SQLite. The tool offers several functionalities:
* **MCP Server Integration:** Provides a server for AI agents to query the code graph directly, consolidating what would typically require multiple `grep`, `find`, or `cat` invocations into a single call. * **CLI for Developers:** Allows developers and AI agents to explore, query, and audit code from the terminal. * **CI Quality Gates:** Includes `check` and `manifesto` commands to enforce quality thresholds within continuous integration pipelines. * **Programmatic API:** Offers an `npm install` option for embedding `codegraph` into other tools.
The tool aims to mitigate common issues faced by AI agents, such as modifying functions without understanding their impact, misinterpreting helper functions, or leaving dead code. By providing structural context, it helps identify potential problems like dead exports, circular dependencies, and architectural boundary violations during development rather than during code review. The project emphasizes privacy and security, operating entirely locally without network calls or telemetry, and requiring no API keys. Users can integrate their own LLM providers, ensuring code data remains under their control.