The foundation
Resemblance finds clues.
Relationships find impact.
Text search finds words. A code graph records how your code fits together. Travsr follows callers, dependencies, and references, then brings the connected context into your editor or AI assistant.
1 changed symbol2 caller paths3 downstream files
Text search and graph traversal compared
| Task | Text search | Travsr graph |
|---|---|---|
| Find a symbol | Text search finds matching words, including unrelated names. | Repository-scoped identities distinguish symbols in different files and projects. |
| Follow a connection | Search results need inspection to establish how code is connected. | Traverse the calls, imports, and references recorded by available analyzers. |
| Gather context | Following a chain of searches can require several separate lookups. | Rank connected context, then select source within a token budget. |
| Keep up with changes | Text search reads saved files. Other indexes need their own update process. | A running daemon watches saves; Git hooks reconcile commits, merges, and checkouts. |
| Choose what stays local | Local text search and local embedding tools are both available. | Keep your graph on your machine. Optional local embeddings expand natural-language discovery. |
Find a symbol
- Text search
- Text search finds matching words, including unrelated names.
- Travsr graph
- Repository-scoped identities distinguish symbols in different files and projects.
Follow a connection
- Text search
- Search results need inspection to establish how code is connected.
- Travsr graph
- Traverse the calls, imports, and references recorded by available analyzers.
Gather context
- Text search
- Following a chain of searches can require several separate lookups.
- Travsr graph
- Rank connected context, then select source within a token budget.
Keep up with changes
- Text search
- Text search reads saved files. Other indexes need their own update process.
- Travsr graph
- A running daemon watches saves; Git hooks reconcile commits, merges, and checkouts.
Choose what stays local
- Text search
- Local text search and local embedding tools are both available.
- Travsr graph
- Keep your graph on your machine. Optional local embeddings expand natural-language discovery.
Graph coverage depends on the language, analyzer, and indexing status. A missing edge is not proof that no relationship exists.
See the difference
One question, two ways to investigate
“Who calls PaymentService.charge?” - checkout.ts: an unrelated local charge() helper, name matches, symbol doesn't
- billing.test.ts: a mock named charge that asserts nothing about real callers
- docs/payments.md: prose that mentions “charge” in passing
Matching names are useful starting points. Inspect their definitions and call sites to establish which symbol they refer to.
- api/orders.ts → OrderController.submit
- jobs/retry.ts → RetryWorker.run
- billing/refund.ts → Refund.reverse
Sample callers reached through indexed ref/call edges. Available results depend on analysis coverage.
From source to context
How the graph is built
Tree-sitter: structural AST
Every file is parsed into an AST without a compilation step. Tree-sitter grammars produce import edges, class/function declarations, and call expressions as graph nodes and edges.
LSIF & SCIP: semantic edges
Built-in semantic analysis covers TypeScript/JavaScript, Rust, and
Python. Other languages use additional analyzers installed with
travsr lang install <lang>. These resolve relationships
beyond the structural parse, with capabilities varying by language.
Kythe VNames: scoped identity
A symbol's identity includes its repository, path, language, and signature. This distinguishes matching names in different locations. Renaming or moving a symbol can change its identity.
BFS → PPR → PCST retrieval
BFS finds neighbours, Personalized PageRank ranks connected context, and PCST can select a connecting subgraph. Token-budget selection keeps the returned context focused. Optional embeddings can add candidates for natural-language queries.
Local reranking for natural-language queries
Local reranking scores candidate relevance and can decline weak
matches. Optional embeddings, configured with travsr embed init,
broaden discovery. Neither ranking nor embeddings determine which
code relationships exist; those come from analysis.
Purpose-built MCP tools
Use local stdio with an MCP coding client, or self-host the SSE server.
travsr init detects installed tools and configures project
MCP settings where supported. Follow the printed instructions for other
clients. Agent guidance files are opt-in with travsr connect --rules.
get_dependenciesget_callersget_blast_radiussearch_symbolget_repo_mapget_execution_pathget_contextget_graph_statsget_graph_jsonget_snippetsget_lang_statusrepo_languagesfind_referencesfind_patternget_index_statusget_graph_health
Keep the graph in step
The running daemon watches saved files. Git hooks reconcile changes after commits, merges, and checkouts. Semantic analysis can continue in the background; use indexing status and graph health to check progress.