-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclaude_code_beginner_tutorial.html
More file actions
242 lines (206 loc) · 8.27 KB
/
Copy pathclaude_code_beginner_tutorial.html
File metadata and controls
242 lines (206 loc) · 8.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Claude Code — Beginner Tutorial</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: 'Segoe UI', system-ui, sans-serif;
background: #0f0f1a;
color: #e0e0f0;
line-height: 1.7;
padding: 2rem 1rem;
}
.container {
max-width: 820px;
margin: 0 auto;
}
header {
text-align: center;
margin-bottom: 3rem;
padding-bottom: 2rem;
border-bottom: 1px solid #2a2a4a;
}
header h1 {
font-size: 2.2rem;
color: #e94560;
letter-spacing: 2px;
margin-bottom: 0.5rem;
}
header p {
color: #888;
font-size: 0.95rem;
}
h2 {
font-size: 1.3rem;
color: #a8dadc;
margin: 2.5rem 0 1rem;
padding-bottom: 0.4rem;
border-bottom: 1px solid #2a2a4a;
}
p { margin-bottom: 1rem; }
ul, ol {
margin: 0.5rem 0 1rem 1.5rem;
}
li { margin-bottom: 0.4rem; }
code {
background: #1e1e3a;
color: #f9c74f;
padding: 0.15em 0.45em;
border-radius: 4px;
font-family: 'Consolas', 'Courier New', monospace;
font-size: 0.9em;
}
blockquote {
border-left: 3px solid #e94560;
margin: 1rem 0;
padding: 0.8rem 1.2rem;
background: #1a1a2e;
border-radius: 0 8px 8px 0;
font-style: italic;
color: #ccc;
}
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0 1.5rem;
font-size: 0.95rem;
}
th {
background: #1a1a2e;
color: #a8dadc;
text-align: left;
padding: 0.6rem 1rem;
border: 1px solid #2a2a4a;
}
td {
padding: 0.6rem 1rem;
border: 1px solid #2a2a4a;
vertical-align: top;
}
tr:nth-child(even) td { background: #13132a; }
.tip {
background: #1a1a2e;
border: 1px solid #2a2a4a;
border-left: 3px solid #a8dadc;
border-radius: 0 8px 8px 0;
padding: 0.8rem 1.2rem;
margin: 1rem 0;
}
.highlight { color: #e94560; font-weight: bold; }
.muted { color: #888; font-size: 0.88rem; }
footer {
margin-top: 3rem;
padding-top: 1.5rem;
border-top: 1px solid #2a2a4a;
text-align: center;
color: #555;
font-size: 0.85rem;
}
footer a { color: #a8dadc; }
</style>
</head>
<body>
<div class="container">
<header>
<h1>Claude Code</h1>
<p>Full Beginner Tutorial — Based on Tim's Guide</p>
</header>
<h2>What is Claude Code?</h2>
<p>A command-line / terminal app by Anthropic that lets you generate code, debug projects, create websites, and build applications using AI — just by describing what you want in plain English.</p>
<h2>Prerequisites</h2>
<ul>
<li>A paid Claude subscription: <span class="highlight">Pro, Max, Teams, or Enterprise</span></li>
<li><strong>Or</strong> an API key with credits from the Claude console</li>
</ul>
<h2>Installation</h2>
<table>
<tr><th>OS</th><th>How</th></tr>
<tr><td>Mac / Linux</td><td>Open Terminal — run the <code>curl</code>-based install command</td></tr>
<tr><td>Windows (PowerShell)</td><td>Use the <code>irr</code> install command</td></tr>
<tr><td>Windows (Command Prompt)</td><td>Use the Command Prompt-specific variant</td></tr>
</table>
<p>After installing, type <code>claude</code> in your terminal. On first run it will ask you to authenticate and trust your folder.</p>
<div class="tip"><strong>Optional:</strong> Anthropic also offers a desktop app with a GUI — includes chat & code modes, project selection, file management, GitHub integration, and model selection.</div>
<h2>Git & GitHub Setup <span class="muted">(do this early)</span></h2>
<ul>
<li>Install Git locally — or just ask Claude Code to do it for you</li>
<li>Create a free GitHub account</li>
<li>Run <code>gh login</code> to authenticate GitHub locally</li>
<li>This enables version control, save checkpoints, and remote storage</li>
</ul>
<h2>Code Editor Integration</h2>
<p>Recommended editors: <strong>VS Code</strong> or <strong>Cursor</strong></p>
<table>
<tr><th>Shortcut</th><th>Action</th></tr>
<tr><td><code>Ctrl + `</code> / <code>Cmd + `</code></td><td>Toggle the terminal</td></tr>
<tr><td><code>Ctrl + B</code> / <code>Cmd + B</code></td><td>Toggle the file explorer sidebar</td></tr>
</table>
<h2>Starting a Project</h2>
<ol>
<li>Open your project folder in VS Code or Cursor</li>
<li>Open the terminal and type <code>claude</code></li>
<li>Trust the folder when prompted</li>
<li>Type your request — e.g. <em>"make tic tac toe that I can play on the web"</em></li>
<li>Choose <strong>Allow All Edits</strong> for a smoother session</li>
<li>Open the generated file (e.g. <code>tic-tac-toe.html</code>) directly in a browser to test</li>
</ol>
<h2>Three Operating Modes <span class="muted">(switch with Shift + Tab)</span></h2>
<table>
<tr><th>Mode</th><th>Behavior</th></tr>
<tr><td><strong>Ask</strong> (default)</td><td>Asks permission before executing commands or writing code</td></tr>
<tr><td><strong>Coding</strong></td><td>Auto-accepts and writes code without asking</td></tr>
<tr><td><strong>Planning</strong></td><td>Creates a detailed plan before writing any code</td></tr>
</table>
<h2>Essential Commands & Shortcuts</h2>
<table>
<tr><th>Command / Key</th><th>What it does</th></tr>
<tr><td><code>/help</code></td><td>Shows all available commands and shortcuts</td></tr>
<tr><td><code>Esc Esc</code></td><td>Clears current input</td></tr>
<tr><td>Arrow keys</td><td>Cycle through previous commands</td></tr>
<tr><td><code>Alt/Option + Enter</code></td><td>Insert a new line without submitting</td></tr>
<tr><td><code>/model</code></td><td>Switch the AI model</td></tr>
<tr><td><code>/tasks</code> or <code>Ctrl + T</code></td><td>View running background tasks (e.g. dev server)</td></tr>
<tr><td><code>K</code></td><td>Kill a selected task</td></tr>
<tr><td><code>Esc</code></td><td>Interrupt the current command</td></tr>
</table>
<h2>AI Model Selection <span class="muted">(/model)</span></h2>
<table>
<tr><th>Model</th><th>Best for</th></tr>
<tr><td><strong>Opus</strong></td><td>Complex tasks — most powerful, highest cost</td></tr>
<tr><td><strong>Sonnet</strong></td><td>Balanced — moderate complexity</td></tr>
<tr><td><strong>Haiku</strong></td><td>Fast and cheap — quick answers</td></tr>
</table>
<h2>Version Control Automation</h2>
<p>Tell Claude Code once:</p>
<blockquote>"From now on, create a new Git repo for this project, make clean commit messages, save locally, and push to GitHub."</blockquote>
<p>It will handle commits and pushes automatically going forward.</p>
<h2>Project Context — <code>claude.md</code></h2>
<ul>
<li>Run <code>/init</code> to generate a <code>claude.md</code> file in your project</li>
<li>This file stores: project overview, setup instructions, and workflow details</li>
<li>Claude Code reads it automatically at the start of each new session so it always has context</li>
</ul>
<h2>Background Task Management</h2>
<ul>
<li><code>/tasks</code> or <code>Ctrl + T</code> — see all running background processes</li>
<li><code>K</code> — kill a selected task</li>
<li><code>Esc</code> — interrupt what Claude is currently doing</li>
</ul>
<h2>Advanced: Agents & Skills</h2>
<ul>
<li>Create multiple <strong>agents</strong> to handle different parts of a project (e.g. one for styling, one for backend logic)</li>
<li>Define repeatable actions as <strong>skills</strong> to reuse efficiently across sessions</li>
</ul>
<h2>Key Takeaway</h2>
<p>Once Git/GitHub is wired up and you understand the modes and commands, Claude Code lets complete beginners build, manage, and ship real projects entirely through natural language prompts.</p>
<footer>
<p>Based on Tim's Claude Code Full Tutorial for Beginners —
<a href="https://www.youtube.com/watch?v=ntDIxaeo3Wg" target="_blank">Watch on YouTube</a>
</p>
</footer>
</div>
</body>
</html>