Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/harshul786/claude-code-source/llms.txt

Use this file to discover all available pages before exploring further.

This guide takes you from zero to your first productive Claude Code session. By the end you will have Claude Code installed, authenticated, and running inside a real project.

Prerequisites

1

Install Claude Code

Install the @anthropic-ai/claude-code package globally using your preferred package manager.
npm install -g @anthropic-ai/claude-code
After installation, Claude Code places a claude binary on your PATH. Verify it is available:
claude --version
If the claude command is not found after installation, you may need to reload your shell or add the global bin directory to your PATH. See Installation for details.
2

Navigate to your project

Claude Code works inside your project directory. Change into any existing codebase — Claude Code will read the files there to understand the context.
cd /path/to/your/project
You can run claude from any directory. Starting from your project root gives Claude Code the most context to work with.
3

Start Claude Code

Run claude with no arguments to open the interactive REPL:
claude
The first time you run Claude Code, it will prompt you to authenticate with your Anthropic account. Follow the on-screen instructions to complete the OAuth flow in your browser.Once authenticated, you will see the Claude Code prompt:
>
4

Try your first task

Type a natural language request at the prompt. Claude Code will read relevant files, plan what to do, and ask for confirmation before making any changes.Here are a few tasks that work well as a first interaction:Understand the codebase:
> Explain the high-level architecture of this project
Refactor code:
> Refactor the fetchUser function in src/api.ts to use async/await instead of promise chains
Edit files:
> Add JSDoc comments to all exported functions in src/utils.ts
Run tests and fix failures:
> Run the test suite and fix any failing tests
Git workflow:
> Stage all my changes and write a commit message that describes what I changed
Claude Code will show you its plan and ask for your approval before writing files or running commands. Review the proposed changes and confirm to proceed.
5

Initialize a CLAUDE.md (optional but recommended)

CLAUDE.md is a file in your project root that Claude Code reads at the start of every session. It lets you document project-specific context — build commands, code conventions, required environment variables — so Claude Code always has the right background without you repeating it.Generate one automatically:
> /init
Claude Code will analyze your codebase and create a tailored CLAUDE.md for you.

Example prompts that work well

The following prompts demonstrate the range of tasks Claude Code handles effectively. Code understanding
> Walk me through how authentication is handled in this app
> What does the JobQueue class do and how is it used?
> Find all places where we make HTTP requests and list the endpoints
Refactoring
> Extract the validation logic from UserController into a separate Validator class
> Replace all uses of var with const or let throughout the codebase
> Convert the callback-based readConfig function to return a Promise
File editing
> Update the README with accurate setup instructions based on the actual package.json scripts
> Add error handling to every async function in src/services/
> Create a .env.example file based on the environment variables used in the code
Git operations
> Show me what changed since the last commit and summarize it
> Create a new branch called feature/user-profiles and commit my current changes to it
> Write a conventional commit message for the changes I have staged
Debugging
> The tests in auth.test.ts are failing — find out why and fix them
> There is a TypeError thrown when I call createOrder with an empty cart — trace the bug

Next steps

Installation

All install methods, platform notes, authentication, and troubleshooting.

Slash commands

Built-in commands like /init, /bug, /commit, and /help.

Memory and context

Use CLAUDE.md to give Claude Code persistent project knowledge.

MCP servers

Connect Claude Code to external tools and APIs via MCP.

Build docs developers (and LLMs) love