What is Claude Code? How to use it, with a first-session tutorial
Claude Code is Anthropic's AI coding agent. Here's what it is, where it runs, what it costs, and a step-by-step tutorial for your first session.

Key takeaways
- Claude Code is Anthropic's AI coding agent: it reads your project, edits files, runs commands and reports back.
- It runs in the terminal, VS Code, JetBrains, the Claude desktop app and the browser, all on the same engine.
- It's free to install but needs a paid Claude plan (Pro or higher) or a Console API account.
- First session: install, run claude in your project, ask about the code, make a small change, review and commit.
- Save your build commands and rules in CLAUDE.md so every session starts with them.
What is Claude Code? Claude Code is Anthropic's AI coding agent. You describe a job in plain words, and it reads your project, edits files across it, runs commands such as your tests, and tells you what it did. Anthropic's own definition: "an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools." It runs in your terminal, in VS Code and JetBrains, in the Claude desktop app and in the browser, and it needs a paid Claude plan or an API account.
This article explains what Claude Code is and isn't, what you can use it for, what it costs, and then walks you through how to use Claude Code in your first session, step by step, as a short Claude Code tutorial. Facts and commands come from Anthropic's Claude Code overview and quickstart, checked on 6 December 2026.
What is Claude Code, in plain words?
Think of the difference between asking a friend for directions and asking them to drive. A chatbot such as the Claude app gives you directions: it writes code for you to copy. Claude Code drives: it works inside your project folder, so it can open any file, change several files at once, run the program, see the error and try again until the job is done.
Each task follows the same loop:
- Read. It looks through your project for the files that matter. You don't have to paste anything in.
- Plan. It works out the steps, and for bigger jobs it can show you the plan first.
- Act. It edits files and runs commands, asking your permission first by default.
- Check. It runs tests or the build, reads the result and fixes what broke.
- Report. It tells you what changed, and you review it.
That loop is why people call it an agent rather than an assistant. It is also why it suits whole tasks ("add a sign-up form with validation and tests") better than single lines of code.
Where you can use Claude Code
All of these run the same Claude Code engine, so your project rules, settings and connected tools work in each one:
- Terminal. The full command-line version. You type
claudein a project folder and chat with it there. - VS Code and Cursor. An extension with inline diffs, @-mentions of files and plan review inside your editor.
- JetBrains IDEs. A plugin for IntelliJ IDEA, PyCharm, WebStorm and others; it needs the terminal version installed too.
- Claude desktop app. The Code tab runs Claude Code without a terminal, with visual diffs and several sessions side by side.
- The web. At claude.ai/code, Claude Code works on your GitHub repositories in the cloud, which suits long tasks you want to check on later, including from the Claude phone app.
- Automation. The same agent runs in GitHub Actions and GitLab CI, and you can script it with
claude -p.
If the terminal puts you off, read how to use Claude Code without the terminal, which compares the no-terminal options.
What Claude Code can do
- Build features and fix bugs. Describe the feature, or paste an error message, and it traces the problem through your code and fixes it.
- Explain a codebase. "What does this project do?" or "where is the main entry point?" are good first questions in any unfamiliar project.
- Do the chores. Write tests for untested code, fix lint errors across a project, update dependencies, resolve merge conflicts, write release notes.
- Use Git for you. Stage changes, write commit messages, create branches and open pull requests.
- Connect to your other tools. Through MCP servers it can read tickets, designs, docs or error reports. See Claude Code MCP for how to add them.
- Follow your rules. A
CLAUDE.mdfile in your project tells it your build commands and coding standards; skills package repeatable workflows; hooks run your own commands before or after its actions. - Work in parallel. It can split a big task between several sub-agents, and run on a schedule for jobs like a weekly dependency check.
What you need to use Claude Code
Claude Code is free to install, but using it needs one of these accounts:
- A Claude Pro, Max, Ultra, Team or Enterprise plan. Pro is $20 a month on Anthropic's pricing page (checked 6 December 2026). The free Claude plan does not include Claude Code.
- A Claude Console account with prepaid API credits, billed per use.
- A company account on Amazon Bedrock, Google Cloud or Microsoft Foundry.
Plan usage refills every five hours and every week and is shared with your Claude app chats. Our Claude Code pricing guide compares every plan and the API.
How to use Claude Code: your first session
This Claude Code tutorial uses the terminal version, because it's the one the official quickstart follows. It takes about ten minutes. Use a real project you know, ideally one tracked with Git, so every change is easy to see and undo.
Step 1: Install Claude Code
On a Mac, Linux or WSL, run curl -fsSL https://claude.ai/install.sh | bash. In Windows PowerShell, run irm https://claude.ai/install.ps1 | iex. Open a new terminal and run claude --version: it should print a version number. If it says the command isn't found, our Claude Code install guide has the fixes, and the Install Claude Code page has every command on one screen.
Step 2: Start it in your project and sign in
cd /path/to/your/project
claude
The first time, Claude Code asks you to log in. Pick your Claude plan or Console account and finish in your browser. It remembers the login. When the prompt appears, it shows the version, the model and the folder you're in.
Step 3: Ask about the project
Start by letting it look around, without changing anything:
what does this project do?
explain the folder structure
It reads the files it needs and answers. This also shows you whether it has understood the project before you let it edit.
Step 4: Make a small change
Give it something small and easy to check, such as "add a hello world function to the main file". Claude Code finds the right file and shows you the change. When it asks permission, choose Yes. You decide how often it asks: press Shift+Tab to switch the permission mode, from asking about every edit to working more freely. Our article on Claude Code's auto mode explains the options.
Step 5: Review and commit with Git
what files have I changed?
commit my changes with a descriptive message
Look at the diff yourself before you commit. The agent is fast, but you're the reviewer. Our guide to reviewing AI-generated code lists what to check.
Step 6: Hand it a real task
Now try the kind of job Claude Code is built for:
there's a bug where users can submit empty forms - fix it
write unit tests for the calculator functions
It plans, edits, runs the tests and reports. If the result isn't right, say what's wrong in plain words; it keeps the context of the conversation.
Step 7: Save your rules in CLAUDE.md
Once you've used it for a while, write down what it should always know: how to build and test, which folders not to touch, your style rules. Put them in a CLAUDE.md file at the project root, which Claude Code reads at the start of every session. If your project already has an AGENTS.md for other agents, Claude Code can read that instead. See CLAUDE.md and AGENTS.md explained.
Claude Code commands to know
| Command | What it does |
|---|---|
claude | Start a session in the current folder |
claude "task" | Start a session with a first request, e.g. claude "fix the build error" |
claude -p "query" | Answer one request and exit; useful in scripts |
claude -c | Continue the most recent conversation in this folder |
claude -r | Pick an earlier conversation to resume |
/help | Show the commands available in a session |
/clear | Start a fresh conversation (bring the old one back with /resume) |
/login | Switch account or sign in again |
/exit or Ctrl+D twice | Leave Claude Code |
Shift+Tab | Switch the permission mode |
Type / in a session to see every command and skill you have, and press ↑ to bring back earlier messages.
Tips for getting good results
- Be specific. Not "fix the bug", but "fix the login bug where users see a blank screen after a wrong password".
- Break big jobs into steps. A numbered list of steps works better than one huge request.
- Let it explore first. Ask it to read and explain the relevant part before you ask for changes.
- Start fresh between tasks.
/clearkeeps old context from confusing it and saves usage. - Keep Git as your safety net. Commit before a big task, so you can always go back. Our article on undoing AI code changes covers the rest.
For more on writing requests, read how to prompt AI coding agents. Weighing it against an AI editor? Our Claude Code vs Cursor page compares the two.
Claude Code in a desktop app
Ninja Builder is a desktop app for Mac, Windows and Linux that runs Claude Code with the Claude account you already have, with no API key to set up and your files staying on your computer. You describe what you want in a chat, and it builds it in a folder you choose, with a team of specialist helpers, step-by-step playbooks and its own checks. Each chat has a live Preview of what it builds and a Git panel to review and commit, and the top bar shows how much of your weekly limit you've used.
It's a good way to start if the terminal is what's holding you back. Download Ninja Builder and sign in with your Claude account.
Frequently asked questions
What is Claude Code?
Claude Code is Anthropic's AI coding agent. You describe a task in plain words, and it reads your project, edits files, runs commands such as tests and reports what it did. It runs in the terminal, IDEs, the Claude desktop app and the browser.
How is Claude Code different from Claude chat?
The Claude app writes code for you to copy. Claude Code works inside your project folder: it can open and change many files, run your program and tests, and fix what breaks until the task is done.
Is Claude Code free?
It's free to install, but using it needs a Claude Pro, Max, Ultra, Team or Enterprise plan, or a Console account with API credits. The free Claude plan doesn't include it.
How do I start using Claude Code?
Install it, open a terminal in your project folder, run claude and sign in. Start with a question like 'what does this project do?', then try a small change and review it before committing.
Do I need to know how to code to use Claude Code?
No, you can describe what you want in plain words. It helps to understand the basics of your project and Git, because you still review the changes it makes.
Keep reading

How to install Claude Code on Mac, Windows and Linux (with fixes for common errors)
Pick the right install method, check it with claude doctor, and fix the errors people actually hit: PATH, PowerShell policy, old npm copies and WSL sign-in.

How to use Claude Code without the terminal
The desktop app, the VS Code extension or a chat app: how to use Claude Code with buttons instead of commands.

How to write CLAUDE.md and AGENTS.md files that agents follow
Write project instruction files that coding agents actually follow, with a copyable template and one setup for every tool.