Code graph
Every file, symbol and call in the project, indexed automatically, so the agent asks who calls what instead of searching.
KodaCode indexes every project that it opens:
- files, functions and types
- who calls what
- which tests reach which code
- the database schema that the code uses
The index updates as files change. You do not need to set anything up.
What the agent gets
The agent uses its query_code_graph tool first for almost any question, and before an edit. One query returns the source of the relevant symbols and the call path between them. The agent does not search file by file. The tool also answers schema questions: an overview, one table, or how to join two tables.
A turn that names code starts with that code already found. A review brief carries the source of the changed functions.
The graph screen
Open it with /graph or ⇧⌘G:
| View | Key | Shows |
|---|---|---|
| Symbol | s | A symbol, its callers and callees |
| Flow | f | A path through the code, stepped with ← → |
| Files | o | Files and how they depend on each other |
| Map | m | The whole project |
| Schema | d | Tables, columns and joins, as Map (1), Mermaid (2), DBML (3) or Graphviz (4). p finds a join path. |
| Key | Action |
|---|---|
/ or ⌘K | Search |
c | Show or hide the code |
0 | Fit the view |
Backspace or [ | Return to the previous view |
| Esc | Leave the inner view |
Open in the editor jumps to the source. In the schema view, each edge shows one of these marks: required, nullable, implied, virtual, $lookup in code, or view reads.
Languages
Parsed with tree-sitter: TypeScript, TSX, JavaScript, JSX, Python, Go, Rust, Java, C, C++, C#, PHP, Ruby, Swift, Kotlin, Dart, Pascal/Delphi, Scala, Lua, Luau, R, Objective-C, CFML (with CFScript and CFQuery), COBOL, VB.NET, Erlang, Solidity, Terraform, ArkTS and Nix.
Also read: Svelte, Vue, Astro, Liquid, Razor, Twig, YAML, XML, properties files and SQL.
Frameworks
KodaCode links routes and wiring for Angular, Express, NestJS, Next.js, React, React Native, React Router, TanStack Router, Expo, Svelte, Vue, Laravel, Drupal, CodeIgniter, Rails, Play, Tauri, MediatR, Cargo workspaces, Terraform, CICS and Flutter, among others.
Schemas
KodaCode reads migrations and ORM models for Prisma, Drizzle, TypeORM, Sequelize, Knex, Mongoose, Mongoid, Diesel, GORM, Entity Framework, JPA/Spring, Laravel, Liquibase, DynamoDB and Firestore, plus plain .sql files. KodaCode links code that names a table to that table.
Per-project config
Optional: a .koda/graph.json file changes what KodaCode indexes. Without one, KodaCode indexes every source file that git does not ignore. Edits apply as soon as you save the file.
{
"exclude": ["src/generated/**", "**/*.pb.go"],
"include": ["vendor/acme-sdk/**"],
"includeIgnored": ["services/billing"],
"deprioritize": ["tests/**", "examples/**"],
"extensions": {
".tmpl": "twig",
".inc": "php"
}
}
| Key | What it does |
|---|---|
exclude | Paths that KodaCode never indexes. |
include | Paths that KodaCode indexes even when .gitignore hides them. KodaCode still indexes everything else. |
includeIgnored | Git repositories inside a gitignored folder that KodaCode also indexes. |
deprioritize | Paths that KodaCode indexes but ranks lower in results. |
extensions | Maps a file extension to a language KodaCode reads. Only the last extension counts, so email.html.tmpl matches .tmpl. |
Paths are glob patterns relative to the project root. An extensions value must be one of the language names KodaCode knows, in lower case: typescript, tsx, javascript, jsx, python, go, rust, java, c, cpp, csharp, php, ruby, swift, kotlin, dart, pascal, scala, lua, luau, r, objc, cfml, cfscript, cfquery, cobol, vbnet, erlang, solidity, terraform, arkts, nix, svelte, vue, astro, liquid, razor, twig, yaml, xml, properties or sql. KodaCode ignores an unknown name, and a file that is not valid JSON.