Skip to content

Latest commit

 

History

History
161 lines (117 loc) · 3.14 KB

File metadata and controls

161 lines (117 loc) · 3.14 KB
title Claude Code Quickstart
category getting-started
target_platform linux
audience ai_agent
keywords
installation
setup
authentication
basic-usage

Quickstart

Installation (Linux)

Package Manager Installation

# Debian/Ubuntu
wget <package-url>.deb
sudo dpkg -i claude-code_*.deb

# Or use npm
npm install -g claude-code

Verification

claude --version
# Expected output: claude version X.X.X

Environment Setup

# Ensure binary is in PATH
which claude
# Expected: /usr/local/bin/claude or /usr/bin/claude

Authentication

# Initial login
claude login

# Verify authentication status
claude status

Authentication Flow:

  1. Command opens browser for OAuth
  2. Auth token stored in ~/.config/claude/auth
  3. Token auto-refreshed on subsequent runs

Basic Usage

# Start interactive session
claude

# Execute single command
claude "Analyze this codebase structure"

# With specific plugin directory
claude --plugin-dir ./my-plugins

Core Capabilities

Code Analysis:

# Query codebase structure
"Analyze authentication implementation"

# Find patterns
"List all database query locations"

Code Modification:

# Direct changes
"Add error handling to src/auth.py"

# Refactoring
"Extract validation logic to separate module"

Command Execution:

/test                    # Run test suite
/build                   # Build project
/commit                  # Create commit with AI message
/plugin list             # List installed plugins

Plugin Management

# List available plugins
/plugin

# Install plugin
/plugin install <name>@<marketplace>

# Load local plugin directory
claude --plugin-dir /path/to/plugin

Configuration

File Locations (Linux)

# User configuration
~/.claude/settings.json

# Plugin cache (installed from marketplaces)
~/.claude/plugins/cache/

# User plugins
~/.claude/plugins/

Environment Variables

export CLAUDE_API_KEY="your-key"    # Optional API key
export DEBUG="claude:*"             # Enable debug logging

Further Reading

Command Reference

# Session management
claude                           # Start interactive session
claude --version                 # Show version
claude --debug                   # Run with debug output
claude diagnose                  # Generate diagnostic report

# Plugin management
claude --plugin-dir <path>       # Load plugins from directory
/plugin list                     # List installed plugins
/plugin install <name>@<market>  # Install plugin
/plugin disable <name>           # Disable plugin

# Built-in commands
/help                            # Show available commands
/test                            # Run tests
/build                           #Build project
/commit                          # Create commit with AI message