claude codeexplainerbeginners

Claude Code in Your Terminal: First Steps That Actually Work

Claude Code puts Anthropic's most capable AI model directly in your terminal so you can write, edit, debug, and ship code using plain English. This article walks through setup, your first real commands, file operations, git workflows, and the productivity shortcuts that actually matter in daily development.

Claude Code in Your Terminal: First Steps That Actually Work
Cristian Da Conceicao
Founder of Picasso IA

If you have spent the last year watching AI coding tools multiply across every IDE, browser extension, and SaaS dashboard, you might be wondering which one actually fits the way you work. Claude Code is Anthropic's answer to that question, and it takes a deliberately different approach: instead of sitting in a sidebar or a web tab, it runs directly inside your terminal. You type. It responds. It reads your files. It writes and edits code. It runs commands. And it does all of this without requiring you to leave the environment where you already do your best work.

This article walks through prerequisites, installation, your first commands, real-world workflows, and the settings that matter once you move past the basics.

Developer with fingers on mechanical keyboard, terminal glowing green in background

What Claude Code Actually Is

It's Not a Chatbot

The moment you run claude in your terminal, the experience is different from a chat interface. Claude Code is an agentic coding assistant: it does not just answer questions, it takes actions. It reads files, writes code, runs shell commands, and works through your project structure based on plain-English instructions.

The distinction matters for real reasons. A chatbot gives you text to copy-paste. Claude Code opens the file. A chatbot loses context when you paste a snippet. Claude Code reads your whole codebase and holds it in context throughout the session. A chatbot waits for your next message. Claude Code can chain multiple steps together: running a test, reading the failure, patching the code, and re-running the test in a single continuous operation.

This is what Anthropic means by "agentic": the model takes real actions in a real environment, not just generating text for you to act on manually.

What It Can See and Do

Claude Code has access to everything in your project directory by default. Here is what it works with:

  • Read any file in the working directory
  • Write and edit files directly, without copy-paste
  • Execute shell commands and process their output
  • Run tests and interpret results automatically
  • Search your codebase for patterns, functions, or references
  • Interact with Git: status, diff, commit, and branch operations

The model powering all of this is Claude itself. If you want to experiment with Claude's capabilities in a browser before bringing prompts into your terminal workflow, PicassoIA gives you direct access to Claude Opus 4.7 and Claude 4 Sonnet.

Terminal screen displaying npm install command output on dark background

Before You Install

Node.js and npm Requirements

Claude Code runs on Node.js. Before anything else, check your version:

node --version

You need Node 18 or higher. If you are running an older version, update via nvm, your system package manager, or the official installer at nodejs.org. The npm package manager ships with Node, so nothing extra is required there.

Here is a quick reference:

RequirementMinimum VersionCheck Command
Node.js18.x or highernode --version
npm8.x or highernpm --version
Anthropic API accessActive accountconsole.anthropic.com

Your Anthropic API Access

Claude Code connects to Anthropic's API under your account. You will need an API credential from the Anthropic Console. If you already use the Claude API in another project, the same credential works. Creating a new account and generating a token takes under five minutes.

💡 Security note: Store your API credential in an environment variable or your system keychain. Never hardcode it in a project file or commit it to version control. Claude Code handles secure storage automatically after the first authentication step.

Billing runs through your Anthropic account at standard API rates, tracked per token the same as direct API usage. For most developers using Claude Code for real daily work, costs are comparable to a mid-tier SaaS subscription per month, though this varies significantly depending on how often you run long multi-file sessions.

Dual monitor workstation at night with terminal and code editor glowing blue

Installation in Under Two Minutes

The Single Command

Install Claude Code globally via npm:

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

That is the entire installation. No additional dependencies, no build step, no Docker setup. Once the install finishes, the claude command is available anywhere in your system.

Verify it worked:

claude --version

You should see a version string in the output. If the command is not found, verify that your global npm binary directory is included in your PATH. On macOS with nvm, this is typically ~/.nvm/versions/node/<version>/bin. On Linux with a system Node install, it is usually /usr/local/bin or /usr/bin.

First-Time Authentication

The first time you run claude, it walks you through a one-time setup:

claude

You will be prompted to paste your Anthropic API credential. Claude Code encrypts and stores it in your system's secure storage so you will not need to enter it again for future sessions.

After authentication, you land in an interactive REPL with a prompt and a blinking cursor. That is it. The tool is ready.

> _

A few flags worth knowing from the start:

FlagEffect
--printOne-shot output, no interactive mode
--helpList all available options
--versionShow the installed version
--dangerously-skip-permissionsAuto-approve all file writes and commands

Developer reviewing code from over-the-shoulder angle with monitor in sharp focus

Your First Real Commands

Writing Code from Scratch

The most natural entry point is asking Claude Code to create something new. Navigate into a project directory and open a session:

claude

Then type your request in plain English:

Create a Python script that reads a CSV file and outputs a statistical summary for each column.

Claude Code writes the script in your working directory, chooses a sensible filename, adds proper imports and error handling, and shows you exactly what it produced. You did not specify a filename, function signatures, or docstring format. It inferred all of that from context and standard Python conventions.

The conversational nature of Claude Code shows most clearly when you follow up:

Now add support for reading from multiple CSV files and merging them before generating the summary.

Claude Code reads the file it just created, parses the existing structure, and extends it without breaking what is already working. This back-and-forth is where it separates itself from one-shot code generators: every follow-up builds on actual state in your project, not a copy-pasted snippet in a chat window.

Editing What's Already There

For existing codebases, the workflow is equally direct. Open a session in your project root and describe the change:

In src/api/users.js, the getUserById function makes two separate database calls when one would be sufficient. Fix it.

Claude Code reads the file, locates the function, rewrites it, and shows you a diff before making any changes. You can approve, reject, or ask for a different approach. The edit-then-confirm cycle keeps you in control of every modification without slowing down the workflow.

For broader changes, you can be less prescriptive about the implementation:

Refactor the authentication middleware in src/middleware/ to use async/await instead of callbacks.

Claude Code scans the directory, reads all relevant files, and applies the refactor consistently across everything in one operation.

Aerial flat-lay view of developer desk with laptop, spiral notebook, and sticky notes

Working With Your Codebase

Multi-File Operations

One major advantage over simple autocomplete tools is Claude Code's ability to work across multiple files in a single session. You can ask it to:

  • Update all call sites after changing a function's signature
  • Move a module from one directory to another and fix all import paths
  • Add a new database field and update every query that touches it
  • Write tests for an entire service, reading and matching the patterns already present in your existing test suite

The model holds your codebase context during the session and reasons about file relationships explicitly. It is not limited to what is currently open in your editor, and it does not require you to manually gather and paste relevant code snippets into a chat window.

Git Commands the Natural Way

Claude Code integrates with Git without any configuration. Inside a session, describe your intent and let it handle the shell mechanics:

Commit the changes I just made with a meaningful commit message.

Claude Code runs git diff --staged, reads what changed, writes an appropriate message based on the actual diff content, and executes the commit. Or:

Create a new branch for the payment refactor and push it to origin.

Branch creation, checkout, and push, all handled in sequence without you typing a single Git command.

💡 Tip: Ask Claude Code to explain its Git plan before executing. Type explain what you're about to do before any Git operation to get a plain-English preview of the exact commands it will run.

This is especially practical for developers who are confident in what they want to accomplish but sometimes need to look up the precise flag for an edge case. Claude Code already knows them.

Wide open plan tech office at golden hour with developer at standing desk

Permission Modes Explained

Default vs. Auto-Approve

By default, Claude Code asks for your confirmation before writing files or running shell commands. Every potentially irreversible action gets a y/n prompt before it executes. This is the right setting for production codebases and any project you care about.

When you are prototyping rapidly in a throwaway directory, you can skip those prompts:

claude --dangerously-skip-permissions

Or grant auto-approve for an entire session from within the interactive prompt.

ModeBehaviorBest For
DefaultConfirms before all writes and commandsProduction code, real projects
Auto-approveExecutes immediately without promptsPrototyping, throwaway scripts
Read-onlyNo file writes or command executionCode review, Q&A sessions

When to Use Each Mode

For daily work on real projects, the default mode is correct. Confirmation prompts add two seconds and protect you from accidental overwrites or misapplied changes.

For rapid prototyping in a temporary directory, auto-approve significantly speeds up iteration. You can go through a dozen variations of a script in minutes without interrupting the creative flow.

For reading and reviewing unfamiliar code, the read-only behavior is worth using deliberately. Claude Code can read an entire codebase, explain how it works, answer architectural questions, and trace data flows without touching a single file in your repository.

Monitor close-up with terminal cursor blinking after AI assistant response text

Three Workflows That Save Hours

The Debug Loop

When a test is failing and the stack trace is not immediately obvious, the Claude Code debug loop cuts time to resolution significantly:

  1. Run your test suite and let it fail
  2. Open a Claude Code session in your project root
  3. Type: The test suite is failing. Read the output in /tmp/test-results.log and identify the root cause.

Claude Code reads the log, traces through the relevant source files, and pinpoints what is causing the failure. In most cases it also proposes a fix. You approve, the test runs again, it passes.

What previously took 30 minutes of reading stack traces, searching for the relevant function, and tracing through call chains now takes a few minutes of conversation.

The Code Review

Before opening a pull request, use Claude Code as a first-pass reviewer:

Review my changes in this branch compared to main. Focus on logic errors, missing error handling, and anything that would fail under edge cases.

Claude Code runs git diff main, reads every changed file, and produces a structured list of issues with specific line references. It will not catch everything a human reviewer would, but it consistently catches the obvious mistakes before your teammates spend time on them.

💡 Prompt tip: Ask it to be critical. Try: Assume this code will be reviewed by a senior engineer who values correctness and simplicity. Be specific about what is wrong and why. The quality of the feedback improves substantially with more directive framing.

The Refactor Run

For systematic changes across an entire codebase, describe the rule and let Claude Code apply it at scale:

We are renaming the User model to Account across the entire codebase. Update all references, including imports, variable names, type annotations, and database migration files.

Claude Code scans everything, builds a list of changes, shows you the scope of what it will modify, waits for your confirmation, and then executes. A rename that would take 40 minutes of search-and-replace in your editor can finish in under five minutes.

The most important thing about phrasing refactor requests is specificity about scope and the rule being applied. The more precisely you describe what changes and what stays the same, the more accurately and consistently Claude Code applies it across thousands of lines.

Female developer working on laptop cross-legged on couch in warm afternoon light

The CLAUDE.md File: Your Project Context

Claude Code checks for a CLAUDE.md file in your project root at the start of every session. This is where you store project-specific instructions that should apply to every interaction:

# MyProject

## Architecture
- Backend: Express.js with TypeScript
- Database: PostgreSQL via Prisma ORM
- Tests: Vitest, not Jest

## Conventions
- Use named exports, never default exports
- Error handling follows a Result type pattern, not try/catch
- All database calls go through the service layer, never directly in route handlers

With a CLAUDE.md in place, you do not re-explain your project conventions at the start of every session. Claude Code reads the file automatically and applies those rules to every file it writes or edits during that session.

This is one of the highest-return investments you can make when working with Claude Code on a real project. Twenty lines of project context, written once, improves the quality of every subsequent session. Experienced Claude Code users maintain their CLAUDE.md files the same way they maintain their README.md: they update it whenever conventions change, and they treat it as a living document.

The Claude Models, Now in Your Browser

Claude Code is powered by Anthropic's Claude models, the same AI architecture built for complex reasoning, long-context analysis, and precise code generation. If you want to draft and test prompts in a browser, compare model outputs before committing to an approach, or simply run a quick task without opening a terminal session, PicassoIA gives you direct access to the full Claude lineup with no setup required.

Claude Opus 4.7 is the most capable option for heavy reasoning, architectural planning, and complex multi-step tasks. Claude 4.5 Sonnet is the workhorse for everyday coding and writing, with an excellent balance of speed and accuracy. For fast responses and lighter tasks, Claude 4.5 Haiku is the fastest option in the Claude family.

PicassoIA also brings together the full range of frontier AI models in one place. GPT-5 for OpenAI's latest reasoning and generation capabilities. DeepSeek R1 for open-weight model performance. Gemini 2.5 Flash for fast multimodal tasks. All accessible through a single interface, with no API configuration on your end.

If you are already using Claude Code daily in your terminal, spend fifteen minutes on PicassoIA. Draft your prompts in the browser, test how different models respond to the same request, and carry what works back into your terminal sessions. The two tools complement each other: one for when you are deep in a coding session with files open, and one for when you want to think through an approach before committing to it.

Developer working at desk in side profile with glasses catching the blue monitor glow

Share this article