Once you've installed Claude Code, here's how to use it. The core is simple — run claude in your project folder and tell it what to do in plain language; it reads and edits files directly. Before changing anything, it always shows a diff and asks for approval.
Getting started
- Open a terminal in your project folder and run
claude. On first run you'll log in via the browser (OAuth) once. - After the welcome screen you get an interactive prompt. Type your request in natural language.
# after cd into your project folder
claude
Claude can see the folder you launch in and its subfolders, so be mindful of where you run it.
Asking + referencing files
Just ask in plain language. To point at a specific file, type @ then the path (autocomplete supported); that file's content is injected into the conversation.
@src/pages/Home.tsx change the header text to 'Welcome'
Claude shows the change as a diff (preview) and asks for approval — you can accept, reject, or ask for revisions.
Handy commands & shortcuts
/— list available slash commands@path— add a specific file to context!— run a terminal command and feed the output to Claude?— show shortcuts /Tabautocomplete /↑historyEsc— stop the current action/rewindorEsctwice — roll back to a previous checkpoint (a snapshot is saved on every edit)/loginswitch accounts ·/mcpmanage MCP servers
Two modes
- Interactive (default): open a session with
claudeand go back and forth. Good for complex implementation. - One-shot:
claude -p "list every TODO left in src/api"runs once and returns a result. Good for scripts, CI, and quick lookups.
Using it in VS Code
Two ways:
- Official extension ("Claude Code for VS Code"): adds a sidebar panel and a diff view where you approve changes with a click. (Works in Cursor too, since it's a VS Code extension.)
- Built-in terminal: run
claudedirectly; file changes show up in your editor tabs immediately. MCP setup, the!command, and some slash commands are CLI-only.
Safety
By default Claude Code requires approval before writing files or running commands (Ask mode). You can configure permissions to block dangerous commands (force pushes, deletes). Every edit is saved as a checkpoint you can undo with /rewind.
Getting more out of it
Writing your project's structure, rules, and common commands into a CLAUDE.md makes every session faster and reduces mistakes. See the CLAUDE.md guide. To connect external tools, see the MCP connection guide.