CLI¶
The methodic console script manages the credentials the SDK reads — it writes and inspects the ~/.methodic/ files so you never hand-edit them. It is the terminal-side twin of the one-line setup command the Methodic UI shows at API key creation.
It wires two subcommands: auth login and auth status. For the credential model, file precedence, and what Chronicle.from_env() resolves, see the authentication guide; for the Python client, see the client reference.
auth login¶
Store a credential (an sk_... API key or an Auth0 JWT) and an optional default organization. The credential is verified live against the server unless you pass --no-verify; omit --api-key and you're prompted for it with input hidden.
$ methodic auth login
Credential (API key or JWT, input hidden):
Organizations you belong to:
1. acme — Acme Research
Default organization (number or slug; Enter to keep current): 1
Logged in as Jane Doe (https://api.methodiclabs.ai).
Wrote ~/.methodic/credentials.yaml (chmod 600).
Default organization: 2f1c… (recorded in ~/.methodic/config.yaml).
config.yaml is merge-written, so hand-added settings survive a re-login; credentials.yaml is overwritten, so re-running login is key rotation.
| Flag | Argument | What it does |
|---|---|---|
--api-key |
the credential | An sk_... API key OR an Auth0 JWT. Omitted → prompted for, input hidden. |
--organization |
ID_OR_SLUG |
Default organization for creation calls (principal id or slug). Resolved against your memberships when the key is verified. Mutually exclusive with --personal. |
--personal |
— | Clear any configured default organization (personal scope). Mutually exclusive with --organization. |
--server-url |
URL | Chronicle server, persisted to config.yaml. Default https://api.methodiclabs.ai. |
--no-verify |
— | Skip the live key check against the server (stores the credential unchecked). |
With neither --organization nor --personal, an interactive prompt offers your member organizations when the key verifies and stdin is a TTY; otherwise the existing default is left untouched.
auth status¶
Print the configuration the SDK would resolve — sources, server URL, masked key, and default organization. Takes no flags.
$ methodic auth status
Config sources: ~/.methodic/config.yaml, ~/.methodic/credentials.yaml (+ environment overrides)
Server URL: https://api.methodiclabs.ai
API key: sk_user_2f… (39 chars)
Default organization: 2f1c…
Reads the same sources from_env() does — the ~/.methodic/ files plus environment overrides — or the single file named by $CHRONICLE_CONFIG when that is set.