Skip to main content
← CLI Reference

travsr synonym

Manage query-time synonym pairs. Synonyms expand search terms at query time, if payment maps to billing and invoice, then searching for any of the three will match nodes tagged with all three.

travsr synonym output

Subcommands​

SubcommandDescription
travsr synonym add <term> <alias>...Add one or more aliases to an existing term (or create a new entry). Rejected if the table would exceed 200 rows
travsr synonym set <term> <alias>...Replace all aliases for a term
travsr synonym remove <term> [alias]Remove a specific alias, or remove the entire term
travsr synonym list [term]Print all synonym pairs, or only one term's aliases
travsr synonym resetReset to built-in defaults

travsr synonym add​

travsr synonym add <term> <alias1> [alias2 ...]

Adds one or more aliases to a term. Creates the entry if it doesn't exist. The add is rejected if the synonym table would exceed 200 rows.

$ travsr synonym add payment billing invoice
added: payment → billing, invoice

travsr synonym set​

travsr synonym set <term> <alias1> [alias2 ...]

Replaces all aliases for a term (discards any previously added aliases).

$ travsr synonym set payment billing invoice charge
set: payment → billing, invoice, charge

travsr synonym remove​

Remove a specific alias from a term:

$ travsr synonym remove payment charge
removed: payment → charge

Remove the entire term and all its aliases:

$ travsr synonym remove payment
removed all aliases for: payment

travsr synonym list​

travsr synonym list [term]

Prints every pair, or only term's aliases when you pass one. Trimmed:

$ travsr synonym list
auth → login
auth → rbac
auth → session
auth → token
config → cfg
config → options
config → settings
database → sqlite

travsr synonym reset​

$ travsr synonym reset
reset to static defaults

Restores the built-in synonym pairs and discards any custom ones.

Synonyms expand at query time in both the CLI (travsr ask) and all MCP tools (get_context, search_symbol). A query for billing will also match nodes whose names or signatures contain payment or invoice, and vice versa.

Synonyms are stored in the repository's graph database, .travsr/graph.db. They are per-repo.

VS Code​

The Synonyms panel in the VS Code sidebar lets you manage synonym pairs visually without touching the CLI. See Synonyms Panel.