返回播客Claude
Claude Code 101
什么是 Claude Code?
Claude Code is [music] an agentic coding tool that understands your code base, edits your files, run commands, and integrates with your existing developer tools to help you get things done faster.
Claude Code 是 [music] 一款智能体编程工具,能理解你的代码库、编辑文件、执行命令,并与现有开发工具集成,帮助你更高效地完成工作。
It's available in your terminal, Visual Studio Code, the Claude desktop app, on the web, and JetBrains IDEs.
它可在终端、Visual Studio Code、Claude 桌面应用、Web 端以及 JetBrains IDE 中使用。
But, we'll be using it in the terminal for this video.
不过,本视频将使用终端进行演示。
If you've ever used Claude AI, you're probably wondering what the difference is between the two.
如果你曾经用过 Claude AI,可能会想知道两者之间有何区别。
Unlike Claude AI, Claude Code has direct access to your files in your terminal and your entire code base.
与 Claude AI 不同,Claude Code 可直接访问终端中的文件以及整个代码库。
So, instead of copying and pasting code back and forth, it can go in and do all the work itself.
因此,无需来回复制粘贴代码,它可以直接进入并完成所有工作。
The easiest differentiator is that Claude Code works as an AI agent.
最简单的区别在于,Claude Code 是以 AI 智能体的方式运作的。
An AI agent is a software that can interact with its environment and perform actions to complete a defined goal.
AI 智能体是一种能与其所处环境交互并执行操作以完成既定目标的软件。
The most basic way this can be done is by having a large language model in a loop in real time.
实现这一点最基本的方式,是让一个大型语言模型实时运行在一个循环中。
AI agents have access to things like tools, external services, or other AI agents to help it reach its predefined goals.
AI 智能体可访问工具、外部服务或其他 AI 智能体等资源,以帮助其达成预定目标。
So, what does that actually look like?
那么,这实际上是什么样子的呢?
Well, here's a couple of examples.
来看几个例子。
It can read and understand your code base.
它可以读取并理解你的代码库。
You can ask Claude Code to explain a feature or trace a bug throughout your code.
你可以要求 Claude Code 解释某个功能,或在代码中追踪一个 bug。
Claude Code can execute your build script, run your tests, install packages, and use the output to decide what to do next.
Claude Code 可以执行构建脚本、运行测试、安装依赖包,并根据输出结果决定下一步操作。
Claude Code can search the web.
Claude Code 可以搜索网络。
If it needs documentation on the latest API references, for example, it can do that for you.
如果需要查阅最新的 API 参考文档,它可以帮你完成。
To use Claude Code effectively, it's important to know these concepts.
要有效使用 Claude Code,了解以下这些概念很重要。
First is the context window.
第一是上下文窗口。
Think of this as Claude's working memory.
可以把它看作 Claude 的工作记忆。
It can hold a lot, but not everything at once.
它能容纳很多内容,但无法一次性容纳所有内容。
This is where the agentic aspect of it comes in.
这正是它的智能体特性发挥作用的地方。
Finding strategic ways to find the answers within your code base without storing your entire code base into context.
在不将整个代码库存入上下文的前提下,以策略性的方式在代码库中找到答案。
Second is that it asks for permission.
第二是它会请求权限。
By default, Claude Code will ask you before running commands or making changes to your code base.
默认情况下,Claude Code 在执行命令或更改代码库之前会先征得你的同意。
You're always in control, whether that's being more hands-on or passive.
你始终处于掌控之中,无论是更主动参与还是被动旁观。
Third, it can make mistakes.
第三,它可能会犯错。
Just like any tool, Claude Code isn't perfect.
与任何工具一样,Claude Code 并不完美。
It might misunderstand your intent, introduce a new bug, or over-engineer a solution.
它可能误解你的意图、引入新的 bug,或给出过度设计的解决方案。
Quick recap.
快速回顾。
Claude Code is an agentic coding tool.
Claude Code 是一款智能体编程工具。
It reads your code base, edits your files, runs commands, [music] and connects to external tools to help you ship faster.
它读取代码库、编辑文件、执行命令,[music] 并连接外部工具,帮助你更快地交付。
You can download it today in your terminal, VS Code, JetBrains, [music] and the Claude desktop app.
你现在就可以在终端、VS Code、JetBrains、[music] 以及 Claude 桌面应用中下载它。