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
| Flag | Meaning |
|---|---|
--print | Show what would change without writing anything. Also the way to see the tool ids |
--json | With --print: list the AI tools found as JSON, each with whether it connects by itself (automatic) or needs a step of your own (one_step). Requires --print |
--tool <id> | Configure only this tool instead of every one detected |
--rules | Also write the always-on rules file that tells the agent to prefer the graph over grep |
--commit | Do not git-ignore the generated files, so you can commit them |
--remove | Remove previously generated Travsr config |
--guard[=<MODE>] | Also install the Claude Code PreToolUse guard at this level: off, advisory or strict. A bare --guard means advisory; the = is required (--guard=strict). --remove takes it back out. See travsr guard |
Supported tools
claude-code, cursor, vscode-copilot, gemini-cli, antigravity,
codex, windsurf, zed, opencode, kilo.
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.
OpenCode and Kilo Code
opencode and kilo are detected from a project config file, a .opencode or .kilo folder in the repository, or ~/.config/opencode / ~/.config/kilo. Travsr writes only this repository's own git-ignored config, never a file under ~/.config:
- OpenCode:
opencode.jsoncif it exists, otherwiseopencode.json. - Kilo Code: the first of
kilo.jsonc,kilo.json,.kilo/kilo.jsoncand.kilo/kilo.jsonthat exists, otherwisekilo.json.
If the file already exists, Travsr edits it in place and keeps your comments and formatting. These two tools get the MCP server entry only, no rules file. They also get the absolute path of the travsr binary that ran connect, not the bare travsr, because editors launched from a desktop do not inherit your shell PATH.
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 indextravsr mcp, the server this points every tool at