Key Features
Supported Languages
Code-Graph currently supports the following languages:- Python (
.py) - Java (
.java) - C# (
.cs)
Running with Docker
Clone the Code-Graph repository and navigate into it:Using Docker Compose
Using Docker directly
Start a FalkorDB instance:Running Locally
Prerequisites
- Python
>=3.12,<3.14 - Node.js 20+
uv- A FalkorDB instance (local or FalkorDB Cloud)
1. Start FalkorDB
Option A: Free cloud instance at app.falkordb.cloud Option B: Run locally with Docker:2. Configure environment variables
The chat endpoint also requires the provider credential for your chosen
MODEL_NAME. The default model is Gemini, so set GEMINI_API_KEY unless you use a different LiteLLM provider.
3. Install dependencies
4. Run the app
Backend + frontend (development):http://localhost:3000 and proxies /api/* requests to http://127.0.0.1:5000.
Single-process production build:
CLI Tool (cgraph)
Code-Graph includes a CLI tool for indexing codebases and querying the knowledge graph from the terminal.
Install
Usage
cgraph --help for full details.
Creating a Code Graph
Analyze a local folder
Analyze a Git repository
List indexed repositories
Note: IfSECRET_TOKENis set andCODE_GRAPH_PUBLICis not enabled (1), add-H "Authorization: Bearer <YOUR_SECRET_TOKEN>"to the request.
GraphRAG Chat
Use the built-in chat interface to ask natural-language questions about your codebase. Code-Graph translates your questions into graph queries and returns contextual answers powered by LiteLLM and FalkorDB GraphRAG.
API Endpoints
Read endpoints
Mutating endpoints
Authentication
Resources
Frequently Asked Questions
What is Code-Graph?
What is Code-Graph?
Code-Graph is a FalkorDB-powered tool that indexes source code repositories into a knowledge graph. It provides an interactive web UI and CLI for exploring code structure, querying relationships between entities, and chatting with your codebase using GraphRAG.
Which programming languages does Code-Graph support?
Which programming languages does Code-Graph support?
Code-Graph currently supports Python (
.py), Java (.java), and C# (.cs). It analyzes classes, functions, files, and their relationships (calls, imports, inherits).Can I ask questions about my codebase in natural language?
Can I ask questions about my codebase in natural language?
Yes. Code-Graph includes a GraphRAG chat feature powered by LiteLLM that lets you ask natural-language questions about your code. It translates your questions into graph queries and returns contextual answers about dependencies, structure, and relationships.
How do I index a repository using the CLI?
How do I index a repository using the CLI?
Install with
pip install falkordb-code-graph or pipx install falkordb-code-graph, then run cgraph index . --ignore node_modules --ignore .git for a local project, or cgraph index-repo https://github.com/user/repo for a remote repository.Do I need authentication to use Code-Graph?
Do I need authentication to use Code-Graph?
Authentication depends on your configuration. Set
SECRET_TOKEN to require Bearer token auth on mutating endpoints. Set CODE_GRAPH_PUBLIC=1 to allow read-only access without auth. When no token is configured, requests are accepted without authorization.