Skip to main content
CLI Reference

travsr connect

Detect the AI coding tools installed on this machine and wire each one to this repository's Travsr MCP server.

travsr init runs this for you at the end of a successful index, so most people never call it directly. Run it by hand when you install a new AI tool after initialising the repo, when you want to preview or undo what was written, or when you want the optional agent rules file.

travsr connect

Options

FlagMeaning
--printShow what would change without writing anything. Also the way to see the tool ids
--tool <id>Configure only this tool instead of every one detected
--rulesAlso write the always-on rules file that tells the agent to prefer the graph over grep
--commitDo not git-ignore the generated files, so you can commit them
--removeRemove previously generated Travsr config

Supported tools

claude-code, cursor, vscode-copilot, gemini-cli, antigravity, codex, windsurf, zed.

Only tools it actually finds on the machine are configured. Run travsr connect --print for the current list and exactly which files each one would get.

What gets written differs by tool, because they do not agree on where config lives. Some read MCP servers from a file in the repository, which Travsr writes directly. Others read theirs from a single global file, so the only thing Travsr can write per repository is the rules file.

Rules are opt-in

By default connect wires up the MCP server and writes no rules file.

That file is not free. It is re-read on every turn of every conversation, so it is the one part of Travsr that spends tokens repeatedly, for the whole life of the project. The tools work without it: MCP already hands the model every tool name and description, so an agent can find and call them unprompted.

Pass --rules if you would rather nudge agents toward the graph than leave the choice to them. For a tool whose MCP config is global, the rules file is the only per-repo artifact, so a default run prints that it wrote nothing and tells you the flag exists.

Generated files are git-ignored

Generated config is ignored by default, because it points at absolute paths on one machine and is regenerated by anyone who runs travsr init. Pass --commit when you want it checked in for the whole team, which is worth doing when everyone clones to a predictable location.

Undoing it

travsr connect --remove

Removes the generated entries and files, leaving hand-written config in the same files alone.

See also

  • travsr init, which calls this at the end of a successful index
  • travsr mcp, the server this points every tool at