{"id":50394120,"url":"https://github.com/travsr-com/travsr","last_synced_at":"2026-05-30T20:01:02.878Z","repository":{"id":357940205,"uuid":"1239180274","full_name":"Travsr-com/travsr","owner":"Travsr-com","description":"The code graph that lives next to git. Graph-native code intelligence over MCP - 80% fewer tokens, zero structural hallucinations.","archived":false,"fork":false,"pushed_at":"2026-05-30T18:50:31.000Z","size":1250,"stargazers_count":0,"open_issues_count":55,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-30T19:06:21.671Z","etag":null,"topics":["ai","code-intelligence","developer-tools","graph","mcp","rust","static-analysis","tree-sitter"],"latest_commit_sha":null,"homepage":"https://travsr.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Travsr-com.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-14T20:57:48.000Z","updated_at":"2026-05-30T18:47:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Travsr-com/travsr","commit_stats":null,"previous_names":["raj-rkv/travsr","travsr-com/travsr"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/Travsr-com/travsr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Travsr-com%2Ftravsr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Travsr-com%2Ftravsr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Travsr-com%2Ftravsr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Travsr-com%2Ftravsr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Travsr-com","download_url":"https://codeload.github.com/Travsr-com/travsr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Travsr-com%2Ftravsr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33707328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","code-intelligence","developer-tools","graph","mcp","rust","static-analysis","tree-sitter"],"created_at":"2026-05-30T20:01:02.058Z","updated_at":"2026-05-30T20:01:02.865Z","avatar_url":"https://github.com/Travsr-com.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# travsr\n\n**The code graph that lives next to git.**\n\n\u003e Source code is a deterministic graph, not unstructured text. Travsr builds\n\u003e that graph on every commit and exposes it via MCP so AI agents traverse edges\n\u003e instead of guessing from vector chunks — 80% fewer tokens, zero structural\n\u003e hallucinations.\n\n[![CI](https://github.com/raj-rkv/travsr/actions/workflows/ci.yml/badge.svg)](https://github.com/raj-rkv/travsr/actions/workflows/ci.yml)\n[![Bench](https://github.com/raj-rkv/travsr/actions/workflows/bench.yml/badge.svg)](https://github.com/raj-rkv/travsr/actions/workflows/bench.yml)\n[![Phase 2 Exit](https://github.com/raj-rkv/travsr/actions/workflows/phase2-exit.yml/badge.svg)](https://github.com/raj-rkv/travsr/actions/workflows/phase2-exit.yml)\n[![npm](https://img.shields.io/npm/v/%40travsr.com%2Ftravsr)](https://www.npmjs.com/package/@travsr.com/travsr)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\n---\n\n## Quickstart\n\n```bash\n# 1. Install\nnpm install -g @travsr.com/travsr\n\n# 2. Initialize your repo (requires git)\ncd your-project\ngit init          # skip if already a git repo\ntravsr init       # indexes TypeScript files → .travsr/graph.db\n                  # auto-registers in ~/.travsr/registry.json\n\n# 3. Connect to Claude Desktop — set once, works for all repos\n```\n\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)\nor `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"travsr\": {\n      \"command\": \"travsr\",\n      \"args\": [\"mcp\", \"--stdio\", \"--global\"]\n    }\n  }\n}\n```\n\nRestart Claude Desktop. Ask: *\"Who calls PaymentService.charge?\"*\n\n\u003e **No `cwd` needed.** `--global` reads `~/.travsr/registry.json` which\n\u003e `travsr init` populates automatically. Every repo you init becomes\n\u003e immediately available — no config changes required.\n\n---\n\n## Multi-repo support\n\nTravsr maintains a global registry at `~/.travsr/registry.json`. Every\n`travsr init` call registers that repo automatically.\n\n```bash\n# Init each repo once — that's it\ncd ~/projects/repo-a \u0026\u0026 travsr init\ncd ~/projects/repo-b \u0026\u0026 travsr init\ncd ~/projects/task-manager \u0026\u0026 travsr init\n\n# See all registered repos\ntravsr repos\n```\n\n```\n| Name         | DB Path                                           | Exists |\n| repo-a       | /Users/you/projects/repo-a/.travsr/graph.db      | yes    |\n| repo-b       | /Users/you/projects/repo-b/.travsr/graph.db      | yes    |\n| task-manager | /Users/you/projects/task-manager/.travsr/graph.db | yes   |\n```\n\nThe single `--global` MCP server serves all of them. When you ask about a\nsymbol, it searches all registered repos and prefixes results with\n`[repo-name]` so you always know which codebase the answer came from.\n\n---\n\n## Works with Every MCP-Compatible AI Tool\n\nTravsr speaks [MCP](https://modelcontextprotocol.io) — the open standard for\nconnecting AI agents to tools.\n\n### Claude Desktop / global mode (recommended)\n\n```json\n{\n  \"mcpServers\": {\n    \"travsr\": {\n      \"command\": \"travsr\",\n      \"args\": [\"mcp\", \"--stdio\", \"--global\"]\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per-project):\n\n```json\n{\n  \"mcpServers\": {\n    \"travsr\": {\n      \"command\": \"travsr\",\n      \"args\": [\"mcp\", \"--stdio\", \"--global\"]\n    }\n  }\n}\n```\n\n### GitHub Copilot (VS Code)\n\nRequires VS Code 1.99+. Add to `.vscode/mcp.json` in your project:\n\n```json\n{\n  \"servers\": {\n    \"travsr\": {\n      \"type\": \"stdio\",\n      \"command\": \"travsr\",\n      \"args\": [\"mcp\", \"--stdio\", \"--global\"]\n    }\n  }\n}\n```\n\n### Cline (VS Code extension)\n\nIn the Cline extension settings → **MCP Servers** → Add server:\n\n```json\n{\n  \"travsr\": {\n    \"command\": \"travsr\",\n    \"args\": [\"mcp\", \"--stdio\", \"--global\"],\n    \"disabled\": false\n  }\n}\n```\n\n### Continue.dev\n\nAdd to `~/.continue/config.json` under `mcpServers`:\n\n```json\n{\n  \"mcpServers\": [\n    {\n      \"name\": \"travsr\",\n      \"command\": \"travsr\",\n      \"args\": [\"mcp\", \"--stdio\", \"--global\"]\n    }\n  ]\n}\n```\n\n### Single-repo mode\n\nIf you prefer to point at one specific repo, use `--db`:\n\n```bash\ntravsr mcp --stdio --db /path/to/repo/.travsr/graph.db\n```\n\nOr omit both flags and run from inside the repo — travsr discovers the db\nfrom the current git root.\n\n---\n\n## MCP Tools\n\nAll tool responses are wrapped in a `\u003ctravsr-data\u003e` envelope and sanitized\nbefore being returned, so returned content is safe to pass directly into LLM\ncontext (control characters stripped, prompt-injection vectors neutralised).\n\nIn global mode, tools that accept a `file` or `symbol` argument also accept\nan optional `repo` parameter to target a specific registered repo. Omitting\n`repo` searches all registered repos.\n\n| Tool | Required | Optional | Description |\n|---|---|---|---|\n| `get_dependencies(file)` | `file` — file path | `repo` | Return all imports/dependencies of a file |\n| `get_callers(symbol)` | `symbol` — symbol name | `repo` | Return all nodes with an incoming edge to a symbol |\n| `get_blast_radius(file)` | `file` — file path | `repo` | Return the set of files transitively affected if the given file changes |\n| `search_symbol(name)` | `name` — symbol name | `repo` | Find symbol definitions matching a name across the indexed graph |\n| `get_repo_map` | — | `repo` | Return a structural overview of the indexed repository |\n| `get_execution_path(source, sink)` | `source`, `sink` — symbol names | `repo` | Return the PCST-optimal execution path between two symbols |\n| `get_context(query, token_budget)` | `query` — search term | `repo`, `token_budget` | PPR traversal ranked by relevance, budget-capped by 0-1 knapsack |\n\n---\n\n## CLI Commands\n\n```\ntravsr init                      Index the repo, install git hook, register globally\ntravsr repos                     List all globally registered repos\ntravsr status                    Show node/edge counts, schema version, last-indexed SHA\ntravsr ask \u003cquery\u003e               PPR + knapsack symbol lookup from the terminal (partial match)\ntravsr migrate --to kuzu         Migrate the graph store from SQLite to Kùzu backend\ntravsr mcp --stdio               Start the MCP stdio server (single-repo, cwd-based)\ntravsr mcp --stdio --global      Start the MCP stdio server (all registered repos)\ntravsr mcp --stdio --db \u003cpath\u003e   Start the MCP stdio server (explicit db path)\ntravsr graph \u003cquery\u003e             Show dependency graph for a symbol or file\ntravsr graph --all               Show graph for the entire indexed repository\n```\n\n### travsr migrate\n\nMigrate an existing SQLite graph to the Kùzu production backend. The SQLite\ndatabase is never deleted — both backends coexist and `travsr status` continues\nto read from SQLite after migration.\n\n```bash\n# Requires a kuzu-enabled build (see Build from Source below)\ntravsr migrate --to kuzu\n```\n\n```\nsqlite source : .travsr/graph.db\n  nodes       : 18432\n  edges       : 94107\n  sha256      : a3f2...\n\nmigrating to kuzu at .travsr/graph.kuzu …\n\nmigration complete.\n  kuzu path   : .travsr/graph.kuzu\n  nodes       : 18432\n  edges       : 94107\n  sha256      : a3f2...\n\ntip: SQLite graph is unchanged — `travsr status` reads graph.db\n     and shows the same counts as before.\n```\n\nThe migration computes a SHA-256 integrity manifest of every node and edge\nbefore and after the copy. If the digests don't match, the staging directory is\nremoved and the SQLite store is left intact.\n\n### travsr graph\n\nVisualise the dependency graph from any symbol or file as an ASCII tree,\nGraphviz DOT, or structured JSON.\n\n```bash\n# ASCII tree (default) — what does extension.ts import and define?\ntravsr graph extension.ts\n\n# Who calls PaymentService.charge?\ntravsr graph PaymentService.charge --direction callers\n\n# Both directions, depth 2\ntravsr graph service.ts --direction both --depth 2\n\n# Render as SVG (requires graphviz: brew install graphviz)\ntravsr graph extension.ts --format dot | dot -Tsvg -o graph.svg \u0026\u0026 open graph.svg\n\n# Machine-readable JSON for AI tools\ntravsr graph extension.ts --format json\n\n# Whole-repository graph\ntravsr graph --all --format dot | dot -Tsvg -o repo.svg \u0026\u0026 open repo.svg\ntravsr graph --all --format json\n```\n\n**Flags:**\n\n| Flag | Default | Description |\n|---|---|---|\n| `--direction` | `deps` | `deps` · `callers` · `both` |\n| `--depth` | `3` | Maximum traversal depth |\n| `--format` | `tree` | `tree` · `dot` · `json` |\n| `--all` | — | Dump the entire indexed graph (mutually exclusive with `\u003cquery\u003e`) |\n\n**JSON output schema** (`--format json`):\n\n```json\n{\n  \"schema_version\": 1,\n  \"summary\": {\n    \"mode\": \"query\",\n    \"root\": \"file\",\n    \"root_path\": \"src/index.ts\",\n    \"total_nodes\": 6,\n    \"total_edges\": 5,\n    \"kinds\": { \"file\": 1, \"function\": 2, \"import\": 2, \"variable\": 1 }\n  },\n  \"nodes\": [\n    { \"id\": \"...\", \"signature\": \"fn:activate\", \"kind\": \"function\",\n      \"path\": \"src/index.ts\", \"language\": \"typescript\", \"depth_from_seed\": 1 }\n  ],\n  \"edges\": [\n    { \"from\": \"file\", \"to\": \"fn:activate\", \"kind\": \"defines/binding\" }\n  ]\n}\n```\n\n---\n\n## VS Code Extension\n\nInstall the **Travsr** extension from the VS Code Marketplace (`travsr.travsr-vscode`).\n\nThe extension connects to your local Travsr daemon over MCP and adds:\n\n- **Status bar**: daemon connection state and indexed node count\n- **Code lens**: inline \"N callers\" annotations on function definitions\n- **Hover**: dependency list on import statements\n- **Graph panel**: interactive dependency graph rendered with Cytoscape.js; supports kind filtering and two-hop import traversal; open via the Travsr sidebar or the command palette (`Travsr: Show Graph`)\n\nThe extension uses your installed `travsr` binary. Set `travsr.binaryPath` in VS Code settings to override the binary location.\n\n---\n\n## Storage Backends\n\n| Backend | Flag | Best for | Status |\n|---|---|---|---|\n| SQLite + WAL | _(default)_ | \u003c 75M nodes, zero setup | Available |\n| Kùzu | `--features kuzu` | \u003c 2.5B edges, production workloads | Available (Phase 2) |\n| RocksDB | `--features rocksdb` | Hyperscale / unlimited | Planned (Phase 3) |\n\nSQLite is the default and requires no additional dependencies. Kùzu is a native\nproperty-graph engine that is 64× faster than Neo4j on graph workloads and is\nnow available behind a feature flag.\n\nTo migrate an existing SQLite graph to Kùzu, build with `--features kuzu` and\nrun `travsr migrate --to kuzu`.\n\n---\n\n## How It Works\n\n```\ngit init \u0026\u0026 travsr init\n  └─▶ walks .ts / .tsx files (respects .gitignore)\n        └─▶ Tree-sitter parses each file\n              └─▶ Nodes + edges → .travsr/graph.db (SQLite WAL)\n                    └─▶ post-commit hook installed\n                          └─▶ repo registered in ~/.travsr/registry.json\n\ngit commit\n  └─▶ post-commit hook fires\n        └─▶ travsr hook-run \u003cchanged files\u003e\n              └─▶ SHA-256 delta — only re-indexes changed files\n                    └─▶ graph.db updated, last_commit SHA recorded\n\ntravsr migrate --to kuzu   (optional, kuzu build only)\n  └─▶ SHA-256 manifest of all edges computed from SQLite\n        └─▶ nodes + edges bulk-copied to .travsr/graph.kuzu.new (staging)\n              └─▶ post-copy manifest compared — mismatch aborts, SQLite intact\n                    └─▶ atomic rename: graph.kuzu.new → graph.kuzu\n```\n\n**Graph stays current via the post-commit hook** — every committed change is\nre-indexed automatically. The graph is also fully queryable immediately after\n`travsr init`, before any commit.\n\nLanguage support: **TypeScript / TSX, Rust, Python, Go**.\n\n### Retrieval algorithms\n\n| Algorithm | When used | Status |\n|---|---|---|\n| BFS depth-3 | `get_dependencies` / `get_callers` queries | Available |\n| Personalized PageRank (PPR) | `get_context` and deep traversal | Available (α=0.15, ε=1e-6, p95 \u003c 50ms on 1k-file fixture) |\n| 0-1 Knapsack | Token budget cap on `get_context` results | Available |\n| Prize-Collecting Steiner Tree | `get_execution_path`: optimal path between two symbols | Available |\n| k-core decomposition | Buried-middle recovery | Planned |\n\n### Edge kinds\n\n| Kind | Meaning |\n|---|---|\n| `depends` | File imports another module |\n| `defines/binding` | File or class defines a symbol (function, method, variable) |\n| `ref/call` | Call-site reference |\n| `exports` | Symbol exported from a module |\n\n### Security\n\nAll MCP tool outputs are passed through a sanitization pipeline before being\nreturned to the client:\n\n1. Truncated to a safe maximum length\n2. C0/C1 control characters stripped\n3. `\u003c` and `\u003e` escaped to prevent XML/HTML injection in tool descriptions\n4. Wrapped in a `\u003ctravsr-data\u003e` structural envelope\n\nPath traversal and argument injection are rejected at the tool dispatch layer\n(`../`, `..\\\\`, absolute paths, null bytes, `%`-encoded traversal sequences).\n\n**Release artifact signing:** Every release tarball is signed with\n[cosign keyless signing](https://docs.sigstore.dev) using the GitHub Actions\nOIDC token. SLSA v1.0 provenance is attached to every release via GitHub\nattestations. See [SECURITY.md](SECURITY.md) for verification instructions.\n\n**Supply chain auditing:** All Rust dependencies are audited on every CI run\nwith [cargo-deny](https://github.com/EmbarkStudios/cargo-deny) (CVE advisories,\nlicense policy, banned crates). A nightly OSV scan checks for new CVEs against\n`Cargo.lock` and `package-lock.json`.\n\n---\n\n## Build from Source\n\n```bash\ngit clone https://github.com/raj-rkv/travsr\ncd travsr\n\n# Default build (SQLite backend only)\ncargo build --release   # requires Rust 1.75+\n\n# With Kùzu production backend (requires CMake + C++ toolchain)\ncargo build --release --features kuzu\n\n# Override the npm-installed binary with a local build\ncp target/release/travsr $(which travsr)\n# or\nexport TRAVSR_BINARY=/path/to/travsr/target/release/travsr\n```\n\n**Platform support:** macOS (x86\\_64 + arm64), Linux (x86\\_64 + aarch64), Windows (x86\\_64).\nPre-built binaries are available on the [Releases](https://github.com/raj-rkv/travsr/releases) page.\n\n**MSRV:** Rust 1.75 (verified in CI on every commit).\n\n---\n\n## Troubleshooting\n\n- **`not inside a git repository`**\n  Run `git init` before `travsr init`.\n\n- **`not initialized — run travsr init`**\n  Run `travsr init` in the repo root before using `graph`, `ask`, `status`, or `mcp`.\n\n- **MCP server returns empty results in `--global` mode`**\n  Run `travsr repos` to verify the repo is registered and `Exists` shows `yes`.\n  If missing, re-run `travsr init` in that repo.\n\n- **Stale entries in `travsr repos` (Exists = no)**\n  Safe to ignore — they are skipped automatically. They appear when a repo\n  was deleted or moved after being indexed.\n\n- **`travsr migrate` — kuzu feature not enabled**\n  Rebuild with `cargo build --features kuzu` (requires CMake and a C++ toolchain).\n\n- **`travsr migrate` — Kùzu store already exists**\n  Migration was already completed. Run `travsr status` to verify counts.\n  Remove `.travsr/graph.kuzu` manually only if you need to re-migrate.\n\n- **Binary not found after npm install?**\n  Set `TRAVSR_BINARY=/path/to/travsr` to use a local build instead.\n\n- **Corporate proxy blocks the postinstall download?**\n  Same — set `TRAVSR_BINARY` to skip the remote fetch.\n\n---\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md). Issues and PRs welcome. Licensed MIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravsr-com%2Ftravsr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftravsr-com%2Ftravsr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravsr-com%2Ftravsr/lists"}