Installing & Giving Tasks
Install the Claude Code CLI, open your project, and describe what you want in plain English.
Getting started with Claude Code is quick: install it, open your project folder, and start giving it tasks.
Install and start
- Install the Claude Code CLI (via npm or your platform's installer).
cdinto your project directory.- Run
claudeto start a session.
Give good tasks
A good task is specific and scoped. Instead of "improve the site", say "add form validation to the signup form and show inline error messages". The more concrete the goal, the better the result.
Review the changes
Claude Code shows you what it plans to change. Read the diff, approve it, or ask for adjustments before anything is committed.
Example
# Install (one option — check the docs for your platform)
npm install -g @anthropic-ai/claude-code
# Open your project and start a session
cd my-website
claude
# Example tasks to type once inside:
# "Create an about page that matches the styling of index.html."
# "Add client-side validation to the contact form."
# "Extract the repeated card markup into a reusable snippet."When to use it
- Scaffold a complete Next.js page — component, route, and basic styles — with a single plain-English command.
- Ask Claude Code to add pagination to an existing table by describing the desired UI behaviour.
- Have Claude Code install a new package and wire it into the correct config file automatically.
More examples
Install and start Claude Code
Installs Claude Code globally and opens an interactive session inside your project.
npm install -g @anthropic-ai/claude-code
cd my-project
claudeGive a feature task inline
A one-line task that specifies the component name, behaviour, and target file so Claude Code knows exactly what to do.
claude "Create a React <SearchBar> component that calls /api/search?q= on each keystroke with 300 ms debounce. Put it in src/components/SearchBar.tsx"Multi-file task with test request
A numbered multi-step task guides Claude Code to create all affected files in the right order.
claude "Add a dark-mode toggle to the site:
1. Add a ThemeContext in src/context/ThemeContext.tsx
2. Wrap <App> with ThemeProvider in main.tsx
3. Add a <ThemeToggle> button that switches classes on <html>
4. Write a Vitest test for the context"
Discussion