Skip to content
BENIBIX Learn

claude auth status Command

Also known as claude auth status, Check sign-in from a script

It says if you are signed in, as JSON or text.

Think of it like

It is like you check that your ticket is in your bag.

Example

Jack's nightly script runs Claude Code. It runs claude auth status first, and stops with a clear message when the exit code is 1.

Why it matters

A script that checks first fails with a clear reason, instead of halfway through a job.

Definition

claude auth status tells you whether you are signed in, and how. It prints JSON by default, or plain text with --text. It ends with code 0 when you are signed in and 1 when you are not, so a script can check it. The JSON names the sign-in method, such as claude.ai, an API key or an OAuth token.

Example code

bash
claude auth status --text
Show the sign-in in plain words.
claude auth status is the check at the bottom: 0 means signed in.

Common mistake

Reading only the text and missing the method. Signed in with an API key and with a plan bill in different ways.

Key takeaways

  1. 1
    JSON or text. --text for people.
  2. 2
    Exit 0 or 1. Scripts can check.
  3. 3
    Names the method. Plan, key or token.

Learn it properly