Connect an API token
Create a Trylle CLI key, authenticate safely, and understand credential precedence.
Trylle calls its user API credential a CLI Key. Create one at trylle.com/settings/cli. Current keys start with tr_cli_ followed by 64 characters.
Save the key
Avoid placing the secret directly in a recorded command. Set TRYLLE_API_KEY through your shell, password manager, or CI secret injection, then run:
try auth login
unset TRYLLE_API_KEYThe CLI stores its configuration at ~/.config/trylle-cli/config.json on Linux and macOS.
Verify the connection
try auth status
try whoamiauth status identifies the configured source. whoami also verifies that the credential can reach the API and resolve the current user.
Credential precedence
The CLI resolves credentials in this order:
TRYLLE_BOT_TOKENTRYLLE_API_KEY- Saved CLI configuration
This makes an exported bot token override your personal key. Unset temporary variables after the command or automation finishes.
Custom endpoints
The defaults are https://api.trylle.com and https://trylle.com. Self-hosted or development environments can set:
export TRYLLE_API_ENDPOINT=https://api.example.test
export TRYLLE_WEB_URL=https://example.test
try auth loginLog out carefully
try auth logoutConfiguration reset
In CLI v1.1.4, try auth logout removes the complete CLI config file, including saved AI provider and local agent preferences. Reconfigure those settings after logging in again.
Never use try auth token --show in routine diagnostics. The masked try auth token output is enough to identify the active source without printing secret material.