Getting Started with Claude Code
Claude Code is Anthropic's AI coding agent. You type what you want to build in plain English, and it writes the code, creates files, and runs commands for you. Use it in your terminal, or in the Claude desktop app if you'd rather not open one.
In this chapter
- How to set up Claude Code and start your first project
- 3 starter prompts you can copy-paste right now
- Tips and tricks specific to Claude Code
- Common first-time issues and how to avoid them
How to Get Started
-
1
Get a Claude plan Go to claude.ai and create an account. Claude Code needs a paid plan, starting with Pro ($20/month). The free plan doesn't include it.
-
2
Install Claude Code Open Terminal on Mac (or PowerShell on Windows) and paste the installer. Mac or Linux:
curl -fsSL https://claude.ai/install.sh | bash. Windows PowerShell:irm https://claude.ai/install.ps1 | iex. Prefer no terminal? Download the Claude desktop app instead. -
3
Open your project folder In your terminal, go to the folder where you want your project to live. Claude Code works on whatever folder you start it in.
-
4
Type your first prompt Run
claudeto start a session and log in when your browser opens. Then describe what you want to build in plain English. Claude Code will create files, install packages, and set everything up for you.
Your First 3 Prompts
1. Build your first project
“Create a personal portfolio website with a hero section, about me, projects grid, and contact form. Use Next.js and Tailwind CSS with a clean modern design.”
2. Add a feature
“Add a dark mode toggle to my site. Use next-themes and make it persist across page refreshes.”
3. Deploy it
“Deploy this project to Vercel. Walk me through the steps.”
Tips for Working with Claude Code
Be specific about what you want
Instead of 'make a website', say 'create a portfolio with a hero section, 3-column project grid, and a contact form with name, email, and message fields.'
Work in small steps
Build one feature at a time. Get the layout right first, then add functionality, then style it. Don't try to build everything in one prompt.
Use follow-up prompts to iterate
After the first result, say things like 'make the hero section taller' or 'change the color scheme to blue and white'. Claude Code remembers context.
Paste errors directly
If something breaks, paste the full error message. Claude Code can read your project files and fix issues in place.
Ask it to explain
If you want to learn, say 'explain what this code does' or 'why did you use useEffect here?' Claude Code is a great teacher too.
Common First Issues
Run 'claude' in your project folder
Make sure you're in the right directory before starting. Claude Code works on whatever folder you're in.
Say yes to file changes
Claude Code will ask permission before creating or modifying files. Review the changes and approve them.
'claude' not found after installing
Open a new terminal window after the installer finishes, then run
claude --version. If it's still not found, the installer prints a tip for adding it to your PATH.
Node.js is for your project
Claude Code itself doesn't need Node.js, but most JavaScript web projects do. If you don't have it, ask Claude Code: 'help me install Node.js on my Mac/Windows'.