1.2 Verify Installation
Let's confirm Claude Code is working correctly and learn the basic commands you'll use throughout this program.
Your First Claude Code Session
- Terminal CLI
- Claude Code Desktop
Start an interactive session:
claude
You should see Claude Code initialize and present a prompt where you can type messages.
Start a new session:
- Click + New session in the sidebar (or press
Cmd+Non macOS /Ctrl+Non Windows) - Set Environment to Local
- Click Select folder and choose any project directory (it doesn't matter which one for this first check)
- Leave the default model, then type your message in the composer
Either way, try a simple greeting:
Hello! Can you confirm you're working correctly?
Claude should respond conversationally. This confirms:
- Your API key is valid
- Network connectivity works
- Claude Code is properly installed
- Terminal CLI
- Claude Code Desktop
Type /exit or press Ctrl+C to end the session.
Click Cmd+W (macOS) / Ctrl+W (Windows) to close the session, or just leave it — closing the window doesn't lose anything, since the session stays in the sidebar.
Essential Commands
Here are the commands you'll use most frequently:
Starting Claude Code
- Terminal CLI
- Claude Code Desktop
# Start in current directory
claude
# Start in a specific directory
claude /path/to/project
# Start with an initial prompt
claude "What files are in this directory?"
# Start in non-interactive mode (runs once and exits)
claude -p "List all JavaScript files"
The Desktop app doesn't take command-line flags — each one maps to a step in the session-start UI instead:
| CLI flag | Desktop equivalent |
|---|---|
claude (current directory) | Click + New session, set Environment to Local, and select the folder you're already working in |
claude /path/to/project | Click + New session → Select folder and browse to that directory |
claude "prompt" (initial prompt) | Type the prompt as your first message in the composer instead of passing it as an argument |
claude -p "prompt" (non-interactive) | Not available — the Desktop app is interactive-only. Just send one message and don't send another if you want the "run once" feel |
In-Session Commands
While in a Claude Code session, these slash commands are available:
| Command | Description |
|---|---|
/help | Show available commands |
/clear | Start a new session with empty context — the previous session stays on disk and is resumable |
/compact | Summarize conversation to free context space |
/rewind | Undo to a specific point and compact from there |
/context | Visualize current context usage as a colored grid |
/status | Show session status and context usage |
/exit | Exit Claude Code |
/config* | Open settings — model, theme, permission mode, and output style |
/model | Switch between Claude models |
/doctor | Diagnose installation and configuration issues |
/memory | View and manage persistent memories |
/review | Review recent changes |
/init | Bootstrap CLAUDE.md for a project |
/rename | Name the current conversation (alias: /name) so it's findable in /resume |
/color | Set the prompt bar color for this session |
/branch | Branch the conversation at this point into a separate session |
/resume* | Resume a previous conversation |
Desktop equivalent for the starred rows: /config opens Settings → Claude Code directly rather than an inline panel (typing extra text after it, like /config theme=dark, is ignored). /resume isn't needed at all — every past session already sits in the sidebar; click one to reopen it.
- Terminal CLI
- Claude Code Desktop
Open /config and set Output style to Explanatory (or Learning). Claude then narrates why it chose an approach as it works, instead of just producing the result. When you're ramping on an unfamiliar codebase, language, or tool, this is the single highest-value setting in the product.
There is no separate /output-style command — output styles live under /config. Switch back to the default once the narration stops teaching you anything new.
Running /config opens Settings → Claude Code in the app. Look for an Output style option there and set it to Explanatory (or Learning) the same way. If you don't see that option in your installed version, ask Claude directly — it can point you to wherever the setting lives in your build.
Keyboard Shortcuts
The Desktop app's Code tab has its own shortcut set — the terminal's interactive-mode bindings (like Shift+Tab) don't carry over. Here's the CLI shortcut and its Desktop equivalent side by side:
| CLI Shortcut | Action | Desktop Equivalent |
|---|---|---|
Ctrl+C | Cancel current operation or exit | Esc to stop a response; Cmd+W / Ctrl+W to close the session |
Ctrl+L | Clear screen | Not applicable — there's no terminal screen to clear in a GUI |
Escape | Interrupt current generation | Same — Esc stops Claude's response |
Esc Esc | Same as /rewind — step back through conversation and code-modification history | Not bound to a shortcut; run /rewind directly |
Shift+Tab | Cycle operational modes (Manual, Accept Edits, Plan, Auto) | Cmd+Shift+M / Ctrl+Shift+M opens the permission mode menu, or click the mode selector next to the send button |
Shift+Enter | Insert a newline without sending | Works out of the box in the composer — no setup needed |
Up/Down | Navigate command history | Not applicable — the composer doesn't recall prior prompts this way |
Tab | Autocomplete file paths, skills, plugins, and slash commands | Type / in the composer, or click the + button next to it, to browse commands, skills, and plugins |
Ctrl+A | Inside /resume: search sessions across all projects on this machine | Not applicable — use the sidebar's filter controls to search across sessions instead |
A few Desktop-only shortcuts worth knowing: Cmd+N / Ctrl+N (new session), Cmd+Shift+I / Ctrl+Shift+I (model menu), and Cmd+/ / Ctrl+/ (show all shortcuts in the app).
Shift+Enter only works after you run /terminal-setup once. In Apple's built-in Terminal the equivalent binding is Option+Enter. Claude Code tells you which one applies when you run the command. This only applies to the terminal CLI (including the Desktop app's integrated terminal pane) — in the Desktop app's chat itself, Shift+Enter works out of the box.
The /compact, /rewind, and /context commands listed above are essential tools for keeping your AI agent sharp during long sessions. You'll learn exactly when and how to use them — along with /branch, /rename, and /resume — in Context Management Best Practices.
Verification Exercise: Hello Claude
Let's run a simple exercise to verify everything works. Create a temporary directory and test Claude's file operations:
- Terminal CLI
- Claude Code Desktop
mkdir -p ~/claude-test && cd ~/claude-test
claude
- Create the directory first — open the integrated terminal (`Ctrl+`` on either macOS or Windows, or the Views menu) from any existing session, or use your system terminal:
mkdir -p ~/claude-test
- Click + New session in the sidebar
- Set Environment to Local, click Select folder, and choose
~/claude-test - Type your first message in the composer
Notice that you cd into the directory before running claude. That matters: Claude Code creates and stores a session scoped to the working directory. Opening Claude here creates a ~/claude-test session that has nothing to do with sessions you start elsewhere.
You'll feel this the moment you run /resume — it lists only the sessions started in your current directory. Press Ctrl+A to widen the search to every project on the machine; if you then pick a session from somewhere else, Claude hands you a cd <path> && claude --resume <id> command instead of resuming in place.
This shapes how you organize your work. More on it in Session Management.
Desktop works the same way, just through folders instead of cd: each session is permanently tied to the project folder you picked when you created it (visible in the sidebar), and /resume doesn't apply since there's no separate picker — every session is already listed there. If the folder is a Git repository, Desktop also gives each session its own isolated Git worktree, so parallel sessions in the same repo never step on each other's uncommitted changes.
In the Claude session, try these prompts:
1. Create a file:
Create a file called hello.py with a simple Python script that prints "Hello from Claude Code!"
2. Read the file back:
Read hello.py and confirm its contents
3. Run the script:
Run the Python script and show me the output
4. Clean up:
Delete hello.py
If all four steps complete successfully, your installation is working correctly.
Understanding Claude's Tools
Claude Code has access to several built-in tools:
| Tool | Purpose |
|---|---|
| Read | Read file contents |
| Write | Create or overwrite files |
| Edit | Make targeted changes to existing files |
| Bash | Execute shell commands |
| Glob | Find files matching patterns |
| Grep | Search file contents |
| Task | Launch specialized sub-agents |
You don't need to memorize these — Claude uses them automatically based on your requests. But understanding they exist helps you phrase requests effectively.
Starting in Claude Code v2.1.117, native macOS and Linux builds (which most of us run at Liatrio) replace the separate Glob and Grep tools with embedded bfs and ugrep binaries that run through the Bash tool — the same searches, just without a separate tool round-trip. On these builds you'll see Claude reach for Bash to find files and search contents rather than calling Glob or Grep directly. Windows and npm-installed builds are unchanged and still expose Glob and Grep as first-class tools, so if you want them back, install Claude Code via npm.
Either way, you don't do anything differently — Claude picks the right search method for your platform automatically.
Check Model Access
Verify you have access to the models you'll use:
- Terminal CLI
- Claude Code Desktop
claude "What model are you currently using?"
Type the question directly into an open session:
What model are you currently using?
You can also just check the model dropdown next to the send button — it always shows the model for the current session.
For this program, we primarily use:
- Claude Opus (latest version) — Anthropic's most advanced model, ideal for complex reasoning, high-level planning, and long-horizon tasks
- Claude Sonnet (latest version) — Excellent for most development tasks, offering a good mix of speed and intelligence
Troubleshooting Verification
Claude doesn't respond
- Check your internet connection
- Verify your API key is valid at console.anthropic.com
- Check for service status at status.anthropic.com
"Permission denied" when creating files
- Ensure you have write permissions in the current directory
- Try running in a directory you own (like
~/projects)
Commands run slowly
- Large context windows take longer to process
- Start fresh sessions for new tasks to avoid context buildup
- Check your network latency to Anthropic's API
Configure Your Status Line
- Terminal CLI
- Claude Code Desktop
Claude Code can display a customizable status line at the bottom of your terminal — a live bar that runs any shell script you configure. It receives JSON session data and can show things like your current model, context window usage, session costs, git branch, and more. See the full list of available properties for everything you can display. Setting this up now gives you useful session telemetry from day one.
Run the /statusline Command
The /statusline slash command generates a status line script and configures it for you automatically. Start a Claude Code session and run /statusline with a prompt describing what you want to see. Here's a sample prompt to get you started:
/statusline I would like a multi-line status line with emojis for a fun, colorful feel.
Line 1: Current model (🤖), a color-coded context meter showing tokens used (📊, from context_window.total_input_tokens plus total_output_tokens — green below 80k, yellow 80k–120k, red above 120k), and total session duration in human-readable format like 2m 34s or 1h 2m (⏱️).
Line 2: Current directory (shortened — strip everything up to and including /repos/ from the path) and git branch. Use 📂 before the directory and 🌿 before the branch.
Use ANSI colors throughout. The script should be POSIX /bin/sh compatible and read JSON from stdin.
Claude will generate a shell script, save it to ~/.claude/, and update your settings — all in one step. Experiment with different prompts to make it your own!
Why tokens instead of a percent? Research shows model quality degrades with the absolute number of tokens in context — most models are substantially degraded near ~100K tokens whether their window is 200K or 1M — so a percent gauge means different things on different models. You'll learn the full story in 1.7 Context Management and the Context Internals appendix.
Verify the Status Line
Claude should automatically reload its config to pick up your new status line, displaying it at the bottom of the terminal. If it doesn't appear, ask Claude to help troubleshoot — try something like "my status line isn't showing up, can you help me debug it?"
The Desktop app doesn't run custom statusLine scripts at all — even if you (or a teammate on the CLI) already configured one in ~/.claude/settings.json, the Code tab silently ignores it. Instead, it has a built-in usage display:
- Look for the usage ring next to the model picker (near the send button)
- Click it to open a panel showing:
- Context window — how many tokens the current session has used
- 5-hour limit and Weekly limit — your plan usage as a percentage, shared across every Claude Code surface you use (CLI included)
This gets you the same "how full is my session" awareness the CLI status line provides — you just click to check it instead of glancing at a persistent bar. There's currently no way to get the colorful, scripted status line from the CLI tab inside the Desktop app itself.
For a category-by-category breakdown of what's actually consuming your context (not just a total), run /context in either surface — see 1.7 Context Management.
Clean Up Test Directory
Once verified, clean up the test directory:
- Terminal CLI
- Claude Code Desktop
cd ~
rm -rf ~/claude-test
Run the same command in the integrated terminal (`Ctrl+`` on macOS or Windows):
rm -rf ~/claude-test
Then hover over the session in the sidebar and click the archive icon to remove it, since its project folder no longer exists.
Next Steps
With Claude Code verified and working, the next section walks you through installing the Spec-Driven Development workflow prompts that form the backbone of this program.