Logging in
5 min
lunax login does not ask you to paste a token. It shows a short code, opens your browser, and waits.
The flow
The CLI displays a user code and a URL. You open the URL while signed in, check that the code on the screen matches the code in your terminal, and approve. The approval screen shows the IP address, the client, and the time of the request — if any of that is not you, reject it.
Codes expire in ten minutes and are single-use. A wrong code can only be tried a few times before that attempt is dead. Both the approval and the rejection are written to your account's audit log.
Tokens for CI
A CI job has no browser. Mint an API key in the dashboard and set LUNAX_TOKEN in your CI environment; the CLI uses it without any interactive step.
Key types
Keys are typed, and the type decides what the key can reach:
deploy — deploy, read your site, read logs. This is what lunax login mints and what a CI job should use. It cannot read your environment variables.
read — site, usage and logs, nothing else. For dashboards and monitoring.
account — the above plus environment variables, domains and members. Only mint one of these when automation genuinely needs it.
A leaked deploy token can redeploy your site. A leaked account token can read every secret in it. That difference is the entire reason the types exist — pick the narrowest one that works.