Claude Code puts Anthropic’s coding agent inside your terminal. Here is how to install it, sign in and give it useful work without casually handing it permission to rearrange your entire project.
I have a weakness for AI tools that promise to remove boring work from my day.
I also have a growing collection of stories about tools that removed the boring work by replacing it with a completely new problem.
Claude Code sits on the more useful side of that line.
It is Anthropic’s coding agent for the terminal. You open it inside a project and speak to it in normal language. It can inspect the codebase, explain how things fit together, edit files, run commands and keep working through a task until there is something you can actually review.
That is much more useful than copying a function into a browser, asking a chatbot what is wrong and then trying to remember which file it came from.
What is Claude Code?
Claude Code is an agentic coding tool made by Anthropic. It runs from your terminal and works with the project directory you choose.
It can help you:
- Understand an unfamiliar repository.
- Trace where a feature is implemented.
- Diagnose bugs and failing tests.
- Edit code across several files.
- Run builds, tests and development commands.
- Work with Git and review changes.
- Resume longer coding sessions later.
The interface runs on your computer, but Claude itself is not an offline model. Your prompts and the relevant context Claude needs are processed through Anthropic or the configured model provider.
So, no, “it runs in my terminal” does not mean your code has entered an impenetrable local bunker. Check the data policy attached to your account before using any AI coding agent with sensitive or regulated projects.
What you need before installing it
- A supported macOS, Linux or Windows machine.
- An internet connection for authentication and AI processing.
- A Claude Pro or Max subscription, an Anthropic Console account with billing, or an approved enterprise provider.
- A terminal.
- A project you are allowed to share with the configured AI service.
- Git, ideally, so every change can be inspected and reversed.
Anthropic’s setup documentation currently supports macOS, Linux and Windows. The native installer is now the recommended route, while the older npm installation is deprecated. Check the current Claude Code installation guidance.
Before your first session: commit the project to Git. An AI agent is much easier to test when you can see every changed line and roll it back without drama.
How to install Claude Code on macOS or Linux
Open your terminal and run Anthropic’s native installer:
curl -fsSL https://claude.ai/install.sh | bash
Close and reopen your terminal if the installer updates your PATH. Then check the installation:
claude --version
Install with Homebrew
Mac users can also install the stable Homebrew cask:
brew install --cask claude-code
Homebrew installations do not follow Claude Code’s normal automatic updater, so update the cask periodically:
brew upgrade --cask claude-code
How to install Claude Code on Windows
Open PowerShell and run:
irm https://claude.ai/install.ps1 | iex
You can also install it with WinGet:
winget install Anthropic.ClaudeCode
Then open a new terminal window and confirm it works:
claude --version
Claude Code can also run through WSL. If the native Windows route gives you trouble and you already develop inside WSL, open the WSL terminal and use the Linux installer.
Should you install Claude Code with npm?
You may still find older tutorials telling you to run:
npm install -g @anthropic-ai/claude-code
That method used to be standard. Anthropic now marks the npm installation as deprecated and recommends the native installer instead.
If you already installed Claude Code through npm, run the diagnostic command:
claude doctor
An existing npm installation may offer to migrate itself:
claude migrate-installer
Also, do not solve npm permission errors by adding sudo to a global installation command. That can create a far more irritating permissions problem for Future You.
How to sign in to Claude Code
Move into the project you want Claude to work with:
cd path/to/your-project
Start Claude Code:
claude
The first launch will ask you to authenticate. The main options are:
- Claude Pro or Max: sign in with the Claude.ai account attached to your subscription.
- Anthropic Console: connect to a Console account with active API billing.
- Enterprise providers: use a configured Amazon Bedrock or Google Vertex AI deployment.
Choose the option that matches the account paying for your usage. A normal free Claude account is not the same thing as an API account with billing.
Anthropic stores the resulting credentials on your machine. Organisations should review credential management and provider settings before rolling the tool out across a team. Read Anthropic’s setup and authentication guide.
Your first Claude Code session
Claude Code opens inside the current folder, so check where you are before starting:
pwd
git status
claude
Your first prompt should be small enough to verify.
Explain the structure of this repository. Do not change any files.
Then try a diagnostic task:
Find the cause of the failing login test. Explain the evidence before making changes.
If the diagnosis makes sense, turn it into a bounded implementation task:
Fix the failing login test. Keep the change narrowly scoped, run the relevant tests and summarise exactly what changed.
This is a much better test than asking it to “make the app better”, which is roughly the software equivalent of giving a builder your house keys and saying you would like more ambience.
Permissions: what Claude Code is allowed to do
Claude Code asks for permission before taking actions that need approval. You can also begin in Plan mode when you want it to inspect and think before editing:
claude --permission-mode plan
I use that approach in unfamiliar projects. Claude can trace the problem and propose a route without immediately changing files.
Claude Code also exposes a flag that skips permission prompts. Its name includes the word “dangerously” for a reason. Do not use it casually on your normal machine, a production repository or any project with valuable credentials.
Permission prompts are not annoying admin. They are the moment where you check whether the agent’s interpretation still matches your intention.
Useful commands to remember
claudestarts an interactive session.claude "explain this project"starts with an initial prompt.claude -ccontinues the most recent conversation in that directory.claude --resumelets you return to an earlier session.claude doctorchecks the installation and configuration.claude updateupdates native installations.
Anthropic maintains the current flags and examples in its Claude Code CLI reference.
What Claude Code is good at
The strongest part of the experience is context. Claude is not looking at one isolated snippet. It can follow imports, inspect configuration, find related tests and understand how the requested change fits into the repository.
I find that useful for:
- Mapping a codebase I did not write.
- Tracing bugs across several files.
- Implementing repetitive but well-defined changes.
- Writing tests around existing behaviour.
- Explaining technical debt before touching it.
- Reviewing a change and looking for what was missed.
It feels less like requesting a code sample and more like briefing someone who is already sitting inside the project.
Where it can still go wrong
Claude Code can misunderstand you, edit too broadly or produce a technically tidy answer to the wrong problem.
- Review the diff instead of trusting the summary.
- Check which commands it wants to run.
- Watch for unnecessary dependencies.
- Do not let a passing test replace product judgement.
- Keep credentials and production access outside the workspace where possible.
- Ask it to state anything it could not verify.
The tool is at its best when the task has a clear finish line. “Make this faster” invites interpretation. “Reduce this endpoint’s duplicate database calls without changing its response, then run these tests” gives everyone a chance.
My verdict
Claude Code is one of the more convincing reasons to use an AI coding agent from the terminal.
It removes the constant copy-and-paste routine, keeps the conversation attached to the real repository and can verify its work with the same tools a developer would use.
The installation is now pleasantly short. The more important setup is deciding what Claude may access, how much it can change and what evidence you expect before calling a task finished.
Would I use it on a real project? Yes, with Git, sensible permissions and a task I can clearly verify.
That is not distrust. It is just good management, whether the developer is human or living in your terminal.