Skip to main content

almirant login

Authenticate your Almirant account by opening an OAuth flow in the browser. Once completed, the API key is stored in ~/.almirant/config.json for use in subsequent commands.

Usage

almirant login

What it does

  1. Asks for the Almirant API URL (defaults to https://api.almirant.ai)
  2. Opens the browser to complete the OAuth flow
  3. Validates the obtained API key against the server
  4. Retrieves user information (name and email)
  5. Saves credentials to ~/.almirant/config.json with 600 permissions

Interactive flow

$ almirant login

Almirant login

? Almirant API URL (https://api.almirant.ai):
Starting browser authentication...
OAuth authentication completed.
Validating API key...

Logged in as Juan Perez ([email protected])
API key stored in ~/.almirant/config.json

Configuration file

Credentials are stored in ~/.almirant/config.json with the following structure:

{
"apiKey": "alm_...",
"apiBaseUrl": "https://api.almirant.ai",
"appBaseUrl": "https://almirant.ai",
"userName": "Juan Perez",
"userEmail": "[email protected]"
}
warning

If a configuration file already exists, the CLI will ask whether you want to overwrite it before continuing.

Notes

  • You only need to run login once. The link and init commands reuse stored credentials.
  • If you switch accounts or the API key expires, run almirant login again to update credentials.
  • The configuration file has 600 permissions (read/write only for your user).