Skip to main content
This guide covers the prerequisites and first-run setup for Claude Code (the Anthropic CLI and developer experience). It explains what you need, how to install the CLI, authenticate, run a quick example that reads a CSV file, and how Claude Code integrates with Visual Studio Code. Claude Code is distributed via NPM. If you’re familiar with NPM, installation is straightforward; otherwise the main requirement is Node.js 18 or newer.
Make sure Node.js 18+ is installed. On macOS use Homebrew (brew install node); on Linux use your distro package manager or the official installer; on Windows use the installer from nodejs.org.

Minimum requirements

Install the Claude Code CLI

Install the CLI globally so you can run the cloud command from any folder:
Example local output on macOS:
Why use -g? The global flag installs a system-wide executable so you can run cloud from any working directory. Without -g, the package installs into the current project’s node_modules folder and is not globally available. If you prefer to install Node.js with Homebrew on macOS:
Sample Homebrew output:

First run: start and authenticate

Run the CLI:
On first run the CLI walks you through a small interactive setup—theme selection (terminal color scheme) and authentication method. You will be offered two authentication/billing choices: Example CLI prompt:
If the CLI cannot open a browser (common on WSL or SSH-only servers), it prints a URL you can open manually. Copy that URL into a browser to sign in and authorize the CLI; you will be given a short code to paste back into the terminal.
A browser window showing a dark-themed authorization dialog where "Claude Code" is requesting permission to connect to a Claude chat account, listing uses like accessing profile information and contributing to subscription usage. The modal shows Authorize and Decline buttons.

Security reminder (review generated code)

When you sign in, the CLI prints a short security reminder. Always review any generated code before running it.
Important: Never run code you don’t trust. Prompt injection and code-generation mistakes are real risks—review outputs and use version control for auditing changes.

Quick example: generate test data and ask Claude Code to create a script

As a quick real-world test, generate fake data using Mockaroo (CSV export) and save it as members.csv. For example, include fields such as id, first_name, last_name, email, gender, ip_address.
A screenshot of the Mockaroo web UI for generating fake data, showing field definitions like id, first_name, last_name, email, gender, and ip_address with options for each. The page also shows settings for row count and format (CSV) and buttons such as Generate Data, Preview, and Save As.
Back in the Claude Code CLI you can ask it to generate a Python file that reads members.csv and prints first and last names. The CLI inspects your current working directory and can propose or create files. Example interactive session:
Claude Code generated a file named read_members.py. Here is the final generated code (robust to common CSV header variants):
This example uses Python’s built-in csv module for a lightweight solution. For heavier data processing, consider pandas, but csv is fine for quick tasks.

Editor integration: Visual Studio Code

Open your project in Visual Studio Code (or another editor). Claude Code integrates with VS Code and provides in-IDE shortcuts and context-awareness.
A dark-themed Visual Studio Code window showing the Explorer for a project named "my-awesome-project" with files members.csv and read_members.py. A Run/Terminal menu is open and the main editor area displays the VS Code logo with command shortcuts.
When the VS Code extension is present, the CLI displays integration details and available keybindings:
Useful commands and actions:
  • Run /terminal-setup to enable helpful terminal keybindings (e.g., Shift+Enter for a new line).
  • Use the cloud CLI inside the project terminal to ask Claude Code to inspect files, generate code, suggest edits, or craft bash/git commands.
  • Use Quick Launch (Cmd+Esc on macOS) to jump into Claude Code workflows inside the editor.

Run the generated script

Run the Python script locally (optionally inside a virtual environment):
This prints the first and last names from members.csv.

Summary — Checklist

  • Install Node.js 18+ (npm included)
  • Install the Claude Code CLI globally:
    • npm install -g @anthropic-ai/claude-code
  • Run the CLI: cloud
  • Authenticate via Claude subscription or Anthropic Console (browser or copy-paste URL)
  • Review generated code before running it
  • Optionally integrate with Visual Studio Code for an in-IDE experience
Now that your environment is set up, try asking Claude Code to inspect files, refactor code, generate tests, or create shell commands to streamline your workflow.

Watch Video