Skip to main content
lua auth manages the credential every other command uses. It changes nothing on the agent; it changes which account, and which access, the CLI acts with. Verified against lua-cli 3.33.0.

Synopsis

Description

configure stores one of two credential kinds. Email sign-in creates a renewable user session: a six-digit code is sent to the address, and the resulting user session is saved under ~/.lua-cli/sessions/ and refreshed automatically. It follows your current access, so joining an organization or creating an agent in the admin dashboard needs no new sign-in. --api-key validates an existing API key against the platform and saves it to ~/.lua-cli/credentials with mode 0600. Saving one kind removes the other, so a machine holds either a user session or a key. Both files hold the secret in plain text; the owner-only permission is the protection. Commands resolve the credential in this order: LUA_API_KEY from the shell or ./.env, then the saved user session, then the credentials file. When LUA_API_KEY is set, configure warns that it masks the credential it saved. The platform classifies a credential when it is used: key prints the stored API key, or LUA_API_KEY when it is set, after a confirmation. With a user session it prints You are signed in with a renewable session. No API key is stored. and exits 0. logout removes the local user session and credentials file and ends this device’s user session on the platform; --all ends every user session of your account. A saved API key is removed only locally and stays valid until you revoke it in the admin dashboard. When the platform cannot confirm the sign-out the CLI warns Local session removed, but Lua could not confirm the sign-out on its side. sessions lists the devices and apps signed in as you, one user session each, with its id, app and version, sign-in method, and last-seen time. sessions revoke <sessionId> signs one of them out.

Arguments

Options

Examples

Sign in interactively and choose email or API key at the prompt:
Sign in with email from a script in two steps; the first step prints the second command to run:
Output
--ci does not stop the prompts of configure, key, or logout; pass --api-key or --email, and --force for key and logout. Save a key on a build machine without prompts:
In CI you can skip configure and export LUA_API_KEY instead; it takes precedence over anything saved. Print the stored key for a secret manager, then sign this device out:
Review the signed-in devices and sign one out:

Exit codes

See also