CodeGraphContext  by Shashankss1205

Code context engine for AI assistants

Created 4 months ago
323 stars

Top 84.3% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

CodeGraphContext indexes local codebases into a Neo4j graph database, providing AI assistants with rich contextual understanding. It targets developers and researchers seeking advanced static analysis, code visualization, and AI-powered code comprehension tools. The primary benefit is enabling deeper insights into code structure and relationships.

How It Works

The project analyzes source code using tree-sitter to construct a knowledge graph within Neo4j. It leverages watchdog for real-time file change detection and graph updates. This approach facilitates sophisticated queries for code relationships (callers, callees, hierarchies) and provides a dynamic, context-aware foundation for AI assistants.

Quick Start & Requirements

Installation is via pip: pip install codegraphcontext. Key dependencies include Neo4j (>=5.15.0), Python, watchdog, typer, and tree-sitter. An interactive setup wizard (cgc setup) guides users through configuring Neo4j (local Docker recommended, Linux binary, or hosted) and integrating with IDEs/CLIs like VS Code, Cursor, Claude, and Gemini. A post-installation PATH fix script may be necessary for the cgc command.

Highlighted Details

  • Comprehensive code indexing and relationship analysis (callers, callees, inheritance, call chains).
  • Real-time graph updates via file system watching.
  • Interactive setup wizard simplifies database and IDE/CLI configuration.
  • Broad integration support for popular AI assistants and development environments.
  • Features for identifying dead code and calculating cyclomatic complexity.

Maintenance & Community

The project is authored by Shashank Shekhar Singh. Specific community channels (e.g., Discord, Slack) or a public roadmap are not detailed in the provided README snippet.

Licensing & Compatibility

CodeGraphContext is released under the MIT License. This license is permissive, generally allowing for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

With a version number of 0.1.17, the project appears to be in an early development stage. Users may need to run a provided script to ensure the cgc command is accessible in their environment. The complexity of setting up the Neo4j backend can vary based on the chosen method.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
33
Issues (30d)
82
Star History
116 stars in the last 30 days

Explore Similar Projects

Starred by Alex Yu Alex Yu(Research Scientist at OpenAI; Cofounder of Luma AI), Will Brown Will Brown(Research Lead at Prime Intellect), and
7 more.

avante.nvim by yetone

0.4%
17k
Neovim plugin emulating Cursor AI IDE for AI-driven code assistance
Created 1 year ago
Updated 2 days ago
Feedback? Help us improve.