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.

Impact pathgraph current
Code relationship graph PaymentService charge connects through OrderController and RetryWorker to downstream files. fn class fn file file file PaymentService.chargeOrderController RetryWorker.runorders.ts receipt.tsretry.ts

1 changed symbol2 caller paths3 downstream files

StructureFollow recorded code relationships.
ScopeKeep matching names tied to their repository and path.
FreshnessSee indexing status before trusting an answer.

Text search and graph traversal compared

How text search and Travsr support common code tasks
TaskText searchTravsr graph
Find a symbolText search finds matching words, including unrelated names.Repository-scoped identities distinguish symbols in different files and projects.
Follow a connectionSearch results need inspection to establish how code is connected.Traverse the calls, imports, and references recorded by available analyzers.
Gather contextFollowing a chain of searches can require several separate lookups.Rank connected context, then select source within a token budget.
Keep up with changesText 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 localLocal 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

Agent asks “Who calls PaymentService.charge?”
Text search Illustrative text matches
  • 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.

Travsr graph get_callers traversal
  • api/orders.tsOrderController.submit
  • jobs/retry.tsRetryWorker.run
  • billing/refund.tsRefund.reverse

Sample callers reached through indexed ref/call edges. Available results depend on analysis coverage.

From source to context

How the graph is built

01

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.

02

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.

03

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.

04

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.

05

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_dependencies
  • get_callers
  • get_blast_radius
  • search_symbol
  • get_repo_map
  • get_execution_path
  • get_context
  • get_graph_stats
  • get_graph_json
  • get_snippets
  • get_lang_status
  • repo_languages
  • find_references
  • find_pattern
  • get_index_status
  • get_graph_health
Full tool reference →

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.

save or Git change SHA-256 delta graph updated

Ready to try it?