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 takes. 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 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 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

Two more exist and have no page of their own, because neither is part of normal use. travsr index <dir> --output <file> indexes a directory and writes a graph JSON, for CI and tooling. travsr hook-run is the entrypoint the git post-commit hook calls; you never invoke it yourself.