CLI

A CLI (Command-Line Interface) is a program you use by typing text commands in a terminal instead of clicking in windows. Claude Code is one of these programs: you start it with the claude command and can add flags such as -p, --model or --continue. Other CLIs you'll often use alongside it are git, gh and npm.

A program that you use by typing commands in the terminal, not by clicking. “claude” and “gh” are CLIs.

You’ll also find it as: CLIs

How it shows up in Claude Code

Claude Code also has editor extensions and a desktop app, but at its core is the claude CLI. The documentation has a whole page of its commands and flags. A few you'll use from day one:

  • claude starts a conversation;
  • claude "explain this project" starts it with a first request;
  • claude -c continues the most recent conversation in the current folder;
  • claude -r "name" resumes a specific conversation;
  • claude -p "request" answers once and exits (headless mode);
  • claude update installs the latest version.

Claude Code also runs other CLIs itself: git to see what changed, gh to open a pull request, npm to install packages.

Example

Start Claude straight in plan mode, with a specific model:

claude --permission-mode plan --model opus

Or check which version you have:

claude -v

Common mistakes

  • Typing claude commands into the chat with Claude. They go in the terminal, before it starts. Inside the conversation you use slash commands, such as /model.
  • Forgetting the quotes around a request with spaces: claude -p explain this project won't do what you want.
  • Assuming claude --help shows everything. The documentation says not every flag is listed there.

Related terms and where you learn it

A CLI runs in the terminal. Other examples are gh CLI and npm. Options such as --model are called flags, and inside the conversation you use slash commands.

In the course: the lesson “What is the terminal and how do you open it?” in module 00, Installation and first steps.

Source: Claude Code documentation: CLI reference

How it appears in the course

Install the gh program (the GitHub CLI, GitHub’s tool for the terminal).

How do you use Claude with git? · Module 04, The working method, step by step

The terminal is a window where you type commands instead of clicking. The version that runs there is called Codex CLI.

Where else can you use Codex? · Module 00, Welcome to Codex · free

Codex CLI is Codex in the terminal. It does the same things, but you steer it with text.

Introduction · Module 11, Codex in the terminal, without fear

Learn Claude Code from zero, in plain English

12 modules with 1–2 minute lessons, which you can also do on your phone. The first two modules are free.