Skip to main content

CLI Reference

The travsr binary is the single entry point for all Travsr functionality.

Global flags​

FlagDescription
--version, -VPrint version and exit
--help, -hPrint help and exit

That is the whole list. Everything else is per-subcommand, including --db, which only travsr mcp and some travsr embed subcommands take. Commands that act on a repository resolve it from the working directory rather than from a flag, so run them inside the repo you mean.

To see the full surface, including every subcommand, run:

travsr ask --cmds

Subcommands​

CommandDescription
travsr initInstall the git hook and run the first full index
travsr connectDetect AI coding tools and wire them to this repo's MCP server
travsr guardClaude Code PreToolUse hook handler: redirect or deny a search the graph can answer
travsr daemonStart / stop / status the background daemon
travsr mcpStart the MCP server over stdio
travsr serveStart the SSE/HTTP MCP server for remote clients
travsr askAsk a natural-language question about the codebase
travsr explainShow why ask ranked or skipped results, for tuning search
travsr referencesEnumerate every use site of a symbol
travsr patternGraph-scoped textual search over a bounded file set
travsr graphPrint the dependency graph around a symbol or file
travsr uiBrowse the graph in a web browser, with the VS Code extension's pages
travsr reposList and manage indexed repositories
travsr langSet up and manage full cross-file analysis per language
travsr synonymManage query-time synonym pairs
travsr rerankManage the reranker model that reorders search results
travsr embedManage embedding backends for semantic code search
travsr configInspect and set layered configuration
travsr statusPrint index and graph status for this repo
travsr fsckCheck graph integrity, optionally repairing it
travsr invariantsCheck declared architecture rules against the graph, for CI
travsr indexIndex a directory of source files and emit a graph JSON, for CI and tooling

One more exists and has no page of its own, because it is not part of normal use. travsr hook-run is the entrypoint the git hooks call; you never invoke it yourself.