Getting Started
This guide walks you through installing Claude Code, running your first command, and optionally setting up the GSD plugin for structured project automation. By the end, you'll have both tools ready and understand the basics of working with them.
Prerequisites
Before you begin, make sure you have the following ready:
- An Anthropic account (sign up at console.anthropic.com)
- An API key from the Anthropic Console
- Node.js 18 or higher installed on your system
- A terminal application (Terminal on Mac, any terminal on Linux, WSL on Windows)
- Git installed (recommended but not required)
How to check your Node.js version
Open your terminal and run the following command:
node --version
If the version number is 18.0.0 or higher, you're good to go. If not, visit nodejs.org to download and install the latest LTS version.
What if I don't have Git?
Git is recommended for the GSD plugin installation but not strictly required for Claude Code itself. You can download Git from git-scm.com. Most modern development environments come with Git pre-installed.
Step 1: Install Claude Code
Installing Claude Code is straightforward. Open your terminal and run the following command:
npm install -g @anthropic-ai/claude-code
This installs Claude Code globally on your system, making it available as the claude command from anywhere in your terminal.
Once the installation completes, verify it worked correctly by checking the version:
claude --version
You should see a version number displayed. If you do, you're all set.
Step 2: Authenticate
Before you can use Claude Code, you need to authenticate with your Anthropic API key. There are two ways to do this:
Option 1: Interactive Authentication
Run the claude command for the first time. It will prompt you to authenticate and guide you through the browser-based authentication flow.
claude
Option 2: API Key Environment Variable
Set your API key as an environment variable. This approach is more flexible for automation and CI/CD workflows:
export ANTHROPIC_API_KEY="your-api-key-here"
claude
For a permanent setup, add the export command to your shell profile (e.g., ~/.bashrc, ~/.zshrc, or ~/.profile).
Step 3: Your First Conversation
Now that Claude Code is installed and authenticated, let's run your first command. We'll create a simple project to demonstrate how Claude Code works.
First, create a new directory for your project and navigate into it:
mkdir my-first-project && cd my-first-project
Next, start Claude Code:
claude
Once Claude Code starts, try asking it to create something simple. For example:
Create a simple HTML page with a greeting message
Claude will read the current directory, understand your request, propose creating a file (usually index.html), and ask for your permission to proceed. Review the proposal and approve it.
Once complete, open the generated HTML file in your browser to see the result. Congratulations! You've just completed your first Claude Code task.
Step 4: Install the GSD Plugin (Optional)
The GSD (Get Shit Done) plugin is an optional but powerful addition to Claude Code. It adds structured planning, autonomous execution, and session continuity for larger projects.
If you're working on substantial projects or want to leverage Claude for end-to-end automation, GSD is highly recommended. For simple tasks or learning, you can skip this step for now.
To install the GSD plugin, run the following command:
# Clone the GSD plugin to Claude's plugin directory
git clone https://github.com/get-shit-done/gsd.git ~/.claude/get-shit-done
Once installed, the GSD commands will be available in your Claude Code sessions. You'll be able to use commands like /gsd:init, /gsd:plan-phase, and /gsd:execute-phase to manage complex projects.
GSD adds several key capabilities:
- Structured project planning with phases and tasks
- Autonomous task execution with checkpoints for human verification
- Session continuity through persistent state management
- Atomic commits for each completed task
For a complete overview of GSD's capabilities and workflow, see the GSD Plugin guide.
Step 5: Your First GSD Project
If you installed the GSD plugin in the previous step, let's walk through initializing your first GSD-managed project.
Start Claude Code in your project directory (or create a new project for this example):
claude
Once Claude Code is running, initialize GSD for this project:
/gsd:init
GSD will ask you questions about your project: what you're building, your goals, and any constraints. Answer these questions to help Claude understand your vision. GSD will then create a .planning/ directory in your project with structured requirements and a roadmap.
Next, plan the first phase of your project:
/gsd:plan-phase 1
GSD will break down the first phase into concrete tasks and create a detailed plan. Review the plan to ensure it matches your expectations.
Finally, execute the first phase:
/gsd:execute-phase 1
GSD will execute each task, commit the work atomically, and pause at checkpoints for your verification. This plan-then-execute cycle is the core of GSD's workflow.
Next Steps
You now have Claude Code installed and, optionally, the GSD plugin ready to go. Here are some recommended next steps to deepen your understanding:
- Follow the Complete Setup Walkthrough for a detailed end-to-end setup including plugin installation, configuration, and troubleshooting
- Read the Claude Code Guide for a deep dive into features, workflows, and advanced capabilities
- Explore the GSD Plugin Guide to learn about commands, the planning/execution flow, and best practices
- Practice with small projects before tackling larger ones. The more you work with Claude, the better you'll understand its strengths
- Join the community for tips, support, and to share what you're building