Prerequisites
- Bun ≥ 1.1.0 — the only required runtime. Install from bun.sh.
- An Anthropic API key or access to Claude through your organization’s account.
Get started
Install Claude Code
Install the Verify the installation:
claude binary globally from npm:The published npm package is
@anthropic-ai/claude-code. The binary name is claude. See Installation for build-from-source instructions and platform notes.Authenticate
Log in with your Anthropic account:This opens an OAuth flow in your browser. On macOS, credentials are stored securely in the system Keychain.To log out at any time:
Run a diagnostics check
Before your first session, verify that your environment is configured correctly:The
/doctor command runs the Doctor.tsx full-screen UI (src/screens/Doctor.tsx), checking API connectivity, authentication, tool availability, and MCP server status. Fix any reported issues before continuing.First things to try
Once you’re in the REPL, start with these commands to get oriented:Get help: /help
Get help: /help
List all available slash commands and their descriptions:Commands are grouped by category. Use this whenever you want to discover what’s available.
Check diagnostics: /doctor
Check diagnostics: /doctor
Run environment diagnostics at any time from inside the REPL:Reports on API connectivity, authentication status, tool availability, and connected MCP servers.
Ask Claude to read a file
Ask Claude to read a file
Ask Claude to read and explain a file in your project:Claude will invoke
FileReadTool and stream a response with its analysis. You’ll see each tool invocation rendered inline in the terminal.Ask Claude to make an edit
Ask Claude to make an edit
Ask Claude to modify a file. Claude will use Claude will ask for permission before writing any changes, unless you’re running in a non-interactive mode.
FileEditTool (partial string replacement) or FileWriteTool (full overwrite) depending on the change:Run a shell command
Run a shell command
Ask Claude to run a shell command on your behalf:Claude uses
BashTool (src/tools/BashTool) to execute the command and feeds the output back into the conversation.Sample REPL session
Useful slash commands
/commit
Stage, draft a commit message, and commit — all from the REPL. Claude reads your diff and writes the message.
/review
Ask Claude for a code review of the current diff or a specific file. Uses a
PromptCommand that injects your changes as context./config
View and edit Claude Code settings interactively. Covers API keys, permission modes, themes, and more.
/memory
Manage persistent memory entries. Claude can recall facts across sessions using the
memdir subsystem./compact
Compress the conversation context when you approach the token limit. Summarizes history to free up context window space.
/cost
Show token usage and estimated cost for the current session, tracked by
src/cost-tracker.ts.Common first workflows
- Explore a codebase
- Fix a bug
- Git workflow
- Multi-agent task
GlobTool, GrepTool, and FileReadTool in sequence to navigate the codebase and synthesize an answer.