Anthropic/YouTube/25/02/Introducing Claude Code
- runtime: 3min 54sec
Vid
Intro (skip)
- 00:00 Should we be doing like big smile or? - No, what you're doing- - Big smile's creepy. That's sort of what I'm getting at. I'm Boris, I'm an engineer. I'm Cat, I'm a product manager. We love seeing what people build with Claude, especially with coding,
- 00:12 and we want to make Claude better at coding for everyone. We built some tools, one of which we're sharing today. We're launching Claude Code as a research preview. Claude Code is an agentic coding tool
opening #Terminal and invoking claude CLI/Tool
- 00:27 that lets you work with Claude directly in your terminal. We're gonna show you an example of it in action. So we have a project here. It's a nextjs app. 00:35 Let's open it up in an instance of Claude Code.
- right click on project folder > Services > New iTerm2 Window Here
- In the CLI:
claude is invoked
overview
- 00:41 Now that we've done this, Claude Code has access to all of the files in this repository.
- One of the first times I've seen a compelling Chat #UI in #CLI - is this Curses?
- We don't know much about this codebase. It looks like an app for chatting with a customer support agent.
explain codebase
- Let's get Claude to help explain this codebase to us.
- they prompt it: "explain to me this project structure"
- Claude starts by reading the higher level files
- 00:59 and then it dives in deeper. Now it's going through all the components in the project. Cool, here's its final analysis.
- it gathers lots of context from the repository its analysis produces a report of key dependencies, deployment, project structure, etc
- will this remove the need for tools like Repomix ?
- it takes a minute or more (they speed it up)
01:16 use case - editing code to update the website served by the repo
- use case - editing code: So say I was asked to replace this left sidebar with a chat history, and I'm also gonna add a new chat button.
- 01:22 I'm gonna ask Claude to help me out here. We haven't specified any files or paths and Claude's already finding the right files to update by itself. Claude can also show its thinking and we can see how it's decided to tackle this problem.
- 01:44 Claude's asking me if I wanna accept these changes. I'll say, yeah. Now Claude's updating the nav bar, adding a button and icons as well. Next, it's updating the logic to ensure the saving state works correctly. After a bit, Claude completes the task.
- 02:05 Here's a summary of what it's done. Let's take a look at the app. So we're seeing the new chat button and new chat history section on the left. Let's check if I can start a new chat while keeping the previous one saved.
- 02:20 I'll try out the new chat button too. Great, it's all working. Now let's ask Claude to add some tests to make sure that the features we just added work. Claude's asking for permission to run commands. We'll say yes.
- 02:41 Claude is making some changes to run these tests. After getting the results, it continues with its plan until all tests pass. After a few minutes, it looks like we're good to go. Now I'm going to ask Claude to compile the app
- 03:08 and see if we get any build errors. Let's see what it finds. Claude identified the build errors and is now fixing them. Then it tries to build again. It'll keep going until it works. Now let's finish everything up by asking Claude to commit its changes
- 03:30 and push them to GitHub. Claude creates a summary and a description of our changes. And it'll push the changes to GitHub. That's it, that's an example of what Claude Code can do. We can't wait for people to start building with it.