# Query your code repository with artificial intelligence

Code-graph-rag combines knowledge graphs and fetch-assisted generation (RAG) to understand and query complex structures in large code repositories. It allows developers to analyze and edit code bases in different languages ​​with the help of artificial intelligence.

- ★ 4,924
- Python
- GitHub Trending · 2026-08-10

## What you get
- See complex relationships by turning the codebase into a knowledge graph
- Get answers about code structure by asking questions in natural language
- Make precise changes to code with structured search and editing tools

## Installation
**Installation with package manager**

```
uv tool install "code-graph-rag[treesitter-full,semantic]"
```

**Alternative installation method**

```
pipx install "code-graph-rag[treesitter-full,semantic]"
```


## Running it
**Starting the database**

```
cgr daemon up
```

**Analyze and query the warehouse**

```
cgr start --repo-path /path/to/repo --update-graph
```


## If you don't write code
Analyze my code repository using the Code-Graph-RAG tool. Answer my questions using relationships between functions, classes, and modules in your code base. Suggest changes or optimizations I should make to the code using the structural analysis capabilities provided by the tool.

## Related dictionary terms

## Links
- GitHub repository →
- Read in Turkish →

---
Source: TreScout Discover · https://trescout.com/en/discover/code-graph-rag/
