SARION

Sign in from the command line

Sign in with your SARION account through your browser, where your login is stored, what to do when there is no keychain, and how to sign out.

Where to find it Terminal, sarion login

How signing in works

The command line signs in with your own SARION account through device authorization: the terminal asks for a code, and you approve it in your browser where you are already signed in to SARION. No password is typed into the terminal.

  1. In your terminal run sarion login.
  2. The terminal shows an authorization address and a device code. Open the address in your normal browser.
  3. Sign in to SARION if needed, check that the device code matches the one in the terminal and read the access it asks for, then approve.
  4. Back in the terminal, the sign-in finishes and prints the account it is bound to.
  5. Check with sarion whoami. It shows the profile, the account and when the credential expires.

Only approve a code that you started yourself. Nobody from SARION will ever ask you for one, and you should never copy browser cookies into the terminal.

Which server it talks to

A profile named cloud is built in, so you do not have to set up anything before sarion login. List profiles with sarion endpoint list, and check the connection of the selected one with sarion endpoint doctor. A profile is tied to the account that signed in through it; to use a second account, add another profile and sign in again with --profile NAME.

Where your login is stored

Your credential is kept in your computer's own secure storage: the macOS Keychain, Windows DPAPI, or on Linux the Secret Service (the secret-tool program with a working desktop or user session). There is no plain-text fallback. The settings and recovery data live in ~/.config/sarion-v2, or in the folder named by the SARION_V2_HOME variable.

When there is no keychain (servers)

If the secure storage is not available you see KEYCHAIN_UNAVAILABLE: OS credential storage unavailable; explicitly select encrypted storage. Choose the encrypted store yourself, with a passphrase of at least 12 characters:

sarion login --encrypted-store
sarion whoami --encrypted-store
sarion usage --encrypted-store

On a terminal the passphrase is asked without showing it. In scripts, provide it through the SARION_VAULT_PASSPHRASE environment variable, set from your secret manager. The choice is not remembered, so add --encrypted-store to every command that needs your login, including agent, ask and logout. Never put the passphrase on the command line, in your shell history or in a log.

Renew and sign out

  • sarion whoami shows when the credential expires. Run sarion login again to renew it.
  • sarion logout revokes the credential on the server and removes it from your computer. If the server cannot be reached, it tells you the revocation is still pending and exits with code 5.
  • sarion logout --local-only only removes it from this computer. The revocation stays pending until you reconnect, so use it only when you must.
  • To sign in to a different account, use a separate profile.

Common questions

Is it the same account as the web app?

Yes. The command line signs in to your SARION account, and uses the same plan and the same credits. See Permissions, recovery and credits.

Why does sarion whoami say "Run sarion login first"?

You are not signed in on this profile yet, or you signed out. Run sarion login.

Can I sign in without a browser?

Use a browser on any device to approve the code. If the machine has no keychain, add --encrypted-store. sarion login --token asks for an access token and is meant for cases where support has given you one.