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
- Asks for the Almirant API URL (defaults to
https://api.almirant.ai) - Opens the browser to complete the OAuth flow
- Validates the obtained API key against the server
- Retrieves user information (name and email)
- Saves credentials to
~/.almirant/config.jsonwith600permissions
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
loginonce. Thelinkandinitcommands reuse stored credentials. - If you switch accounts or the API key expires, run
almirant loginagain to update credentials. - The configuration file has
600permissions (read/write only for your user).