Install it and ask it something
One command to install, one command to start, and one question to ask. The point of this lesson is the answer you get back and what had to happen for it to be right.
Install
On macOS, Linux or WSL:
curl -fsSL https://claude.ai/install.sh | bashOn Windows PowerShell it is irm https://claude.ai/install.ps1 | iex, and Homebrew has it as brew install --cask claude-code. The installer script keeps itself updated in the background; the Homebrew cask does not, so that one needs brew upgrade now and then.
claude --version2.1.138 (Claude Code)
That number matters later. Claude Code ships changes weekly, and a lesson that mentions a flag will say which version it was checked against.
Start it in a project
Claude Code works in whatever directory you start it in. There is no project to create and nothing to index.
cd link-shortener
claudeThat opens the interactive session, which is where you will spend most of this course. The first time it will ask you to log in with your Claude account or an API key.
The first question
Rather than opening the interface, this lesson asks the same thing without it. The -p flag runs one prompt and prints the answer, which is the form that fits on a page. Everything it does is the same either way.
claude -p "In one sentence, what does this project do?"Shortens long URLs to compact codes and expands them back to original URLs.
Nothing was pasted in. No files were attached, no folder was uploaded, and no search index was built beforehand. It was given a question and a directory, and it went and read the project itself.
That single fact is what separates this from a chat window with your code copied into it, and the next lesson is about how it happens.
claude -p "how do I set up hooks?" works, and so does asking inside a session. It has read its own documentation, which makes it a reasonable first place to look when this course has not covered something yet.- Run the same question in one of your own repositories and see how much it gets right.
- Ask
claude -p "what would you change first in this project?"and keep the answer for later.
Little by little, you're building something great.