lizard login

Sign in to Lizard, then start a plan if the account has none.

Usage

lizard login [flags]

At a terminal, login asks whether you sign in with GitHub or Google, opens that page in your browser and waits until you approve. If you already have an account, pick the method you signed up with: the other one opens a second, empty account unless both share a verified email. The link works for 5 minutes.

Once you are signed in, login checks the plan. An account with no plan is offered the 7-day Pro trial, or Pro at $19 a month if it has had its trial. Say yes, and it opens Stripe Checkout. Then it lists commands to try next.

On a machine that is already signed in, login shows the account and goes straight to the plan, so it is safe to run again. To switch accounts, run lizard logout first.

The install scripts run lizard login as their last step. Set LIZARD_NO_LOGIN=1 to skip it; in CI they skip it on their own.

You rarely need login before other commands: any command run at a terminal on a machine that is not signed in signs you in first, then carries on.

Flags

FlagDescription
--githubSign in with GitHub, without the question
--googleSign in with Google, without the question
--token <token>Sign in with an API key (liz_…)
--token-stdinRead the API key from stdin, which keeps it out of the process list and shell history

Output for agents

With --json, or when stdout is not a terminal, login prints one JSON object. It never opens a browser and never waits.

  • Before sign-in, it prints status: "pending", authUrls with one link per method, authUrl, expiresAt and an instruction. Hand the link to the user, then run the command again once the browser says “CLI authorized”.
  • After sign-in, it prints status: "complete", the username, account.state with an instruction about the plan, and next commands.

It never starts a plan. To start one, run lizard billing start --json and hand the user the Checkout url.

Other commands work the same way without a terminal: they fail with exit code 2 and code NOT_AUTHENTICATED, and the error body carries the same links under login.

Examples

Log in via browser

lizard login
lizard login --google   # skip the question

Log in with an API key

Create a key with lizard keys create <name>, then:

lizard login --token liz_xxx
# or, to keep the key out of shell history
printf '%s' "$LIZARD_TOKEN" | lizard login --token-stdin

Log in non-interactively in CI

In CI or other non-interactive environments, set LIZARD_TOKEN (or LIZARD_API_KEY) in the environment instead of running login:

export LIZARD_TOKEN=liz_xxx

See also

Updated