
Claude Code Tutorial for Beginners
Claude Code 初学者教程
28 分钟阅读AI
【新手福音】Claude Code 快速入门:告别网页端,在终端里直接“对战”代码 当你还在网页端来回复制粘贴代码时,真正的极客已经在终端里直接对齐意图了。本教程演示了如何让 AI 阅读整个代码库、自动执行 Git 提交并快速修复逻辑漏洞。这不仅是工具的更替,更是对传统开发节奏的一次全方位重塑。 🎙️ 主讲人介绍 AI 编程普及教育者:致力于推动 AI 原生开发流(AI-Native Development)的落地,帮助初学者跨越技术门槛。 核心议题:环境配置从零到一、本地索引建立逻辑、代码库上下文映射、终端交互的最佳实践。 关键词:Claude Code、终端编程、提效教程、新手实战、AI 开发
章节 1:环境搭建与安装 (Environment Setup and Installation)
📝 本节摘要:
本节主要介绍了如何在 Mac 和 Windows 系统上安装 Claude Code。讲者特别指出 PowerShell 脚本可能存在的问题,并推荐使用 NPM(Node Package Manager)作为更稳健的安装方式。此外,还涵盖了登录账户、集成 IDE(Visual Studio Code)以及初始化 Git 仓库的基础设置流程。
[原文] [Kevin Stratvert]: I don't write code by hand anymore. I just ask Claude.
[译文] [Kevin Stratvert]: 我不再手动写代码了。我直接问 Claude。
[原文] [Kevin Stratvert]: And in this video, I've partnered with Anthropic to break down three things that I wish I knew about Vibe Engineering before I started.
[译文] [Kevin Stratvert]: 在这个视频中,我与 Anthropic 合作,以此拆解我在开始之前希望自己了解的关于“氛围工程(Vibe Engineering)”的三件事。
[原文] [Kevin Stratvert]: Starting with number one, how to create apps from scratch.
[译文] [Kevin Stratvert]: 首先是第一点,如何从零开始创建应用程序。
[原文] [Kevin Stratvert]: Head to the link in the description below and let's install Claude Code together.
[译文] [Kevin Stratvert]: 前往下方简介中的链接,让我们一起安装 Claude Code。
[原文] [Kevin Stratvert]: First up, for Mac users, from the homepage, use this copy button to copy the bash script and run it in a terminal window.
[译文] [Kevin Stratvert]: 首先,对于 Mac 用户,在主页上,使用这个复制按钮复制 bash 脚本,并在终端窗口中运行它。
[原文] [Kevin Stratvert]: But for Windows users, that script looks like this, and it's actually PowerShell.
[译文] [Kevin Stratvert]: 但对于 Windows 用户,脚本看起来是这样的,它实际上是 PowerShell 脚本。
[原文] [Kevin Stratvert]: Now, I ran into problems with this script. So, I'm going to show you another approach using npm.,
[译文] [Kevin Stratvert]: 实际上,我在使用这个脚本时遇到了一些问题。所以,我要向你展示另一种使用 npm 的方法。
[原文] [Kevin Stratvert]: If you don't have npm installed or you're not sure, head over to nodejs.org.
[译文] [Kevin Stratvert]: 如果你没有安装 npm 或者不确定是否安装,请前往 nodejs.org。
[原文] [Kevin Stratvert]: Click this big green button that says get NodeJS. Scroll down and click the green button to download the installer.
[译文] [Kevin Stratvert]: 点击那个写着“Get NodeJS”的大绿色按钮。向下滑动并点击绿色按钮下载安装程序。
[原文] [Kevin Stratvert]: After you successfully install node, you should be able to open a command prompt, type in node-v and see the node version returned that you have installed.
[译文] [Kevin Stratvert]: 成功安装 Node 后,你应该可以打开命令提示符,输入 node -v,并看到返回的你所安装的 Node 版本号。
[原文] [Kevin Stratvert]: Then you use npm install to install cloud code.
[译文] [Kevin Stratvert]: 然后你使用 npm install 来安装 Claude Code。
[原文] [Kevin Stratvert]: You can copy this exact line from the description under the resources section.
[译文] [Kevin Stratvert]: 你可以从简介下方的资源部分复制这行确切的代码。
[原文] [Kevin Stratvert]: Then type claude and press enter to set it up.
[译文] [Kevin Stratvert]: 然后输入 claude 并按回车键进行设置。
[原文] [Kevin Stratvert]: First, choose your text style. I'm going to stick with dark mode.
[译文] [Kevin Stratvert]: 首先,选择你的文本风格。我会坚持使用深色模式。
[原文] [Kevin Stratvert]: Then choose how you want to set up your subscription. I'm going to stick with my cloud account.
[译文] [Kevin Stratvert]: 然后选择你想如何设置你的订阅。我会继续使用我的云账户。
[原文] [Kevin Stratvert]: Go ahead and sign in and I'll see you on the other side.
[译文] [Kevin Stratvert]: 请继续登录,我们在另一端见。
[原文] [Kevin Stratvert]: Once you've connected your account, success means you see something like this.
[译文] [Kevin Stratvert]: 一旦你连接了账户,看到像这样的界面就意味着成功了。
[原文] [Kevin Stratvert]: Now, Claude Code is great inside of a terminal window, but it's even better when it's integrated with your IDE.
[译文] [Kevin Stratvert]: Claude Code 在终端窗口中表现很棒,但当它与你的集成开发环境(IDE)集成时效果更好。
[原文] [Kevin Stratvert]: For that reason, I'm going to take you through using Cloud Code inside of Visual Studio Code.
[译文] [Kevin Stratvert]: 因此,我将带你在 Visual Studio Code 中使用 Claude Code。
[原文] [Kevin Stratvert]: Now, two more quick things for setup and then let's jump into our first app.
[译文] [Kevin Stratvert]: 现在,还有两件快速设置的事情,然后我们就开始构建第一个应用程序。
[原文] [Kevin Stratvert]: First, let's set up a Git repo. You can do that by opening a new terminal window by pressing control shiftbacktick.
[译文] [Kevin Stratvert]: 首先,让我们设置一个 Git 仓库。你可以通过按 Control + Shift + Backtick 打开一个新的终端窗口来完成此操作。
[原文] [Kevin Stratvert]: Then type get and then press enter.
[译文] [Kevin Stratvert]: 然后输入 git 并按回车。
[原文] [Kevin Stratvert]: Next, we need a command prompt to open claude code. So click on this drop-own arrow and then click on command prompt.
[译文] [Kevin Stratvert]: 接下来,我们需要一个命令提示符来打开 Claude Code。所以点击这个下拉箭头,然后点击命令提示符。
[原文] [Kevin Stratvert]: Then type in claude and press enter. Press one to trust this directory and off we go.
[译文] [Kevin Stratvert]: 然后输入 claude 并按回车。按 1 信任此目录,我们就开始了。
- 章节 2:从零构建应用:提示词工程与计划模式 (Building from Scratch: Prompt Engineering and Plan Mode)
- 章节 3:审查实施计划与代码生成 (Reviewing Implementation Plan and Code Generation)
- 章节 4:应用测试与初期 Bug 发现 (App Testing and Initial Bug Discovery)
- 章节 5:场景二:处理现有代码库与 CLAUDE.md (Scenario 2: Existing Codebases and CLAUDE.md)
- 章节 6:利用上下文修复 Bug (Fixing Bugs Using Context)
- 章节 7:场景三:架构变更与 YOLO 模式 (Scenario 3: Architecture Changes and YOLO Mode)
- 章节 8:最终实现与总结 (Final Implementation and Conclusion)
正在加载后续章节…





