Skip to content
BENIBIX Learn

claude auth login Command

Also known as claude auth login, claude auth logout, claude auth

It signs you in from the shell. claude auth logout signs you out.

Think of it like

It is like you sign the book at the front desk so you can go in.

Example

Emma sets up a new laptop with a script. The script runs claude auth login --sso, she finishes the sign-in in the browser, and the setup goes on.

Why it matters

Setup scripts can sign in as a step, the same way every time, with no chat to open.

Definition

claude auth login signs you in to your Anthropic account from the shell, with no session open. Add --console to sign in with a Console account that pays by use, not a Claude plan. Add --sso to use your company's single sign-on, or --email to fill in your address. claude auth logout signs you out.

Example code

bash
claude auth login --console
Sign in with a Console account.
claude auth login is the top path: a person, a browser, this computer.

Common mistake

Using it in a CI job. A CI job has no browser, so it uses a token from claude setup-token instead.

Key takeaways

  1. 1
    From the shell. No session.
  2. 2
    Pick a way. --console, --sso.
  3. 3
    logout. Signs you out.

Compare

Learn it properly