Getting started with the CLI: init, context & testing
Open a project, launch Claude, and meet the commands you'll use every day โ /login, /init and /context โ then let it run your whole test suite.
01Open a project and launch Claude
Open the project you built last week (our PM app) with File โ Open. Before doing anything, it's worth committing your work so you have a clean baseline โ then let Claude loose on it.
git status git add . git commit -m "step 10 complete" # start absolutely fresh, then launch: exit # open a new terminal (the + button), then: claude
Up comes the Claude Code CLI โ characters and lines printed in a very old-school way,
like a previous decade of computing. The throwback feel is intentional: it's meant to feel like a
raw, native interaction with the LLM. To talk to Claude, just type. To give it a command, start with a
slash (/).
02/login and /init
Your first command is /login โ it opens a web page to sign in with your Anthropic
credentials, then drops you back logged in. (If you want free models instead, hang on until later.)
Claude Code has its own memory file, CLAUDE.md. You could simply rename your
agents.md to CLAUDE.md โ or run
/init, which asks Claude to explore the project and organise itself.
Run /init and Claude shows one of its playful processing words, then searches,
analyses and explores the directory structure โ reading your existing agents.md
along the way โ before writing a CLAUDE.md. You'll see the diff in VS Code (even
from the terminal, Claude can drive the editor), and then its famous edit prompt:
Press 1 โ Yes
Accept this single edit.
Press 2 โ Yes, and allow all this session
Shift+Tab is the shortcut. Your finger lives over this area when you use Claude Code.
Press 3 โ No
Reject the edit. You can also press Tab to add a comment โ "yes, but also think aboutโฆ".
As a general principle, write CLAUDE.md yourself โ just as we did for
agents.md. It's the most crucial thing for the human supervisor to get right, so
invest your time there. Letting /init draft it and then improving it is fine; letting
it own the file forever is not.
03/context โ mind the window
A command you'll run constantly: /context gives a quick visual of how much of the
context window is being used. Claude's window is 200,000 tokens โ deliberately not huge.
Anthropic wants a smart, powerful model with carefully managed context.
Memory holds things like your CLAUDE.md; messages are your interactions so
far โ even basic setup uses a fair amount. The buffer at the end is reserved room so Claude can maneuver.
When the window fills, Claude compacts โ compressing the conversation down to something smaller so it can keep going. The buffer is the wiggle room it needs to do that.
04Put it to work โ run the tests
Now instruct Claude the way you learned last week. First, make sure it understands the project:
Please read plan.md in the docs folder to understand everything that's been
built, and any supporting docs.
Then ask it to verify the project actually works:
Please run all tests to confirm everything is working โ bringing the server up as needed and back down at the end.
You'll hit the familiar permission prompt (allow this docker build command?).
Press 2 to say yes and not be asked again for docker builds. In one memorable moment, Docker
wasn't running after a restart โ and Claude knew how to launch Docker Desktop itself.
Auto-launching Docker is the kind of thing earlier models couldn't reliably do. Claude ran every backend
and frontend test, and reported them all passing โ two harmless deprecation warnings aside. A quick
/context afterward shows how fast messages fill the window, so keep a healthy eye on it.
โ Key takeaways
- Commit first, then launch Claude Code with
claudein a fresh terminal โ the retro CLI feel is intentional. /loginsigns you in;/initexplores the repo and drafts aCLAUDE.mdโ but own that file yourself.- The edit prompt: 1 yes ยท 2 yes & allow all ยท 3 no ยท Tab to add a comment.
/contextvisualises a fixed 200k-token window โ memory, messages, free space and a compaction buffer.- Instruct Claude to read the docs and run the full test suite; a strong model can even start Docker for you.