Building Webapps with Claude Code
Setup and Authentication
Getting Started with Claude Code
Before we can start building, we need to set up our primary tool: Claude Code. This is an agentic coding assistant from Anthropic that runs directly in your terminal. Think of it as a collaborator that can read your project files, write code, and even run tests based on your instructions. It operates on your local filesystem, making it a powerful partner for development.
First, let's cover the system requirements. The main dependency is , which you'll need version 18 or newer. If you've been working with modern web development frameworks, you likely already have this installed. You can quickly check your version by running node -v in your terminal.
Installation
The most straightforward way to install Claude Code is globally using npm (Node Package Manager), which comes bundled with Node.js. A global installation makes the claude command available from any directory in your terminal.
npm install -g @anthropic-ai/claude-code
Alternatively, native installers are available for macOS, Windows, and Linux on the official Anthropic website. These can be a good option if you prefer a standalone installation that doesn't rely on your system's Node.js setup.
Authentication
With Claude Code installed, the next step is authentication. The first time you run the claude command, it will guide you through the login process. You have two primary options.
- OAuth for Teams: If you're part of an organization with a Claude Team plan, this is the recommended method. It will open your web browser to authenticate through your Anthropic account, linking the CLI to your team's subscription.
- API Key: For individual users, you can use a personal API key. You can generate one from your Anthropic account settings. During the setup, you'll be prompted to paste this key into the terminal.
Once you complete the process, the CLI securely stores your credentials, so you won't need to authenticate every time. This setup allows the tool to make secure requests to the Claude models on your behalf.
Verification
Let's confirm everything is working correctly. You can check the installed version with a simple command. This is also useful for ensuring you're running the latest release.
claude --version
If that command returns a version number, you're all set. Now, you can start your first interactive session. Simply type claude and press Enter. You'll be greeted by the AI assistant, ready to receive your instructions right in the terminal. This is where the fun begins—you can now ask it to analyse files, suggest refactors, or write new code.
To exit an interactive session, simply type
exitor press Ctrl+C.
Before diving into our project, take a moment to review the key terms from this setup process.
Ready to check your understanding? This short quiz will cover the main points of installing and authenticating Claude Code.
What is the primary system dependency for running Claude Code?
Which command would you run in your terminal to check if you meet the main system requirement before installation?
Now that Claude Code is installed and authenticated, you have a powerful AI collaborator integrated directly into your development environment. In the next section, we'll start putting it to work on our full-stack project.
