This guide explains how to set up CodeGraphContext on Windows.
- FalkorDB Lite (redislite) is not supported natively on Windows
- Recommended approach: Use WSL (Windows Subsystem for Linux)
- Alternative: Use Neo4j as the database backend
WSL allows you to run CodeGraphContext in a Linux environment on Windows, enabling FalkorDB Lite and ensuring the smoothest setup experience.
Open PowerShell as Administrator and run:
wsl --installRestart your system if prompted.
Verify WSL installation:
wsl --versionAfter restart:
- Open the Start Menu
- Search for Ubuntu
- Open it
Update packages:
sudo apt update
sudo apt upgrade -yInside the WSL terminal:
sudo apt install python3.12 python3-pip -yVerify installation:
python3 --version
pip3 --versionCodeGraphContext supports Python 3.10 – 3.14. FalkorDB Lite works best with Python 3.12+.
pip install codegraphcontextVerify installation:
cgc --helpNavigate to your project directory.
Example (accessing Windows files from WSL):
cd /mnt/c/Users/<yourname>/Desktop/<your-project-folder>Index the codebase:
cgc index .To automatically update the graph when files change:
cgc watch .To use CodeGraphContext as an MCP server for AI assistants/IDEs:
cgc mcp setupStart the MCP server:
cgc mcp startIf you do not want WSL, CodeGraphContext can be configured to use Neo4j as its database backend.
Download Python from: https://www.python.org/downloads/
During installation, ensure: ✅ Add Python to PATH
Verify:
python --version
pip --versionpip install codegraphcontextVerify:
cgc --helpNeo4j can be installed using one of the following:
- Neo4j Desktop (GUI)
- Neo4j via Docker (recommended)
- Neo4j AuraDB (cloud)
Ensure Neo4j is running and note:
- URI (example:
bolt://localhost:7687) - Username
- Password
Run:
cgc neo4j setupFollow the prompts to enter your Neo4j credentials.
Navigate to your project:
cd path\to\your\projectIndex the codebase:
cgc index .To ignore files and folders while indexing, create a .cgcignore file in your project root.
Example .cgcignore:
/build/
/dist/
/node_modules/
/vendor/
*.log- Restart your terminal after installation
- Ensure Python Scripts directory is in PATH
- Try:
python -m pip install codegraphcontext
Windows drives can be accessed from WSL using:
cd /mnt/c/- Ensure Neo4j is running
- Check URI format:
bolt://localhost:7687 - Double-check username/password
Run:
cgc listIf no errors are shown, setup is complete