Skip to main content
naive auth manages the credential, not a session. It is the only group that runs without one. Both sign-in paths end at GET /v1/me, which resolves the organization from the credential alone — so nothing here asks you for an org_ id.

Commands

login, logout, and whoami are also top-level aliases, which is the spelling most examples use. naive login and naive auth login are the same handler.

login

Two ways in: an API key, or --email with the 6-digit code mailed to it (--code) or the account’s password (--password).
The key is read from --api-key, then NAIVE_API_KEY, then stdin when it is piped. Any of these replaces the key the profile already holds, so piping a new key to naive login is how you rotate it. With none of them, login re-checks the key the profile holds. Prefer stdin or the environment: a key typed after --api-key is saved in your shell history. --api-key is a global flag, which is why it is not in the table above. The credential is proved and the organization learned in one call before anything is written, so a bad credential leaves no profile behind. The profile file is written 0600 and the credential is never printed back — only its 12-character display prefix.
The --email path stores a session token, which expires. Run naive login again when it does. For CI, use an API key: it does not expire until you revoke it.

whoami

user is null when the principal is an API key rather than a person. mode is test for an sk_test_… credential and live for sk_live_….

register

Creates the user with no password and mails a 6-digit code to the address. Sign in with that code to store a credential. A password is optional: set one later in the studio’s Settings, once the address is proved. Registering is not the last step: a new organization holds no plan, and every command outside billing is refused with subscription_required until it has one. Start it with naive plan subscribe — Standard with a 7-day free trial when eligible, or --plan pro — complete the checkout page it prints, then naive plan show to confirm.

resend-confirmation

The way out of a dead end: a code that never arrived, or a forgotten password. It is an open route — it runs without a credential, which is the point. It mails a new 6-digit sign-in code:
The reply is the same whether or not that address has an account. There is nothing here to branch on, deliberately: an endpoint that answered differently would be an account-enumeration oracle. There is no password reset by mailed link. Sign in with the code (naive login --email … --code …), then set a new password in the studio’s Settings. The same operation is client.auth.resendConfirmation in the SDK, and is described under Authentication in the API reference.

logout

Removes the credential for the active profile only. Other profiles are untouched. Use --profile <name> to sign a different one out.

Profiles

Every auth command acts on the profile named by --profile (default: the last profile you logged into). This is what stops the next command silently aiming at production:
login on a new profile points it at the production API (https://api.vetta.sh). To use another deployment, pass --api-base-url <url> once on login; the profile remembers it. Every other command refuses a profile that was never logged into (unknown profile), so a mistyped --profile never runs against production.