How to Run Claude Code in Your Terminal
Learn how to use Claude Code in terminal: install, authenticate, start your first session, run common commands, and pick the right shell to run it in.
If you want to know how to use Claude Code in your terminal, the short version is: install the CLI, sign in, point it at a folder of code, and start typing in plain English. It runs as a command-line agent — no IDE required, no special setup beyond a terminal window you already have.
This is a beginner's walkthrough. We'll go step by step: install, authenticate, your first session, the commands you'll actually use, and the part most guides skip — which terminal or shell you run it inside, because that's the thing you stare at all day. Let's get into it.
1. Install the Claude Code CLI
Claude Code is a CLI tool, which means it lives in your terminal, not in a separate window. You install it once, globally, and then run it from any project folder.
On macOS or Linux, the usual route is npm:
npm install -g @anthropic-ai/claude-code
You'll need a recent Node.js installed first. On Windows, Claude Code runs well under WSL (Windows Subsystem for Linux), and Anthropic has been expanding native support — check Anthropic's install docs for the current recommended method, since this changes.
Once it's installed, confirm it's on your path by running:
claude --version
If you get a version number back, you're ready. If the command isn't found, your shell can't see the install location — reopen your terminal or check that your global npm bin directory is on your PATH.
2. How to Start Claude Code in Your Terminal
Here's the part people search for most: how to start Claude Code in the terminal once it's installed. It's almost anticlimactic.
Navigate to the project you want to work on, then launch:
cd ~/projects/my-app
claude
That's it. The claude command starts an interactive session right there in your terminal. Claude Code reads the folder you're in as the working directory — it can see your files, run commands, and make edits inside that project (with your permission for anything destructive).
The first time you run it, you'll hit authentication, which is the next step. After that, starting a session is always just cd into a folder and type claude. If you'd rather one-shot a single request without the interactive loop, you can pass a prompt directly:
claude "explain what this repo does"
For the bigger picture of where the CLI fits next to Anthropic's other options, we wrote a full comparison: Claude Code CLI vs. desktop app vs. IDE extension. The CLI is the most flexible of the three, and it's the one this guide is about.
3. Authenticate Your Account
On first launch, Claude Code will ask you to log in. You authenticate one of two ways:
- A Claude subscription — you sign in through your browser, and your plan's usage covers your sessions.
- An API key — you set a key from the Anthropic console and pay per usage.
Which one makes sense depends on how heavily you use it. Pricing and the limits attached to each plan change often enough that quoting a number here would just go stale — check Anthropic for current pricing and limits. We keep a running plain-English explainer at is Claude Code free? that covers the difference between the subscription and API routes without pretending the numbers are frozen.
Once you've authenticated, the credential is stored and you won't be asked again on that machine. From here on, claude just opens.
4. Use Claude Code in Your Terminal: Your First Session and the Commands You'll Use
Now the fun part. To use Claude Code in your terminal, type a request in plain language:
add a health-check endpoint that returns 200 and the app version
Claude Code will read the relevant files, propose changes, and ask before it edits or runs anything risky. You stay in control — approve, reject, or redirect.
A handful of things are worth knowing early:
- Slash commands. Type
/to see built-in commands./clearresets the conversation context,/helplists what's available, and/initsets up a project memory file so the agent remembers your conventions across sessions. - Plain English beats jargon. You don't need to phrase things like a prompt engineer. Describe the outcome.
- Reference files directly. Mention a filename and it'll go read it.
- Let it run, then review. Treat it like a fast junior pair — it does the typing, you do the judging.
When you're done, exit the session with /exit or Ctrl+C. Your shell history and the project are right where you left them.
5. Pick the Terminal or Shell You Run It In
Claude Code runs in any terminal. But "any terminal" undersells how much the surrounding environment matters when you stare at an agent's output for hours. This is the choice nobody walks you through.
A quick map of what each option actually optimizes for:
Pick a native emulator if you want raw correctness and speed. Ghostty (Mitchell Hashimoto's GPU-accelerated, open-source terminal), Alacritty, WezTerm, and Kitty are fast, config-file-driven, and get out of your way. Ghostty in particular is about as correct and quick as native terminals get. None of them know or care that Claude Code is an AI — they just render it flawlessly. iTerm2 is the mature, batteries-included classic if you want a deep GUI.
Pick an all-in-one if you want the agent and terminal from one vendor. Warp is a polished Rust terminal with its own built-in proprietary AI agent, cloud sync, and team features, on a paid subscription tier — check Warp for current pricing. If you'd rather your terminal ship its own AI layer instead of running Claude Code, that's the trade. Wave Terminal is the most ambitious rethink — block-based workspace, inline graphics and file previews, built-in chat, free with a paid cloud tier.
Pick MOLTamp if you want a shell built specifically around running an AI agent. This is what we make, so call it biased — but here's the honest framing. MOLTamp isn't a terminal-emulator competitor and it isn't an AI. It's a skinnable Electron shell that wraps the agent you're already running. Skins, widgets, audio visualizers, a music player, and a community marketplace — the visual and customization layer around Claude Code (or Codex CLI, Gemini CLI, Aider). If you live in the agent loop all day and want it to feel like your environment instead of a beige rectangle, that's the niche it fills. We broke down the setup in how to customize Claude Code with MOLTamp.
To run multiple Claude Code agents in parallel, that's a different problem — look at Conductor, a Mac app built for orchestrating several agents at once.
The honest take: any of these will run Claude Code fine. The native emulators win on speed, Warp wins on integrated AI, and MOLTamp wins if you care about how the thing looks and feels while you use it.
FAQ
How do I start Claude Code in the terminal?
Install the CLI, then cd into your project folder and type claude. The first launch walks you through authentication; after that, the same command opens an interactive session every time. To skip the interactive loop, pass your request inline as claude "your prompt".
How do I use Claude in the terminal without an IDE?
You don't need an IDE at all — that's the whole point of the CLI. Claude Code runs entirely in your terminal, reads the folder you launch it from, and edits files in place with your approval. If you prefer an editor integration, Anthropic also ships VS Code and JetBrains extensions, but the terminal version is the most portable.
How do I open a terminal to run Claude in?
On macOS, open Terminal (or iTerm2, Ghostty, or MOLTamp); on Windows, use WSL or Windows Terminal; on Linux, your distro's terminal. Any of them works — Claude Code doesn't require a specific one. Pick whichever shell environment you're most comfortable living in, since you'll be looking at it constantly.
Is Claude Code free to use in the terminal?
The CLI tool itself is free to install, but running it consumes either your Claude subscription usage or pay-as-you-go API credits. The pricing and limits change regularly, so check Anthropic for current details. We keep an ongoing explainer at is Claude Code free? for the current state of play.
What's the best terminal for running Claude Code?
There's no single winner — it depends on what you value. Native emulators like Ghostty are fastest and most correct, Warp bundles its own AI, and MOLTamp gives you a fully skinnable shell built around the agent. Try the one whose trade-off matches how you work.
The honest close: this category is still early, and "the right terminal for Claude Code" mostly comes down to taste. If you want raw speed, grab a native emulator. If you want the agent baked in, look at Warp. And if you want the shell around Claude Code to actually feel like yours — skins, widgets, visualizers — MOLTamp is free forever, with an optional one-time Pro unlock if you want to remove the occasional support popup. Download it and run your first session in something you don't mind staring at all day.