14 14
15* A terminal or command prompt open15* A terminal or command prompt open
16* A code project to work with16* A code project to work with
17* A [Claude subscription](https://claude.com/pricing) (Pro, Max, Teams, or Enterprise) or [Claude Console](https://console.anthropic.com/) account17* A [Claude subscription](https://claude.com/pricing) (Pro, Max, Teams, or Enterprise), [Claude Console](https://console.anthropic.com/) account, or access through a [supported cloud provider](/en/third-party-integrations)
18
19<Note>
20 This guide covers the terminal CLI. Claude Code is also available on the [web](https://claude.ai/code), as a [desktop app](/en/desktop), in [VS Code](/en/vs-code) and [JetBrains IDEs](/en/jetbrains), in [Slack](/en/slack), and in CI/CD with [GitHub Actions](/en/github-actions) and [GitLab](/en/gitlab-ci-cd). See [all interfaces](/en/overview#use-claude-code-everywhere).
21</Note>
18 22
19## Step 1: Install Claude Code23## Step 1: Install Claude Code
20 24
24 <Tab title="Native Install (Recommended)">28 <Tab title="Native Install (Recommended)">
25 **macOS, Linux, WSL:**29 **macOS, Linux, WSL:**
26 30
27 ```bash theme={null}31 ```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
28 curl -fsSL https://claude.ai/install.sh | bash32 curl -fsSL https://claude.ai/install.sh | bash
29 ```33 ```
30 34
31 **Windows PowerShell:**35 **Windows PowerShell:**
32 36
33 ```powershell theme={null}37 ```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
34 irm https://claude.ai/install.ps1 | iex38 irm https://claude.ai/install.ps1 | iex
35 ```39 ```
36 40
37 **Windows CMD:**41 **Windows CMD:**
38 42
39 ```batch theme={null}43 ```batch theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
40 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd44 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
41 ```45 ```
42 46
46 </Tab>50 </Tab>
47 51
48 <Tab title="Homebrew">52 <Tab title="Homebrew">
49 ```sh theme={null}53 ```sh theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
50 brew install --cask claude-code54 brew install --cask claude-code
51 ```55 ```
52 56
56 </Tab>60 </Tab>
57 61
58 <Tab title="WinGet">62 <Tab title="WinGet">
59 ```powershell theme={null}63 ```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
60 winget install Anthropic.ClaudeCode64 winget install Anthropic.ClaudeCode
61 ```65 ```
62 66
83You can log in using any of these account types:87You can log in using any of these account types:
84 88
85* [Claude Pro, Max, Teams, or Enterprise](https://claude.com/pricing) (recommended)89* [Claude Pro, Max, Teams, or Enterprise](https://claude.com/pricing) (recommended)
86* [Claude Console](https://console.anthropic.com/) (API access with pre-paid credits)90* [Claude Console](https://console.anthropic.com/) (API access with pre-paid credits). On first login, a "Claude Code" workspace is automatically created in the Console for centralized cost tracking.
91* [Amazon Bedrock, Google Vertex AI, or Microsoft Foundry](/en/third-party-integrations) (enterprise cloud providers)
87 92
88Once logged in, your credentials are stored and you won't need to log in again.93Once logged in, your credentials are stored and you won't need to log in again. To switch accounts later, use the `/login` command.
89
90<Note>
91 When you first authenticate Claude Code with your Claude Console account, a workspace called "Claude Code" is automatically created for you. This workspace provides centralized cost tracking and management for all Claude Code usage in your organization.
92</Note>
93
94<Note>
95 You can have both account types under the same email address. If you need to log in again or switch accounts, use the `/login` command within Claude Code.
96</Note>
97 94
98## Step 3: Start your first session95## Step 3: Start your first session
99 96
115Let's start with understanding your codebase. Try one of these commands:112Let's start with understanding your codebase. Try one of these commands:
116 113
117```114```
118> what does this project do?115what does this project do?
119```116```
120 117
121Claude will analyze your files and provide a summary. You can also ask more specific questions:118Claude will analyze your files and provide a summary. You can also ask more specific questions:
122 119
123```120```
124> what technologies does this project use?121what technologies does this project use?
125```122```
126 123
127```124```
128> where is the main entry point?125where is the main entry point?
129```126```
130 127
131```128```
132> explain the folder structure129explain the folder structure
133```130```
134 131
135You can also ask Claude about its own capabilities:132You can also ask Claude about its own capabilities:
136 133
137```134```
138> what can Claude Code do?135what can Claude Code do?
139```136```
140 137
141```138```
142> how do I create custom skills in Claude Code?139how do I create custom skills in Claude Code?
143```140```
144 141
145```142```
146> can Claude Code work with Docker?143can Claude Code work with Docker?
147```144```
148 145
149<Note>146<Note>
155Now let's make Claude Code do some actual coding. Try a simple task:152Now let's make Claude Code do some actual coding. Try a simple task:
156 153
157```154```
158> add a hello world function to the main file155add a hello world function to the main file
159```156```
160 157
161Claude Code will:158Claude Code will:
174Claude Code makes Git operations conversational:171Claude Code makes Git operations conversational:
175 172
176```173```
177> what files have I changed?174what files have I changed?
178```175```
179 176
180```177```
181> commit my changes with a descriptive message178commit my changes with a descriptive message
182```179```
183 180
184You can also prompt for more complex Git operations:181You can also prompt for more complex Git operations:
185 182
186```183```
187> create a new branch called feature/quickstart184create a new branch called feature/quickstart
188```185```
189 186
190```187```
191> show me the last 5 commits188show me the last 5 commits
192```189```
193 190
194```191```
195> help me resolve merge conflicts192help me resolve merge conflicts
196```193```
197 194
198## Step 7: Fix a bug or add a feature195## Step 7: Fix a bug or add a feature
202Describe what you want in natural language:199Describe what you want in natural language:
203 200
204```201```
205> add input validation to the user registration form202add input validation to the user registration form
206```203```
207 204
208Or fix existing issues:205Or fix existing issues:
209 206
210```207```
211> there's a bug where users can submit empty forms - fix it208there's a bug where users can submit empty forms - fix it
212```209```
213 210
214Claude Code will:211Claude Code will:
225**Refactor code**222**Refactor code**
226 223
227```224```
228> refactor the authentication module to use async/await instead of callbacks225refactor the authentication module to use async/await instead of callbacks
229```226```
230 227
231**Write tests**228**Write tests**
232 229
233```230```
234> write unit tests for the calculator functions231write unit tests for the calculator functions
235```232```
236 233
237**Update documentation**234**Update documentation**
238 235
239```236```
240> update the README with installation instructions237update the README with installation instructions
241```238```
242 239
243**Code review**240**Code review**
244 241
245```242```
246> review my changes and suggest improvements243review my changes and suggest improvements
247```244```
248 245
249<Tip>246<Tip>
262| `claude -c` | Continue most recent conversation in current directory | `claude -c` |259| `claude -c` | Continue most recent conversation in current directory | `claude -c` |
263| `claude -r` | Resume a previous conversation | `claude -r` |260| `claude -r` | Resume a previous conversation | `claude -r` |
264| `claude commit` | Create a Git commit | `claude commit` |261| `claude commit` | Create a Git commit | `claude commit` |
265| `/clear` | Clear conversation history | `> /clear` |262| `/clear` | Clear conversation history | `/clear` |
266| `/help` | Show available commands | `> /help` |263| `/help` | Show available commands | `/help` |
267| `exit` or Ctrl+C | Exit Claude Code | `> exit` |264| `exit` or Ctrl+C | Exit Claude Code | `exit` |
268 265
269See the [CLI reference](/en/cli-reference) for a complete list of commands.266See the [CLI reference](/en/cli-reference) for a complete list of commands.
270 267
271## Pro tips for beginners268## Pro tips for beginners
272 269
270For more, see [best practices](/en/best-practices) and [common workflows](/en/common-workflows).
271
273<AccordionGroup>272<AccordionGroup>
274 <Accordion title="Be specific with your requests">273 <Accordion title="Be specific with your requests">
275 Instead of: "fix the bug"274 Instead of: "fix the bug"
281 Break complex tasks into steps:280 Break complex tasks into steps:
282 281
283 ```282 ```
284 > 1. create a new database table for user profiles283 1. create a new database table for user profiles
285 ```284 2. create an API endpoint to get and update user profiles
286 285 3. build a webpage that allows users to see and edit their information
287 ```
288 > 2. create an API endpoint to get and update user profiles
289 ```
290
291 ```
292 > 3. build a webpage that allows users to see and edit their information
293 ```286 ```
294 </Accordion>287 </Accordion>
295 288
297 Before making changes, let Claude understand your code:290 Before making changes, let Claude understand your code:
298 291
299 ```292 ```
300 > analyze the database schema293 analyze the database schema
301 ```294 ```
302 295
303 ```296 ```
304 > build a dashboard showing products that are most frequently returned by our UK customers297 build a dashboard showing products that are most frequently returned by our UK customers
305 ```298 ```
306 </Accordion>299 </Accordion>
307 300
317 310
318Now that you've learned the basics, explore more advanced features:311Now that you've learned the basics, explore more advanced features:
319 312
320<CardGroup cols={3}>313<CardGroup cols={2}>
321 <Card title="Common workflows" icon="graduation-cap" href="/en/common-workflows">314 <Card title="How Claude Code works" icon="microchip" href="/en/how-claude-code-works">
322 Step-by-step guides for common tasks315 Understand the agentic loop, built-in tools, and how Claude Code interacts with your project
323 </Card>
324
325 <Card title="CLI reference" icon="terminal" href="/en/cli-reference">
326 Master all commands and options
327 </Card>316 </Card>
328 317
329 <Card title="Configuration" icon="gear" href="/en/settings">318 <Card title="Best practices" icon="star" href="/en/best-practices">
330 Customize Claude Code for your workflow319 Get better results with effective prompting and project setup
331 </Card>320 </Card>
332 321
333 <Card title="Claude Code on the web" icon="cloud" href="/en/claude-code-on-the-web">322 <Card title="Common workflows" icon="graduation-cap" href="/en/common-workflows">
334 Run tasks asynchronously in the cloud323 Step-by-step guides for common tasks
335 </Card>324 </Card>
336 325
337 <Card title="About Claude Code" icon="sparkles" href="https://claude.com/product/claude-code">326 <Card title="Extend Claude Code" icon="puzzle-piece" href="/en/features-overview">
338 Learn more on claude.com327 Customize with CLAUDE.md, skills, hooks, MCP, and more
339 </Card>328 </Card>
340</CardGroup>329</CardGroup>
341 330