CLI auth
The CLI accepts the same two credential forms the rest of the platform does: JWT for an interactive human and API key for a script. Pick whichever fits your environment.
Interactive login (JWT)
agelo auth loginYou’ll be prompted for the API URL, your email, and your password. The CLI calls POST /auth/login, stores the returned token in ~/.config/agelo/credentials.json, and uses it for subsequent commands.
The file looks like:
{ "url": "https://agelo.example.com", "token": "eyJhbGciOi...", "expiresAt": "2025-05-03T11:00:00Z"}The token is short-lived (default 12h) — re-run agelo auth login when it expires. There is no refresh endpoint yet.
Personal Access Token
For CI / scripts where SSO and prompts aren’t an option, the CLI also accepts a Personal Access Token. Mint one in the SPA at Settings → Personal Access Tokens (the raw agp_… value is shown exactly once) and save it locally:
agelo login-pat agp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXThe PAT is cached at ~/.agelo/config.json under a pat field and sent as Authorization: Bearer agp_… from then on. Use --pat <token> or AGELO_PAT=agp_… to override per-call without persisting to disk. PATs do not expire unless you set expiresAt at creation; rotate one with agelo pat disable <id> followed by a fresh agelo pat create.
Non-interactive (API key)
For agent / MCP-side automation set:
export AGELO_PUBLIC_URL=https://agelo.example.comexport AGELO_API_KEY=AGK_a4f8e7c3b1...When AGELO_API_KEY is set, the CLI uses it as the Authorization: ApiKey header for every request and ignores the credentials file entirely.
This is the same key shape the MCP server uses — issue it from the SPA at Settings → API keys or via the API keys endpoint.
Switching contexts
Use --profile <name> to keep multiple sets of credentials around:
agelo --profile work auth loginagelo --profile side auth loginagelo --profile work cards lsProfiles are stored as separate files at ~/.config/agelo/<profile>.json.
Logging out
agelo auth logoutThis deletes the credentials file. Tokens are stateless on the server — there’s no revocation; the file deletion is purely local.
Verifying
agelo auth whoamiCalls GET /auth/me and prints the user info. If you get a 401, your token has expired or your AGELO_API_KEY is wrong.