Class 01 — Claude Code
From bash prompt to API call — every part of a claude invocation, and the two modes that split them all.
-pMost flags only work in one mode. Knowing which you're in is always step one.
§ Anatomy
§ Invocations
claude
Start the interactive REPL. Drops you into a conversational session in your current working directory.
claude "query"
Start the REPL with an initial prompt pre-loaded. Claude processes the query and continues interactively.
claude -p "query"
Query Claude and exit immediately. The foundation of scripting — every automation flag requires this.
cat file | claude -p "query"
Process piped stdin content. Claude reads from the pipe and responds to the query about it.
claude -c
Continue the most recent conversation in the current directory. Resumes context from your last session.
claude -r "session" "query"
Resume a session by its ID or saved name, with an optional follow-up query to immediately continue.
claude update
Update Claude Code to the latest version. Checks for and installs available updates.
claude mcp
Configure Model Context Protocol servers. Manage MCP server integrations and connections.