Claude Code
In the previous chapter we used Cursor, which is an IDE that embeds a selection of AI-coding tools, each of which is model-agnostic. That means you can easily switch between GPT-4o and Gemini with the click of a button.
Some of the models available are different flavours of Claude, from Anthropic. Claude is not only the name for the models, but some tools based on them. Firstly, Claude is also the name of a chat-like interface similar to ChatGPT, obviously based on the Claude models instead of OpenAI’s GPT models.
You can also access the models through the Claude API, which allows you to integrate the models into your own products.
The subject of this lesson is Claude Code. This is a CLI tool that you access in the terminal, that provides AI-backed programming tools, based on the Claude models.
This description might sound a little complicated, but don’t worry—it’s not critical to understand the slightly confusing marketing from Anthropic. The important part is that there’s a command-line tool that’s great at coding, and you’re going to learn how to use it.
What is Claude Code?
You can think of Claude Code as the AI-chat panel in Cursor. You start it in a the project directory, and from there you interact in a chat window. Claude Code has access to the complete context of your project, and has the ability to perform file operations, run bash commands and perform web queries. It also supports Model Context Protocol (MCP), so you can add additional tools for it to use.
Having full access to the context of the project directory makes it great for gaining insight into an entire project, and working on more challenging issues.
In the first video, we’ll get Claude Code installed, and then introduce it to the Yesterday’s Weather project.
Installation
You’ll see how to install in the video, but so that you’ve got a head-start, Claude Code is shipped as an npm module—that’s the packaging system for JavaScript, and is built on top of nodeJS.
If you use Homebrew as your package manager on macOS, then Installation is as simple as:
$ brew install npm
If you don’t currently have home brew installed, then check out the website and it has very simple instructions on how to get it installed.
Once npm is installed, then you can follow the instructions on the Claude Code website:
$ npm install -g @anthropic-ai/claude-code
Claude Account
There are two ways to pay for access to Claude Code: either with one of their subscriptions (Pro or Max), or via their API. The subscriptions have some limits, but have a fixed cost. Using the API means you pay per request, so you can use as much as you like, but you’ll pay for it.
In this lesson I’ve signed up for an API account, which will give you $5 credit. This is more than enough to complete this project.