Claude Code CLI: How to Start and When to Use Desktop or VS Code
Install Claude Code in your shell, approve your first edit, and choose between the terminal, the desktop Code tab and the VS Code extension.
Published

Use the Claude Code CLI when you want to send a file into Claude from the terminal and get an answer back in a script. Of the 3 ways to work here, the VS Code extension is the easiest place to review an edit beside your source, and the desktop Code tab is the easiest place to watch several tasks at once.
What is Claude Code CLI?
Claude Code is Anthropic’s coding agent. Its command-line interface (CLI) lets you open a conversation in a project folder by typing claude. Ask where the app starts and it can read across files to find the answer. Ask it to change how the app starts and it can edit those files and run commands. Think of the project folder as the folder you hand a colleague with your question. Choose it before you ask.
Access. The CLI accepts Pro ($20 billed monthly), Max, Ultra, Team or Enterprise, a Claude Console account with prepaid API credits, or access through a supported organizational provider. Anthropic’s pricing · Claude Code plans explained
The commands and interface differences below were checked against Anthropic’s public documentation on December 1, 2026. If you're still deciding whether to give a coding agent access to a project, the Claude Code review covers that broader decision.
How to install Claude Code CLI in your shell
Anthropic recommends its native installer. On a Mac or Linux machine, open a terminal. On Windows, look at the prompt first. A prompt starting with PS means PowerShell. A drive path such as C:\Users\Sam> without that prefix usually means Command Prompt (CMD). If you deliberately opened a Linux distribution through Windows Subsystem for Linux (WSL), use the Linux command inside it. Anthropic’s installation quickstart

macOS, Linux or WSL
curl -fsSL https://claude.ai/install.sh | bashWindows PowerShell
irm https://claude.ai/install.ps1 | iexWindows Command Prompt
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdWhen the installer finishes, open a new terminal window and run claude --version. A version number confirms the shell can find Claude Code. If Windows says it cannot recognize irm, check whether you pasted the PowerShell line into CMD. If the installer finished but the new terminal cannot find claude, check PATH, the list of folders your shell searches for programs.
How to update Claude Code CLI
The native installation updates in the background. Restart Claude Code to pick up a downloaded update, or run claude update to request one. If you installed the stable Homebrew cask instead, use brew upgrade claude-code. For a WinGet installation, use winget upgrade Anthropic.ClaudeCode. Anthropic’s setup and update guide
How to use Claude Code CLI for a first edit
Start with a change you can judge by reading it. A sentence in the README is a good choice, especially in a project you’ve just inherited.
Open the project and sign in
Open a terminal in the folder containing the project’s README. Type
claudeand press Enter. On first use with a Claude subscription or Console account, follow the browser sign-in, then return to the terminal. Check the working directory above the prompt before asking about the code.Find the entry point
Ask
where is the main entry point?, an example from Anthropic’s quickstart. Claude can inspect the project files. Follow up by asking which file a new contributor should read first and why. Open that file to see whether the explanation fits.Review a small change
Ask, “Add one sentence to the README telling a new contributor where the app starts. Leave the source files alone.” When a permission request appears, read the filename and proposed sentence. Choose Yes if both match your request. Decline if Claude proposes editing the application itself, then clarify the task. Whether Claude pauses for approval depends on the session’s permission mode.
Find help and finish
Type
/helpinside the conversation to see the available commands. Use/exitto return to your ordinary shell prompt.

For a longer walkthrough after this edit, follow the project guide to using Claude Code.
Claude Code CLI commands worth remembering
At the shell prompt, decide whether you want a conversation, a single answer, or an earlier conversation back. A flag is an option you add after the program name. These examples come from the CLI command and flag reference.
For a repeatable README check, the following shell pipeline passes the file’s contents into Claude. The vertical bar is a pipe. It takes the output of the command on its left and supplies it to the command on its right.
cat README.md | claude -p "Which setup instructions would a new contributor need clarified?"Run it from the folder containing README.md. Use the interactive version when you want to debate a suggested revision. If you find yourself repeating the same review instructions, Claude Code skills let you package them for reuse. To attach a check to a particular event, see the guide to Claude Code hooks.
Terminal, desktop Code tab or VS Code extension?
Choose by where you need the result. A script needs text it can consume. A reviewer needs the old and new lines together. Someone overseeing several tasks needs to see which session needs attention. Anthropic documents the differences in its desktop feature reference and VS Code extension guide.
For a founder reviewing a page change, Desktop lets you keep the app preview beside the proposed edit. For a developer already reading a function in VS Code, selecting the relevant lines is a shorter path to a precise question. Neither graphical interface requires a separate terminal installation to get started. Desktop setup instructions
What do you miss in the VS Code extension?
In the extension, type / to see which commands and skills the panel offers. The terminal also has a ! shortcut for running a Bash command inside the conversation. The panel lacks that shortcut, but both interfaces support checkpoints and configuring MCP servers, which connect Claude to external tools.
Stay in the extension until you need one of those terminal features. Then install the standalone CLI and open the integrated terminal inside VS Code. Run claude --resume and pick the conversation you started in the panel. The two share conversation history, so you can keep the earlier explanation of the code and the edit you discussed.
Does the desktop app use more of your allowance than the CLI?
Anthropic publishes no fixed Desktop-to-CLI usage ratio in its desktop or cost documentation. Desktop uses the same underlying engine. That alone cannot tell you what two sessions will consume. The model, the size of the codebase and the number of sessions doing work all matter. A suggested next prompt can also trigger a small background request, a behavior Anthropic documents for Claude Code generally.
If you had several tasks running in Desktop and one in the terminal, count the active tasks before drawing a conclusion about the interface. Subscribers can use /usage to see plan usage bars. The session’s estimated API cost is a different figure from the amount billed for a subscription. Anthropic’s usage guide · Claude usage limits by plan
Common terminal questions
Is there a CLI for the Claude code?
Yes. The executable is named claude. Run it in your project folder to start a conversation.
Can I run claude locally?
The CLI runs on your machine and can work on local files. It sends requests over the network to the language model. If the project requires fully offline inference, this setup does not meet that requirement. Anthropic’s data-flow documentation
How to use CLI in cmd?
Run the Windows Command Prompt installer above, open a fresh CMD window in the project directory and type claude.
What is CLI vs CMD?
A CLI is any interface you operate by typing commands. CMD is the Windows command interpreter where you can launch programs such as Claude Code.
Is CLI faster than GUI?
For repeated tasks, a saved shell command can save you clicks. Anthropic’s interface guides give no general speed advantage for generating an answer.
Why is CLI still used?
A script can pass input to Claude and collect the answer without someone opening a chat or copying text by hand.
Which is better, CLI or IDE?
Use the CLI when the result feeds another command. Choose an integrated development environment (IDE) such as VS Code when you need the answer next to the file you’re editing. You can run the CLI inside that editor too.
Why do people prefer CLI over GUI?
A practical reason is repeatability. You can save the README check above and run the same question after the next documentation change.
Is CLI just the terminal?
The terminal is the application where you type. Claude Code’s CLI is one program you can start there. After you exit Claude, the terminal stays open.
If you want to keep Claude beside your files, compare the best IDEs for Claude Code.
- Published
- Category
- Build








