config.toml. Tokens live in a secret
store — a single backend you choose during onboarding or via
config.toml under [secrets] backend = "...".
Two backends are available:
- Encrypted file vault (
encrypted-file) — age + scrypt at~/.local/share/mesa/secrets.vault.age. Requires typing a passphrase each CLI session (or setMESA_VAULT_PASSPHRASEfor non-interactive use). Default on fresh installs. - Plaintext file (
plaintext-file) — unencrypted TOML at~/.local/share/mesa/secrets.plaintext.toml. For CI and ephemeral sandboxes only.
Configuring the backend
Set it inconfig.toml:
encrypted-file, plaintext-file.
Default (fresh install): encrypted-file.
Registering a token
mesa auth set-key
The primary command. Scope is determined by the flags you pass; the key
value is read from the positional argument or stdin.
MESA_ORGS environment variable
MESA_ORGS=<org>:<token>[,<org>:<token>...] registers tokens into the
configured backend, then proceeds with the command. Useful for one-shot
invocations from scripts and CI:
Onboarding wizard
On first run without any config,mesa probes platform capabilities and
prompts you to pick a backend. The selection persists into config.toml.
The wizard then prompts for org names and API tokens and writes them into
the store.
Lookup order
When mesa needs a token for org<slug> (and optionally repo <name>):
orgs/<slug>/repos/<name>— repo-scoped override.orgs/<slug>— org-scoped token.global— account-wide fallback.- Otherwise: error
no API key found in the secret store for organization '<slug>'.
Choosing a backend
| Environment | Recommended backend |
|---|---|
| Developer laptop (macOS / Linux desktop) | encrypted-file (default) |
| Headless server you control | encrypted-file |
| CI runner / ephemeral sandbox | plaintext-file |
plaintext-file backend writes tokens in plaintext to
~/.local/share/mesa/secrets.plaintext.toml. Only use it where the
filesystem is ephemeral or otherwise already trusted (sandbox, short-lived
VM).
CI / sandbox setup
In ephemeral environments, configure the plaintext backend and register the token viamesa auth set-key:
MESA_ORGS:
Listing registered keys
mesa_****xxxx):
Removing a key
Rotating tokens
Re-runmesa auth set-key with the new value — it overwrites the existing
entry at that scope. To remove a token, use mesa auth rm-key.
