💻 CLI Reference
The Tresor binary serves as both the daemon and a CLI client. CLI commands connect to a running daemon using whatever interface (TCP or Unix socket) is configured in the YAML config file.
All CLI commands accept the --config flag to specify which config file to use for connecting to the daemon:
tresor --config ~/.config/tresor/config.yaml <command>
🖥️ Daemon Commands
run — Start the Daemon
Starts the daemon (gateway + admin API + web UI):
# Auto-detect config from current directory or home
tresor run
# Explicit config path
tresor run --config ~/.config/tresor/config.yaml
version — Show Version
Displays the binary version and build information:
tresor version
Downstream Commands
downstream list
List all configured downstreams:
tresor downstream list
Rule Commands
rule list
List all routing rules:
tresor rule list
rule create
Create a new routing rule:
tresor rule create "My Rule" "/v1/chat/completions"
Creates a rule with the given name and matching path. Format filters can be added via flags:
tresor rule create "Chat Rule" "/v1/chat/completions" \
--match-format openai \
--match-downstream-format anthropic \
--match-downstreams anthropic
Pipeline config can be added later via the web UI or admin API.
Alias Commands
alias list
List all alias groups with their active option highlighted:
tresor alias list
alias create
Create a new alias option:
tresor alias create <input-model-id> <downstream-id> <output-model-id>
Example:
tresor alias create gpt-4o anthropic claude-sonnet-4-20250514
Note: The CLI does not have a
--regexflag. To create regex aliases (where the input model ID is treated as a regular expression), use the web UI or the admin API directly (POST /api/aliaseswithis_regex: truein the JSON body).
alias activate
Activate an alias option, deactivating any currently active sibling in the same group:
tresor alias activate alias-gpt4o-anthropic
alias delete
Delete an alias option. If deleting the active alias, the next sibling is automatically promoted to active:
tresor alias delete alias-gpt4o-openai