promptdojo_
chapter 32

intro to claude cli, the door to real building

you've used claude in a chat window. the claude cli is the same model with its hands on your actual files. this chapter installs it, signs you in, and runs your first real command. by the end you've watched an ai read, plan, and change things on your machine, and you know when to reach for the cli instead of the chat box.

3 lessons · 23 steps · 48 XP

You've talked to Claude. Now Claude gets to work.

If you've used Claude in a browser tab, you've used a chat. You type, it answers, you copy the answer somewhere useful. The model is smart, but it's behind glass. It can't touch anything. Every change is a copy-and-paste job you do by hand.

The Claude CLI is the same model with the glass removed. It runs in the terminal you just learned, it can see the files in the folder you start it from, and with your permission it can change them, create new ones, and run commands. You stop being the copy-paste middleman. You describe what you want, and you watch it happen.

That's why this chapter is called the door. Everything before it was preparation. This is the first time in the course you point an AI at real work and it does real work.

Chat or CLI: it's not a loyalty test

You're not picking a side. Chat and CLI are two tools for two shapes of problem, and by the end of this chapter you'll know which is which:

  • Chat is for thinking. Questions, explanations, "what are my options," a draft you'll place yourself.
  • CLI is for doing. "Make these files," "fix this folder of code," "run this and tell me what broke." Work that touches your machine.

Most building days use both. You think in the chat, you build in the CLI.

What you'll be able to do at the end

By the end of these three lessons you will have:

  • Installed the Claude CLI on your own machine and confirmed it runs.
  • Signed in, and understood what the sign-in actually did (no API key, no credit card, just your Claude account).
  • Started a session inside a folder and given Claude its first real instruction.
  • Watched the agent loop happen: Claude reads, plans, acts, checks, and comes back to you. You'll learn to approve its actions instead of fearing them.
  • Made a clear call, with a rule you can repeat, about when to open a chat and when to open the CLI.

About thirty minutes. The next chapter does the same for a second tool, the OpenAI Codex CLI, so you're not locked into one vendor. But this one is the door. Walk through it.