The config file
Where tigby keeps your keys, what it holds them in the clear at 0600 for, and which credential wins.
tigby login writes one configuration file. It stores keys in plain text: an Admin Key on an
operator’s machine or an Identity Key on a machine an agent uses. This is a deliberate trade-off,
also made by gh and aws. The permissions and safeguards are described below.
Where it is
| Platform | Path |
|---|---|
| Linux, macOS, BSD | $XDG_CONFIG_HOME/tigby/config.toml, or ~/.config/tigby/config.toml when XDG_CONFIG_HOME is unset |
| Windows | %APPDATA%\tigby\config.toml |
Use --config <path> or TIGBY_CONFIG to choose another location, such as a checkout, a mounted
secret, or a temporary test directory. The same rules apply to whichever file is in use.
Nothing else is left behind: no cache, no log file, no token store, no history. Two commands write
elsewhere, and only when you ask them to: tigby export download writes the archive where you named
it (owner-read/write, like this file, because it holds what Tigby has for the Org) and tigby upgrade replaces the binary in place, staging the download beside it first and removing it again if
the checksum does not match.
That is the whole footprint.
What it holds
# tigby CLI configuration. Written by `tigby login` and `tigby start`; edit at your own pace.
# The keys here are credentials in the clear – the file is 0600 for that reason.
default_profile = "default"
[profiles.default]
api_url = "https://api.tigby.eu"
api_key = "tigby_admin_…"
key_id = "0199a2c4-6e1a-7b3d-9f42-7c5e0d8a1b6f"
key_name = "laptop"
[profiles.orderbot]
api_key = "tigby_id_…"
key_id = "0199a2c6-3f4a-7d1e-8c2b-5a7e9b1d3f60"
key_name = "cli-build-07"
[profiles.staging]
api_url = "https://api.staging.example"
api_key = "tigby_admin_…"
key_id = "0199a2c5-1d2e-7c4f-8b1a-3e5f7a9c0d2b"
key_name = "laptop"One [profiles.<name>] table per profile. api_url is optional and falls back to
https://api.tigby.eu; key_id and key_name are what tigby logout uses to revoke exactly the
key this machine is holding, rather than all of them. A profile holding an Identity Key is named
after its Handle (tigby login --identity @orderbot and tigby start write it) unless a profile of
that name already holds another key, which is never written over: the Identity's key then goes to
orderbot-agent, and the command says so.
An Identity Key cannot revoke itself, so tigby logout on it drops the key from the file and names the key to revoke from an Admin profile or the console.
The 0600 trade
The key is stored as you were shown it, not hashed and not encrypted, because the CLI has to send
it. On Unix the file is created owner-read/write and nothing else, and it is created that way
rather than corrected afterwards; the mode is what the file is born with, so there is no moment when
the key sits in a world-readable file. The directories the CLI creates on the way are 0700 for the
same reason.
Windows has no Unix mode; the file inherits the user profile's ACL, which is what Windows tooling relies on generally.
What that does and does not buy you:
- It protects the key from other accounts on the same machine. Another user cannot read it.
- It does not protect it from you, or from anything running as you. Any program you run can read the file. A cross-platform keychain was considered and refused: it costs three platform integrations and a headless story that ends in a file anyway.
- A backup of your home directory contains the key. Treat it as you would an SSH private key.
To use the CLI without storing a key in a config file, let your secret manager set TIGBY_API_KEY. The CLI works fully without a config file. --api-key is also supported, but command-line values can appear in shell history and process listings. Prefer the secret manager's environment integration when avoiding a credentials file. Programs running as your user can still access credentials available to that user.
Which credential wins
In order, first match wins:
--api-key <key>on the command lineTIGBY_API_KEYin the environment- the
api_keyof the selected profile
The API URL follows the same ladder: --api-url, then TIGBY_API_URL, then the profile's
api_url, then https://api.tigby.eu. The selected profile is --profile <name>, then
TIGBY_PROFILE, then default_profile from the file, then default.
tigby tunnel connect authenticates as an Identity and not as the Org: it uses the selected
profile's key when that is an Identity Key, and otherwise takes --identity-key or
TIGBY_IDENTITY_KEY. tigby mcp sends the selected key as it is, but refuses anything that is not
an Identity Key (an Admin Key above all) unless --admin is given, because the machine an agent
works on should hold an Identity Key and never an Admin Key.
The file is the CLI's to rewrite
tigby login, tigby logout, tigby start and tigby key rotate write it, and each writes the
whole file. Values survive; comments and formatting you add do not. Edit it freely (it is TOML
and nothing validates it beyond being readable) but expect the next login to render it afresh. The
file is replaced atomically: the new content is written to a file beside it and renamed over it, so
a full disk or an interrupted command leaves the previous file intact rather than an empty one, and
a config that is a symlink stays one.
Identity logins select the default profile
An Identity login selects its profile; an Admin login moves nothing. tigby login --identity @orderbot and tigby start make the Identity's profile the default, because the default is what a
harness running tigby mcp (and tigby tunnel connect without a flag) reads, and the machine an
agent works on is meant to present its Identity's key. Org-level commands on that machine then name
the operator's profile with --profile.
A plain tigby login --profile staging creates or updates the staging profile and selects it for that command, but it does not make staging the default: an Admin login writes default_profile only when the file has none. To change the default by hand, change that line, or name the profile every time with --profile or TIGBY_PROFILE. There is no tigby profile use verb; if one is added, this page changes with it.
Admin Keys never overwrite Identity Keys
An Admin Key never goes where an Identity Key is. A plain tigby login whose profile (the
default, or the one --profile names) holds an Identity Key refuses with
profile_holds_identity_key and mints nothing; tigby login --profile operator gives the
operator's key a profile of its own. tigby start signs in beside an Identity's default rather than
over it, and says which profile it used.
Remove Admin Keys from the agent’s machine
An Identity login offers to take the Admin Keys off the machine. When other profiles in the file still hold Admin Keys, tigby login --identity lists them with their APIs and asks whether this machine should also manage Identities. The answer defaults to no: each of those keys is then revoked with itself, against its own profile's API, and its profile is removed; one that cannot be revoked stays, is named, and the command exits 1 with admin_key_not_revoked.
Yes keeps them. Without a terminal, or with --json, nothing is asked and nothing is revoked; the
lines name tigby logout --profile for each, and the JSON answer lists them under admin_profiles.