Claude Code Basics
1 / 8
FS

Claude Code Basics

Your AI-powered coding companion in the terminal

FS
Introduction

What is Claude Code?

Claude Code is Anthropic's official agentic coding tool that runs directly in your terminal.

It understands your codebase, executes commands, edits files, and helps you build software through natural conversation.

Agentic

Autonomously explores, plans, and executes multi-step tasks

Context-Aware

Understands your entire project structure and codebase

Tool-Using

Reads files, runs commands, searches code, and more

Conversational

Natural language interface - just describe what you need

FS
Getting Started

Installation

Install Claude Code globally using npm:

npm install -g @anthropic-ai/claude-code

Or run directly with npx (no install needed):

npx @anthropic-ai/claude-code

Requirements

  • Node.js 18+ - Required runtime
  • Anthropic API key - Or use Claude Pro/Max subscription
  • macOS, Linux, or Windows - Cross-platform support
FS
Getting Started

Your First Session

Navigate to your project and start:

cd my-project
claude

Claude explores your codebase, asks questions if needed, and makes changes with your approval.

Type natural language requests:

> What files are in this project?
> Explain the auth flow
> Add a logout button
FS
Usage

Key Commands

Slash Commands

  • /help - Show available commands
  • /clear - Clear conversation history
  • /compact - Summarize and compact context
  • /cost - Show token usage and costs
  • /vim - Toggle vim mode

Keyboard Shortcuts

  • Ctrl+C - Cancel current operation
  • Ctrl+D - Exit Claude Code
  • Tab - Autocomplete file paths
  • Up/Down - Navigate history
FS
Safety

Permission System

Claude Code asks for permission before executing potentially impactful actions:

File Edits

Shows a diff before modifying any file

Bash Commands

Displays command before execution

Allow/Deny

You control what gets executed

Allow Always

Trust specific patterns permanently

Use --dangerously-skip-permissions only in sandboxed environments!

FS
Tips

Best Practices

  • Be specific - Describe exactly what you want
  • Provide context - Mention files and constraints
  • Use git - Work on a branch to review changes
  • Review diffs - Check changes before accepting
  • Iterate - Refine requests if needed
  • Ask questions - Claude explains and debugs
FS

Ready to Code with Claude!

Install, navigate to your project, and start describing what you want to build.

npm install -g @anthropic-ai/claude-code && claude

Learn more at docs.anthropic.com

Navigate S Sidebar F Fullscreen