Skip to content

Claude Code: Agentic AI Coding in Your Terminal

March 26, 2026 AI & ML Development

What Is Claude Code?

Claude.ai in the browser is great for chatting about code. Claude Desktop adds local file access. But Claude Code is something different entirely – it’s a fully agentic coding tool that lives in your terminal and can actually do things to your codebase: read files, write files, run commands, execute tests, install packages, and commit to Git. All with your approval at each step.

If you’ve ever wished you could just describe what you want and have an AI go away and build it while you grab a coffee, Claude Code is the closest thing we currently have to that.

What You’ll Need Before Starting

  • Node.js 18 or higher – Claude Code is installed via npm. Check your version with node --version.
  • A terminal – Command Prompt or PowerShell on Windows, Terminal on Mac, your preferred terminal on Linux.
  • A Claude account – either via Claude.ai (Pro or above) or an Anthropic API key.

Installing Claude Code

Installation is a single command:

npm install -g @anthropic-ai/claude-code

This installs Claude Code globally so you can use it from any directory. Once installed, run:

claude

The first time you run it, it’ll walk you through authentication – either logging in with your Claude.ai account or entering an API key. Follow the prompts and you’re in.

Your First Claude Code Session

Navigate to a project directory in your terminal, then launch Claude Code:

cd my-project
claude

You’ll see an interactive prompt. Try something like:

> What files are in this project and what does it do?

Claude Code will read your file structure and give you a summary. From there, you can start asking it to make changes:

> Add input validation to the createUser function in src/users.js
> Write unit tests for the auth module
> Refactor the database connection logic into its own module

Before Claude Code makes any changes to your files, it shows you exactly what it’s going to do and asks for confirmation. You’re always in control.

Key Commands to Know

  • claude – start an interactive session in the current directory
  • claude "your prompt here" – run a one-off task without entering interactive mode
  • claude --continue – resume your last session
  • claude --help – see all available options
  • During a session, type /help to see a list of slash commands
  • /clear – clear the current conversation context
  • /undo – undo the last file change Claude made

What Makes Claude Code Powerful

It understands your whole codebase. Rather than you having to paste code snippets, Claude Code reads the files it needs. If you ask it to refactor something, it reads the relevant files, makes changes, and shows you a diff before applying anything.

It can run commands. Claude Code can run your tests, execute scripts, install npm packages, and run build commands – so it can verify its own work. Ask it to “add a new API endpoint and make sure the tests pass” and it’ll write the code, run the tests, and fix anything that breaks.

It’s Git-aware. Claude Code can read your Git history, create branches, and make commits. You can ask it to “look at the last three commits and explain what changed” or “implement this feature on a new branch.”

Practical Workflows

Feature implementation: Describe a feature in plain English. Claude Code will figure out which files need changing, make the edits, and run your tests. You review each step.

Bug fixing: Share your error message or describe the bug. Claude Code will search your codebase for the likely cause and propose a fix.

Refactoring: “Refactor all of our database calls to use the new connection pool pattern” – Claude Code can make sweeping changes across multiple files consistently.

Documentation: “Add JSDoc comments to every exported function in the /lib directory” – this kind of repetitive task is where Claude Code really earns its keep.

Code review: “Review the changes in the last commit and tell me if there’s anything I should address before merging.”

Tips for Beginners

  • Always work in a Git repo – before starting a Claude Code session, make sure your work is committed. This gives you a safety net to roll back if things go sideways.
  • Be specific – the more context you give, the better the results. “Add error handling” is vague; “Add try/catch blocks to all async functions in src/api/ and log errors to the console” is much better.
  • Read the diffs – Claude Code shows you changes before applying them. Don’t skip this step. It’s fast to scan and gives you confidence in what’s being changed.
  • Use CLAUDE.md – you can create a CLAUDE.md file in your project root with instructions for Claude, like “always use TypeScript”, “run npm test after making changes”, or “follow the existing code style.” Claude Code reads this automatically.

Tips for Advanced Users

  • Use claude --model claude-opus-4-5 to specify the model for complex reasoning tasks.
  • You can pipe input to Claude Code: cat error.log | claude "what's causing these errors?"
  • Combine Claude Code with your CI pipeline – it can be scripted for automated code review or documentation generation.

Wrapping Up

Claude Code is the most powerful of the Claude tools for developers – it’s not just answering questions about code, it’s actively participating in your development workflow. Start small, build trust in what it does, and gradually give it bigger tasks.

Next in the series: Claude Code inside VS Code – how to use Claude Code’s VS Code extension to bring all this power directly into your editor.

You must be <a href="https://jonathansblog.co.uk/wp-login.php?redirect_to=https%3A%2F%2Fjonathansblog.co.uk%2Fclaude-code-agentic-ai-coding-in-your-terminal">logged in</a> to post a comment.