# Claude Code CLI Command

> A command you type in the shell after claude, outside a chat.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** claude subcommand, Claude Code CLI commands, claude command line

## Think of it like

It is like the buttons on the outside of a toy box. You use them before you open it.

## Definition

A Claude Code CLI command is a word you type after claude in your shell, such as claude update or claude auth status. It runs, prints its answer and stops, with no chat. That is the difference from a slash command, which you type inside a running session. Most CLI commands install, sign in, check or clean up, or look after background sessions. If you mistype one, Claude Code says the closest match and stops.

## Example

Jack wants to know which account his laptop uses. He does not open a chat. He types claude auth status in his shell and reads the answer.

## Example code

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

A CLI command: it prints and stops.

## Why it matters

Scripts and CI jobs cannot type into a chat. CLI commands are what they can run.

## Common mistake

Typing claude doctor inside a session, or /doctor in the shell. One belongs in the shell, the other inside a chat.

## Three principles

- **Typed in the shell.** After claude.
- **No chat.** It prints and stops.
- **Scripts can run it.** CI too.

## Related terms

- [Claude Code](https://learn.benibix.com/term/ai/claude-code)
- [Claude Code Slash Command](https://learn.benibix.com/term/ai/claude-code-slash-command)
- [Non-Interactive Mode](https://learn.benibix.com/term/ai/non-interactive-mode)
- [Terminal](https://learn.benibix.com/term/infrastructure/terminal)

## Told apart from

- [Claude Code CLI Command vs Slash Command](https://learn.benibix.com/compare/claude-code-cli-command-vs-claude-code-slash-command): People think claude doctor and /doctor are the same command typed two ways. They are not. A CLI command is typed in your shell after claude, runs, prints and stops, with no chat. Scripts and CI jobs can run it. A slash command is typed inside a running session and acts on that chat. So claude doctor only reads your install, even when Claude Code will not start, while /doctor runs inside a chat and offers fixes.

## Taught in

- [Slash Commands and the CLI](https://learn.benibix.com/learn/ai-claude-code-commands/slash-commands-and-the-cli): Claude Code Commands, 1/17

![Two prompts. In the shell you type claude and a word, such as claude update. Inside a session you type a slash, such as /model.](https://learn.benibix.com/diagrams/cli-shell-vs-session.svg)

---

Source: https://learn.benibix.com/term/ai/claude-code-cli-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.
