4.7 KiB
Documentation Index
Fetch the complete documentation index at: https://vineetagarwal-code-claude-code.mintlify.app/llms.txt Use this file to discover all available pages before exploring further.
Quickstart
Install Claude Code, authenticate, and complete your first coding task in under 5 minutes.
Prerequisites
- Node.js 18 or higher
- npm
To check your Node.js version:
node --version
If you need to install or upgrade Node.js, download it from nodejs.org.
Step 1: Install Claude Code
Install the package globally with npm:
npm install -g @anthropic-ai/claude-code
Verify the installation:
claude --version
Step 2: Authenticate
Run claude from any directory to start the first-time setup:
claude
On first run, Claude Code opens your browser and walks you through signing in with your Anthropic account. Once complete, your credentials are stored securely and reused for future sessions.
Alternatively, set an API key directly if you prefer not to use OAuth:
export ANTHROPIC_API_KEY=sk-ant-...
Step 3: Navigate to your project
Claude Code works within your current directory. Navigate to any project you want to work on:
cd my-project
Step 4: Start an interactive session
Run claude to open an interactive session:
claude
You'll see a prompt where you can type tasks in plain language. Claude reads your project files, runs commands, and makes changes based on what you describe.
Example first tasks to try:
> explain the structure of this codebase
> add input validation to the signup form
> write tests for the UserService class
> find all places where we catch and swallow errors
Claude shows you what it plans to do before making changes that require permission. You can approve, deny, or ask for a different approach at each step.
Step 5: Initialize a CLAUDE.md file
Run /init inside your session to generate a CLAUDE.md file for your project:
/init
Claude analyzes your repository — reading manifest files, existing documentation, and code structure — and produces a CLAUDE.md with the commands and context it needs to work effectively in your codebase. You should review and edit the generated file before committing it.
Running a non-interactive command
Use the -p flag to run a single task and print the result, without entering an interactive session. This is useful for scripting or one-off queries:
claude -p "explain this codebase"
claude -p "list all TODO comments and the files they appear in"
claude -p "check for unused exports in src/"
Key slash commands
Once you're inside an interactive session, these slash commands are the most useful to know:
| Command | Description |
|---|---|
/help |
Show available commands and keyboard shortcuts |
/init |
Generate or update a CLAUDE.md for the current project |
/memory |
View and edit memory files (CLAUDE.md, CLAUDE.local.md) |
/permissions |
View or change the current permission mode |
/mcp |
Manage connected MCP servers |
/clear |
Clear the current conversation context |
/exit |
End the session |
Next steps
Understand how Claude Code thinks, plans, and acts on tasks Learn how to configure how much autonomy Claude has Write effective memory files for your projects Extend Claude with databases, APIs, and internal toolsBuilt with Mintlify.