Skip to main content

Introduction

Claude Code is an agentic coding tool that runs in your terminal. It understands your codebase and helps you code faster through natural language commands: it can handle routine tasks, explain complex code, and manage Git workflows. This section gets you up and running with AI-powered coding assistance in a few minutes. When you finish, you will know how to use Claude Code for common development tasks. claude code terminal

Claude Code documentation

Installation, usage, commands, and configuration reference

Claude Code GitHub repository

Source code, release binaries, and contribution guide

Prerequisites

Make sure you have: Make sure your terminal environment supports:
Configure environment variables:

Install Claude Code

To install Claude Code, use one of the following methods:

Verify the installation

After installation, run the following command to verify that it succeeded:

Start your first session

Open your terminal in any project directory and start Claude Code:
You will see the Claude Code welcome screen with your session information, recent conversations, and the latest updates. Type /help to see available commands, or type /resume to continue a previous conversation.

Ask your first question

Let’s start by getting to know your codebase. Try one of the following commands:
claude code first question

Basic commands

Here are the most important commands for everyday use: For the full list of commands, see the CLI reference.

Pro tips for beginners

Instead of: “fix the bug”Try: “fix the login bug where users see a blank screen after entering wrong credentials”
Break complex tasks into steps:
Before making changes, let Claude understand your code:
  • Press ? to see all available keyboard shortcuts
  • Use Tab for command completion
  • Press ↑ to see command history
  • Type / to see all slash commands

FAQ

This indicates that Claude Code did not detect the environment variables. Check the following:
  • ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL are set correctly
  • The environment variable values are correct (tokens start with sk-)
  • If you used a persistent configuration, you restarted your terminal
Claude Code checks network status by connecting to Google. Seeing “offline” does not affect normal use; it only means Google could not be reached.
Claude Code needs to call the Claude service for a safety check before accessing a web page. You need to:
  • Maintain a stable international internet connection
  • Use a global proxy if necessary
If you run into an API error:
  • Confirm that ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL are set correctly
  • Check your network connection and make sure you can reach the API endpoint
  • Read the error message and refer to Error handling to troubleshoot
  • If needed, contact the team for help
In interactive mode, type exit or press Ctrl+C twice to exit Claude Code.
One command does it: claude update

Troubleshooting common errors

How do I fix the Extra inputs are not permitted error?

While using Claude Code, you may run into the following error: claude code extra inputs error The error is an API 400: the server returns context_management: Extra inputs are not permitted. Many users report that version 2.1.20 works, but starting with 2.1.22/2.1.23 it fails immediately (any input triggers a 400). What causes this 400? Essentially, the client sent fields (or beta/experimental fields) that the server does not recognize or allow, which causes schema validation to fail. Newer versions of Claude Code include certain context management / beta-related input fields (or the corresponding headers / schema) in requests. But the “backend” you are connected to (commonly an enterprise gateway/proxy, Bedrock/Vertex/Gateway, some relay services, or even an Anthropic API that has been rewritten by a proxy) does not support these fields yet, so it rejects the request under strict schema validation: Extra inputs are not permitted.
Related GitHub issue discussion: https://github.com/anthropics/claude-code/issues/21612
Solution: The official changelog explicitly documents a related fix: In 2.1.27, it mentions “Fixed context management validation error for gateway users”, and notes that setting CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 avoids the error.
Related changelog entry: https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#2127
Recommendations:
    1. Upgrade to version 2.1.27 or later (if you haven’t already)
    1. Set the environment variable CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 to disable experimental beta features