# claude auth status Command

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

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** claude auth status, Check sign-in from a script

## Think of it like

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

## 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

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.

## Example code

```bash
claude auth status --text
```

Show the sign-in in plain words.

## Why it matters

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

## Common mistake

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

## Three principles

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

## Related terms

- [claude auth login Command](https://learn.benibix.com/term/ai/claude-auth-login-command)
- [/status Command](https://learn.benibix.com/term/ai/status-command)
- [claude setup-token Command](https://learn.benibix.com/term/ai/claude-setup-token-command)

## Taught in

- [Claude Code Login Commands](https://learn.benibix.com/learn/ai-claude-code-commands/claude-code-login-commands): Claude Code Commands, 3/17

![claude auth login signs you in on this computer. claude setup-token prints a one-year token that a CI job uses instead. claude auth status answers 0 or 1.](https://learn.benibix.com/diagrams/cli-auth.svg)

---

Source: https://learn.benibix.com/term/ai/claude-auth-status-command
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
