Guide · 2 of 8
Get Claude Code
Claude Code is an agent that lives in your terminal. You tell it what you want in plain words. It reads your files, writes code and runs commands, and it asks before it does anything big. By the end of this page it will be installed, logged in, and it will have built a small web page for you.
You need
- A terminal, git and a
~/codefolder. If any of that is new, do Set up your computer first. - A paid Claude plan, or a Claude Console account with credits. More on that in step 2.
1. Install it
One command installs Claude Code. It also keeps itself up to date after that.
Mac
- Paste this into your terminal and press Enter.
curl -fsSL https://claude.ai/install.sh | bashYou should see: nothing for a while. The installer prints nothing while it downloads. Wait for the prompt to come back, then read the last few lines.
If you use Homebrew, brew install --cask claude-code also works. That version does not update itself; run brew upgrade claude-code now and then.
Windows
WSL (Ubuntu), recommended: open Ubuntu and run the same command as Mac and Linux.
-
curl -fsSL https://claude.ai/install.sh | bashYou should see: nothing for a while. It prints nothing while it downloads. Wait for the prompt to come back.
PowerShell: install Git for Windows first (see chapter 1), so Claude Code can run its commands. Then run:
irm https://claude.ai/install.ps1 | iex
From the old Command Prompt (CMD) instead, run:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
winget install Anthropic.ClaudeCode also works, but that version does not update itself.
Linux
-
curl -fsSL https://claude.ai/install.sh | bashYou should see: nothing for a while. The installer prints nothing while it downloads. Wait for the prompt to come back.
- Close the terminal and open a new one. The new terminal is the one that knows about
claude. - Check the install:
claude --versionYou should see: a version number followed by
(Claude Code), like2.1.316 (Claude Code). Your number will be different. That is fine.
2. Pick a plan and log in
Claude Code needs an account that includes it. These work:
- Claude Pro, Max, Ultra, Team or Enterprise.
- A Claude Console account with prepaid credits. Console is the pay-as-you-go side, where you pay for exactly what you use.
The free Claude plan does not include Claude Code. If you are starting out, Pro is the entry plan. At the time of writing (November 2026) Pro was US$20 a month. Prices change, so check claude.com/pricing.
- Make a folder for a first test project and move into it.
mkdir ~/code/hellocd ~/code/hello - Start Claude Code.
claudeYou should see: Claude Code asks you to log in, and your web browser opens a Claude page.
- Log in in the browser with the account that has the plan. Approve the request. Then go back to the terminal.
You should see: a welcome message and a box where you can type. It may ask if you trust the files in this folder. You made the folder, so say yes.
3. Your first session
Commands that start with a slash, like /help, are for Claude Code itself. Everything else you type is a message to the agent. Write to it the way you would message a friend who codes.
- Ask for something small. Type this and press Enter:
Make an index.html that says Hello and shows today's date. Keep it to one file.You should see: Claude Code says what it plans to do, then asks permission to create
index.html. Read what it wants to do. Then say yes. - Look at the page. Open a second terminal, go to the folder, and open the file in your browser.
cd ~/code/helloMac
open index.htmlWindows
In WSL (Ubuntu):
explorer.exe index.htmlIn PowerShell:
start index.htmlLinux
xdg-open index.htmlYou should see: a web page with "Hello" and today's date. You described it, and there it is.
- Back in Claude Code, set up its memory file:
/initYou should see: it looks around the folder and writes a file called
CLAUDE.md. Claude Code reads this file at the start of every session. It is where the rules of a project go: what it is, how to run it, what not to touch. You can edit it yourself any time. - Ask it a question:
What does this project do?You should see: a short, plain answer about your Hello page. Questions are safe. It only reads.
- Make a tiny change:
Make the background dark blue and the text white.You should see: it shows the change it wants to make to
index.htmland asks first. Say yes. Then reload the page in your browser. It is blue now.
Permission modes (Shift+Tab)
Press Shift + Tab in the box. Each press moves to the next mode. The line under the box tells you which one you are in.
- Ask every time. The normal mode. Claude Code asks before it changes a file or runs a command. Start here.
- Accept edits. It changes files without asking, but still asks before running commands. Handy once you trust what it is doing in a project.
- Plan first. It reads and thinks, then shows you a plan, and changes nothing until you agree. Use this for anything bigger than a few lines. Reading a plan is much easier than untangling a mess.
Commands worth knowing
/helpshows every command./clearwipes the conversation and starts fresh in the same folder. Use it when you switch to a new task./compactsqueezes a long conversation into a short summary, so it can keep going./modelpicks which Claude model it uses./resumepicks up an earlier conversation./exitquits. Pressing Ctrl + D twice does the same.
From the terminal, before you start it:
- Pick up where you left off last time in this folder:
claude -cYou should see: your last conversation, ready to continue.
- Choose from older sessions:
claude -r
From here on, hand it the commands
You now have a program that knows the terminal, git, GitHub and Cloudflare far better than most people. The rest of this guide still shows the commands, folded away under "By hand", for when you are curious. You do not have to learn them. Say what you want in plain words, read what it asks to run, say yes. After a few projects you will know the commands anyway, just from watching.
4. Limits
Every plan has two limits on how much you can use it.
- A 5-hour window. Your use is counted over a rolling 5 hours. Use a lot in one sitting and you hit the limit. Then you wait until it resets.
- A weekly cap. On top of that, there is a limit for the whole week.
Hitting one feels like this. You are in the middle of something. Claude Code tells you that you have hit your limit. It stops working until the limit resets. Your files are fine, and nothing is lost. You just have to wait, or upgrade your plan.
Long conversations use more than short ones, because the agent rereads the whole conversation each turn. Two habits help you spend less:
- Use
/clearwhen you finish one task and start another. - Use
/compactwhen one task is getting long. - Pick the model to fit the job. Plans and hard bugs get the big one, everyday work gets Sonnet. See Which model, and when.
Other ways in
- Desktop app for Mac and Windows, if you prefer windows to a terminal.
- VS Code extension puts Claude Code inside your editor. There is one for JetBrains editors too.
- claude.ai/code runs it in your web browser.
Want a second explanation? Anthropic has a free course, Claude Code 101, at academy.claude.com.
If it didn't
What you just did
You installed Claude Code and logged in with a plan. You had it build a page, wrote its memory file with /init, asked it a question and changed the page. You know the three permission modes and what the limits feel like.