The command-line interface that turns Claude into an interactive coding partner โ reads your files, runs commands, and builds software alongside you in the terminal.
Claude Code CLI (claude) is a terminal program that opens a conversation with Claude inside your project directory. Unlike the web interface, it can read your files, run shell commands, write code, and remember your project context across an entire session.
You launch it with claude in any folder. From that point Claude can see every file in your project, execute terminal commands with your permission, and build things alongside you โ not just describe them.
# Install npm install -g @anthropic-ai/claude-code # Launch in your project folder cd ~/my-project claude # Or launch with an immediate task (non-interactive) claude --print "List all TODO comments in this codebase"
| Command | What it does |
|---|---|
| /help | Show all available commands and keyboard shortcuts |
| /status | Show current model, context usage, and session info |
| /model | Switch between Opus, Sonnet, or Haiku mid-session |
| /compact | Compress conversation history to free up context window |
| /clear | Wipe session history and start fresh (keeps project files) |
| /review | Ask Claude to audit the current project for issues |
| /init | Generate a CLAUDE.md for the current project |
| /config | Open Claude Code settings |
Open Claude in your project and describe the failure. Claude reads the test file, the source file, and the error โ then explains and fixes it.
Point Claude at a specific file and tell it exactly what to change. The constraint "don't change behavior" keeps the refactor safe.
Describe the feature clearly โ stack, behavior, files. Claude scaffolds everything: route, controller, model, tests.
Use the --print flag to run a one-shot audit without opening an interactive session. Great for CI or quick checks.
claude --print "Audit every JS file for missing error handling on async functions. List file:line for each issue."
Drop Claude into a legacy project and ask it to read, understand, and document what it finds. Saves hours of archaeology.
alias c="claude" to your shell profile. Two keystrokes to launch Claude in any project.