CoolFace
Datasetpublic

ratanon/claude-code

claude-code Dataset Description This dataset contains crawled documentation formatted for LLM training and RAG systems. Dataset Statistics Total Pages: 29 Total Words: 27764 Total Chunks: 29 Source URL: https://docs.anthropic.com/en/docs/claude-code/ Crawled Date: 2025-06-24T09:05:29.246208 Directory Structure llm_ready/ - Plain text files optimized for LLM training jsonl/ - JSONL format for fine-tuning chunks/ - Chunked content… See the full description on the dataset page: https://huggingface.co/datasets/ratanon/claude-code.

sourceHugging Faceupdated 1y agoView on Hugging Face
1likes4.9kdownloads
training_data.jsonl29 linesDownload Raw Back to root
1{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Claude Code on Google Vertex AI - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Deployment Claude Code on Google Vertex AI Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance  Prerequisites Before configuring Claude Code with Vertex AI, ensure you have: A Google Cloud Platform (GCP) account with billing enabled A GCP project with Vertex AI API enabled Access to desired Claude models (e.g., Claude Sonnet 4) Google Cloud SDK ( gcloud ) installed and configured Quota allocated in desired GCP region Vertex AI may not support the Claude Code default models on non- us-east5 regions. Ensure you are using us-east5 and have quota allocated, or switch to supported models.  Setup  1. Enable Vertex AI API Enable the Vertex AI API in your GCP project: gcloud config set project YOUR-PROJECT-ID gcloud services enable aiplatform.googleapis.com  2. Request model access Request access to Claude models in Vertex AI: Navigate to the Vertex AI Model Garden Search for Claude models Request access to desired Claude models (e.g., Claude Sonnet 4) Wait for approval (may take 24-48 hours)  3. Configure GCP credentials Claude Code uses standard Google Cloud authentication. For more information, see Google Cloud authentication documentation .  4. Configure Claude Code Set the following environment variables: export CLAUDE_CODE_USE_VERTEX = 1 export CLOUD_ML_REGION = us-east5 export ANTHROPIC_VERTEX_PROJECT_ID = YOUR-PROJECT-ID export DISABLE_PROMPT_CACHING = 1 For heightened rate limits and prompt caching enablement, contact Google Cloud support. Once enabled, remove the DISABLE_PROMPT_CACHING setting.  5. Model configuration Claude Code uses these default models for Vertex AI: Model type Default value Primary model claude-sonnet-4@20250514 Small/fast model claude-3-5-haiku@20241022 To customize models: export ANTHROPIC_MODEL = 'claude-opus-4@20250514' export ANTHROPIC_SMALL_FAST_MODEL = 'claude-3-5-haiku@20241022'  IAM configuration Grant the required IAM roles for Claude Code. For details, see Vertex IAM documentation . We recommend creating a dedicated GCP project for Claude Code to simplify cost tracking and access control.  Troubleshooting If you encounter quota issues: Check current quotas or request quota increase through Cloud Console If you encounter model not found 404 errors: Verify you have access to the specified region Confirm model is Enabled in Model Garden If you encounter 429 errors: Ensure the primary model and small/fast model are supported in your selected region  Additional resources Vertex AI documentation Vertex AI pricing Vertex AI quotas and limits Was this page helpful? Yes No Amazon Bedrock Corporate proxy On this page Prerequisites Setup 1. Enable Vertex AI API 2. Request model access 3. Configure GCP credentials 4. Configure Claude Code 5. Model configuration IAM configuration Troubleshooting Additional resources"}]}2{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Enterprise deployment overview - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Deployment Enterprise deployment overview Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance This page provides an overview of available deployment options and helps you choose the right configuration for your organization.  Provider comparison Feature Anthropic Amazon Bedrock Google Vertex AI Regions Supported countries Multiple AWS regions Multiple GCP regions Prompt caching Enabled by default Enabled by default Contact Google for enablement Authentication API key AWS credentials (IAM) GCP credentials (OAuth/Service Account) Cost tracking Dashboard AWS Cost Explorer GCP Billing Enterprise features Teams, usage monitoring IAM policies, CloudTrail IAM roles, Cloud Audit Logs  Cloud providers Amazon Bedrock Use Claude models through AWS infrastructure with IAM-based authentication and AWS-native monitoring Google Vertex AI Access Claude models via Google Cloud Platform with enterprise-grade security and compliance  Corporate infrastructure Corporate Proxy Configure Claude Code to work with your organizations proxy servers and SSL/TLS requirements LLM Gateway Deploy centralized model access with usage tracking, budgeting, and audit logging  Configuration overview Claude Code supports flexible configuration options that allow you to combine different providers and infrastructure: Understand the difference between: Corporate proxy : An HTTP/HTTPS proxy for routing traffic (set via HTTPS_PROXY or HTTP_PROXY ) LLM Gateway : A service that handles authentication and provides provider-compatible endpoints (set via ANTHROPIC_BASE_URL , ANTHROPIC_BEDROCK_BASE_URL , or ANTHROPIC_VERTEX_BASE_URL ) Both configurations can be used in tandem.  Using Bedrock with corporate proxy Route Bedrock traffic through a corporate HTTP/HTTPS proxy: export CLAUDE_CODE_USE_BEDROCK = 1 export AWS_REGION = us-east-1 export HTTPS_PROXY = 'https://proxy.example.com:8080'  Using Bedrock with LLM Gateway Use a gateway service that provides Bedrock-compatible endpoints: export CLAUDE_CODE_USE_BEDROCK = 1 export ANTHROPIC_BEDROCK_BASE_URL = 'https://your-llm-gateway.com/bedrock' export CLAUDE_CODE_SKIP_BEDROCK_AUTH = 1  Using Vertex AI with corporate proxy Route Vertex AI traffic through a corporate HTTP/HTTPS proxy: export CLAUDE_CODE_USE_VERTEX = 1 export CLOUD_ML_REGION = us-east5 export ANTHROPIC_VERTEX_PROJECT_ID = your-project-id export HTTPS_PROXY = 'https://proxy.example.com:8080'  Using Vertex AI with LLM Gateway Combine Google Vertex AI models with an LLM gateway for centralized management: export CLAUDE_CODE_USE_VERTEX = 1 export ANTHROPIC_VERTEX_BASE_URL = 'https://your-llm-gateway.com/vertex' export CLAUDE_CODE_SKIP_VERTEX_AUTH = 1  Authentication configuration Claude Code uses the ANTHROPIC_AUTH_TOKEN for both Authorization and Proxy-Authorization headers when needed. The SKIP_AUTH flags ( CLAUDE_CODE_SKIP_BEDROCK_AUTH , CLAUDE_CODE_SKIP_VERTEX_AUTH ) are used in LLM gateway scenarios where the gateway handles provider authentication.  Choosing the right deployment configuration Consider these factors when selecting your deployment approach:  Direct provider access Best for organizations that: Want the simplest setup Have existing AWS or GCP infrastructure Need provider-native monitoring and compliance  Corporate proxy Best for organizations that: Have existing corporate proxy requirements Need traffic monitoring and compliance Must"}]}3{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Claude Code GitHub Actions - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Build with Claude Claude Code GitHub Actions Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance Claude Code GitHub Actions brings AI-powered automation to your GitHub workflow. With a simple @claude mention in any PR or issue, Claude can analyze your code, create pull requests, implement features, and fix bugs - all while following your projects standards. Claude Code GitHub Actions is currently in beta. Features and functionality may evolve as we refine the experience. Claude Code GitHub Actions is built on top of the Claude Code SDK , which enables programmatic integration of Claude Code into your applications. You can use the SDK to build custom automation workflows beyond GitHub Actions.  Why use Claude Code GitHub Actions? Instant PR creation : Describe what you need, and Claude creates a complete PR with all necessary changes Automated code implementation : Turn issues into working code with a single command Follows your standards : Claude respects your CLAUDE.md guidelines and existing code patterns Simple setup : Get started in minutes with our installer and API key Secure by default : Your code stays on Githubs runners  What can Claude do? Claude Code provides powerful GitHub Actions that transform how you work with code:  Claude Code Action This GitHub Action allows you to run Claude Code within your GitHub Actions workflows. You can use this to build any custom workflow on top of Claude Code. View repository   Claude Code Action (Base) The foundation for building custom GitHub workflows with Claude. This extensible framework gives you full access to Claudes capabilities for creating tailored automation. View repository   Setup  Quick setup The easiest way to set up this action is through Claude Code in the terminal. Just open claude and run /install-github-app . This command will guide you through setting up the GitHub app and required secrets. You must be a repository admin to install the GitHub app and add secrets This quickstart method is only available for direct Anthropic API users. If youre using AWS Bedrock or Google Vertex AI, please see the Using with AWS Bedrock & Google Vertex AI section.  Manual setup If the /install-github-app command fails or you prefer manual setup, please follow these manual setup instructions: Install the Claude GitHub app to your repository: https://github.com/apps/claude Add ANTHROPIC_API_KEY to your repository secrets ( Learn how to use secrets in GitHub Actions ) Copy the workflow file from examples/claude.yml into your repositorys .github/workflows/ After completing either the quickstart or manual setup, test the action by tagging @claude in an issue or PR comment!  Example use cases Claude Code GitHub Actions can help you with a variety of tasks. For complete working examples, see the examples directory .  Turn issues into PRs In an issue comment: @claude implement this feature based on the issue description Claude will analyze the issue, write the code, and create a PR for review.  Get implementation help In a PR comment: @claude how should I implement user authentication for this endpoint? Claude will analyze your code and provide specific implementation guidance.  Fix bugs quickly In an issue: @claude fix the TypeError in the user dashboard component Claude will locate the bug, implement a fix, and create a PR.  Best practices  CLAUDE.md configuration Creat"}]}4{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Set up Claude Code - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Getting started Set up Claude Code Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance  System requirements Operating Systems : macOS 10.15+, Ubuntu 20.04+/Debian 10+, or Windows via WSL Hardware : 4GB RAM minimum Software : Node.js 18+ git 2.23+ (optional) GitHub or GitLab CLI for PR workflows (optional) Network : Internet connection required for authentication and AI processing Location : Available only in supported countries  Install and authenticate 1 Install Claude Code Install NodeJS 18+ , then run: npm install -g @anthropic-ai/claude-code Do NOT use sudo npm install -g as this can lead to permission issues and security risks. If you encounter permission errors, see configure Claude Code for recommended solutions. 2 Navigate to your project cd your-project-directory 3 Start Claude Code claude 4 Complete authentication Claude Code offers multiple authentication options: Anthropic Console : The default option. Connect through the Anthropic Console and complete the OAuth process. Requires active billing at console.anthropic.com . Claude App (with Pro or Max plan) : Subscribe to Claudes Pro or Max plan for a unified subscription that includes both Claude Code and the web interface. Get more value at the same price point while managing your account in one place. Log in with your Claude.ai account. During launch, choose the option that matches your subscription type. Enterprise platforms : Configure Claude Code to use Amazon Bedrock or Google Vertex AI for enterprise deployments with your existing cloud infrastructure.  Initialize your project For first-time users, we recommend: 1 Start Claude Code claude 2 Run a simple command > summarize this project 3 Generate a CLAUDE.md project guide /init 4 Commit the generated CLAUDE.md file Ask Claude to commit the generated CLAUDE.md file to your repository.  Troubleshooting  Troubleshooting WSL installation Currently, Claude Code does not run directly in Windows, and instead requires WSL. You might encounter the following issues in WSL: OS/platform detection issues : If you receive an error during installation, WSL may be using Windows npm . Try: Run npm config set os linux before installation Install with npm install -g @anthropic-ai/claude-code --force --no-os-check (Do NOT use sudo ) Node not found errors : If you see exec: node: not found when running claude , your WSL environment may be using a Windows installation of Node.js. You can confirm this with which npm and which node , which should point to Linux paths starting with /usr/ rather than /mnt/c/ . To fix this, try installing Node via your Linux distributions package manager or via nvm .  Optimize your terminal setup Claude Code works best when your terminal is properly configured. Follow these guidelines to optimize your experience. Supported shells : Bash Zsh Fish  Themes and appearance Claude cannot control the theme of your terminal. Thats handled by your terminal application. You can match Claude Codes theme to your terminal during onboarding or any time via the /config command  Line breaks You have several options for entering linebreaks into Claude Code: Quick escape : Type  followed by Enter to create a newline Keyboard shortcut : Press Option+Enter (Meta+Enter) with proper configuration To set up Option+Enter in your terminal: For Mac Terminal.app: Open Settings  Profiles  Keyboard Check Use Option "}]}5{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Troubleshooting - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Build with Claude Troubleshooting Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance  Common installation issues  Linux permission issues When installing Claude Code with npm, you may encounter permission errors if your npm global prefix is not user writable (eg. /usr , or /usr/local ).  Recommended solution: Create a user-writable npm prefix The safest approach is to configure npm to use a directory within your home folder: npm list -g --depth = 0 > ~/npm-global-packages.txt mkdir -p ~/.npm-global npm config set prefix ~/.npm-global echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc source ~/.bashrc npm install -g @anthropic-ai/claude-code This solution is recommended because it: Avoids modifying system directory permissions Creates a clean, dedicated location for your global npm packages Follows security best practices  System Recovery: If you have run commands that change ownership and permissions of system files or similar If youve already run a command that changed system directory permissions (such as sudo chown -R $USER:$(id -gn) /usr && sudo chmod -R u+w /usr ) and your system is now broken (for example, if you see sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set ), youll need to perform recovery steps. Ubuntu/Debian Recovery Method: While rebooting, hold SHIFT to access the GRUB menu Select Advanced options for Ubuntu/Debian Choose the recovery mode option Select Drop to root shell prompt Remount the filesystem as writable: mount -o remount,rw / Fix permissions: chown -R root:root /usr chmod -R 755 /usr chown -R YOUR_USERNAME:YOUR_USERNAME /usr/local chmod u+s /usr/bin/sudo chmod 4755 /usr/bin/sudo chmod u+s /usr/bin/su chmod u+s /usr/bin/passwd chmod u+s /usr/bin/newgrp chmod u+s /usr/bin/gpasswd chmod u+s /usr/bin/chsh chmod u+s /usr/bin/chfn chown root:root /usr/libexec/sudo/sudoers.so chmod 4755 /usr/libexec/sudo/sudoers.so chown root:root /etc/sudo.conf chmod 644 /etc/sudo.conf Reinstall affected packages (optional but recommended): dpkg --get-selections > /tmp/installed_packages.txt awk '{print $1}' /tmp/installed_packages.txt | xargs -r apt-get install --reinstall -y Reboot: reboot Alternative Live USB Recovery Method: If the recovery mode doesnt work, you can use a live USB: Boot from a live USB (Ubuntu, Debian, or any Linux distribution) Find your system partition: lsblk Mount your system partition: sudo mount /dev/sdXY /mnt If you have a separate boot partition, mount it too: sudo mount /dev/sdXZ /mnt/boot Chroot into your system: sudo chroot /mnt sudo arch-chroot /mnt Follow steps 6-8 from the Ubuntu/Debian recovery method above After restoring your system, follow the recommended solution above to set up a user-writable npm prefix.  Auto-updater issues If Claude Code cant update automatically, it may be due to permission issues with your npm global prefix directory. Follow the recommended solution above to fix this. If you prefer to disable the auto-updater instead, you can use: If you prefer to disable the auto-updater instead , you can set the DISABLE_AUTOUPDATER environment variable to 1  Permissions and authentication  Repeated permission prompts If you find yourself repeatedly approving the same commands, you can allow specific tools to run without approval using the /permissions command. See Permissions docs .  Authentication issues If youre experiencing aut"}]}6{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Enterprise deployment overview - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Deployment Enterprise deployment overview Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance This page provides an overview of available deployment options and helps you choose the right configuration for your organization.  Provider comparison Feature Anthropic Amazon Bedrock Google Vertex AI Regions Supported countries Multiple AWS regions Multiple GCP regions Prompt caching Enabled by default Enabled by default Contact Google for enablement Authentication API key AWS credentials (IAM) GCP credentials (OAuth/Service Account) Cost tracking Dashboard AWS Cost Explorer GCP Billing Enterprise features Teams, usage monitoring IAM policies, CloudTrail IAM roles, Cloud Audit Logs  Cloud providers Amazon Bedrock Use Claude models through AWS infrastructure with IAM-based authentication and AWS-native monitoring Google Vertex AI Access Claude models via Google Cloud Platform with enterprise-grade security and compliance  Corporate infrastructure Corporate Proxy Configure Claude Code to work with your organizations proxy servers and SSL/TLS requirements LLM Gateway Deploy centralized model access with usage tracking, budgeting, and audit logging  Configuration overview Claude Code supports flexible configuration options that allow you to combine different providers and infrastructure: Understand the difference between: Corporate proxy : An HTTP/HTTPS proxy for routing traffic (set via HTTPS_PROXY or HTTP_PROXY ) LLM Gateway : A service that handles authentication and provides provider-compatible endpoints (set via ANTHROPIC_BASE_URL , ANTHROPIC_BEDROCK_BASE_URL , or ANTHROPIC_VERTEX_BASE_URL ) Both configurations can be used in tandem.  Using Bedrock with corporate proxy Route Bedrock traffic through a corporate HTTP/HTTPS proxy: export CLAUDE_CODE_USE_BEDROCK = 1 export AWS_REGION = us-east-1 export HTTPS_PROXY = 'https://proxy.example.com:8080'  Using Bedrock with LLM Gateway Use a gateway service that provides Bedrock-compatible endpoints: export CLAUDE_CODE_USE_BEDROCK = 1 export ANTHROPIC_BEDROCK_BASE_URL = 'https://your-llm-gateway.com/bedrock' export CLAUDE_CODE_SKIP_BEDROCK_AUTH = 1  Using Vertex AI with corporate proxy Route Vertex AI traffic through a corporate HTTP/HTTPS proxy: export CLAUDE_CODE_USE_VERTEX = 1 export CLOUD_ML_REGION = us-east5 export ANTHROPIC_VERTEX_PROJECT_ID = your-project-id export HTTPS_PROXY = 'https://proxy.example.com:8080'  Using Vertex AI with LLM Gateway Combine Google Vertex AI models with an LLM gateway for centralized management: export CLAUDE_CODE_USE_VERTEX = 1 export ANTHROPIC_VERTEX_BASE_URL = 'https://your-llm-gateway.com/vertex' export CLAUDE_CODE_SKIP_VERTEX_AUTH = 1  Authentication configuration Claude Code uses the ANTHROPIC_AUTH_TOKEN for both Authorization and Proxy-Authorization headers when needed. The SKIP_AUTH flags ( CLAUDE_CODE_SKIP_BEDROCK_AUTH , CLAUDE_CODE_SKIP_VERTEX_AUTH ) are used in LLM gateway scenarios where the gateway handles provider authentication.  Choosing the right deployment configuration Consider these factors when selecting your deployment approach:  Direct provider access Best for organizations that: Want the simplest setup Have existing AWS or GCP infrastructure Need provider-native monitoring and compliance  Corporate proxy Best for organizations that: Have existing corporate proxy requirements Need traffic monitoring and compliance Must"}]}7{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Slash commands - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Reference Slash commands Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance  Built-in slash commands Command Purpose /add-dir Add additional working directories /bug Report bugs (sends conversation to Anthropic) /clear Clear conversation history /compact [instructions] Compact conversation with optional focus instructions /config View/modify configuration /cost Show token usage statistics /doctor Checks the health of your Claude Code installation /help Get usage help /init Initialize project with CLAUDE.md guide /login Switch Anthropic accounts /logout Sign out from your Anthropic account /mcp Manage MCP server connections and OAuth authentication /memory Edit CLAUDE.md memory files /model Select or change the AI model /permissions View or update permissions /pr_comments View pull request comments /review Request code review /status View account and system statuses /terminal-setup Install Shift+Enter key binding for newlines (iTerm2 and VSCode only) /vim Enter vim mode for alternating insert and command modes  Custom slash commands Custom slash commands allow you to define frequently-used prompts as Markdown files that Claude Code can execute. Commands are organized by scope (project-specific or personal) and support namespacing through directory structures.  Syntax /<prefix>:<command-name> [arguments]  Parameters Parameter Description <prefix> Command scope ( project for project-specific, user for personal) <command-name> Name derived from the Markdown filename (without .md extension) [arguments] Optional arguments passed to the command  Command types  Project commands Commands stored in your repository and shared with your team. Location : .claude/commands/ Prefix : /project: In the following example, we create the /project:optimize command: mkdir -p .claude/commands echo \"Analyze this code for performance issues and suggest optimizations:\" > .claude/commands/optimize.md  Personal commands Commands available across all your projects. Location : ~/.claude/commands/ Prefix : /user: In the following example, we create the /user:security-review command: mkdir -p ~/.claude/commands echo \"Review this code for security vulnerabilities:\" > ~/.claude/commands/security-review.md  Features  Namespacing Organize commands in subdirectories to create namespaced commands. Structure : <prefix>:<namespace>:<command> For example, a file at .claude/commands/frontend/component.md creates the command /project:frontend:component  Arguments Pass dynamic values to commands using the $ARGUMENTS placeholder. For example: echo \"Fix issue # $ARGUMENTS following our coding standards\" > .claude/commands/fix-issue.md > /project:fix-issue 123  Bash command execution Execute bash commands before the slash command runs using the ! prefix. The output is included in the command context. For example: --- allowed-tools: Bash(git add: * ), Bash(git status: * ), Bash(git commit:*) description: Create a git commit --- ## Context - Current git status: ! `git status` - Current git diff (staged and unstaged changes): ! `git diff HEAD` - Current branch: ! `git branch --show-current` - Recent commits: ! `git log --oneline -10` ## Your task Based on the above changes, create a single git commit.  File references Include file contents in commands using the @ prefix to reference files . For example: # Reference a specific file Review the implementation in "}]}8{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Claude Code on Amazon Bedrock - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Deployment Claude Code on Amazon Bedrock Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance  Prerequisites Before configuring Claude Code with Bedrock, ensure you have: An AWS account with Bedrock access enabled Access to desired Claude models (e.g., Claude Sonnet 4) in Bedrock AWS CLI installed and configured (optional - only needed if you dont have another mechanism for getting credentials) Appropriate IAM permissions  Setup  1. Enable model access First, ensure you have access to the required Claude models in your AWS account: Navigate to the Amazon Bedrock console Go to Model access in the left navigation Request access to desired Claude models (e.g., Claude Sonnet 4) Wait for approval (usually instant for most regions)  2. Configure AWS credentials Claude Code uses the default AWS SDK credential chain. Set up your credentials using one of these methods: Claude Code does not currently support dynamic credential management (such as automatically calling aws sts assume-role ). You will need to run aws configure , aws sso login , or set the AWS_ environment variables yourself. Option A: AWS CLI configuration aws configure Option B: Environment variables (access key) export AWS_ACCESS_KEY_ID = your-access-key-id export AWS_SECRET_ACCESS_KEY = your-secret-access-key export AWS_SESSION_TOKEN = your-session-token Option C: Environment variables (SSO profile) aws sso login --profile = < your-profile-name > export AWS_PROFILE = your-profile-name  3. Configure Claude Code Set the following environment variables to enable Bedrock: export CLAUDE_CODE_USE_BEDROCK = 1 export AWS_REGION = us-east-1 AWS_REGION is a required environment variable. Claude Code does not read from the .aws config file for this setting.  4. Model configuration Claude Code uses these default models for Bedrock: Model type Default value Primary model us.anthropic.claude-3-7-sonnet-20250219-v1:0 Small/fast model us.anthropic.claude-3-5-haiku-20241022-v1:0 To customize models, use one of these methods: export ANTHROPIC_MODEL = 'us.anthropic.claude-opus-4-20250514-v1:0' export ANTHROPIC_SMALL_FAST_MODEL = 'us.anthropic.claude-3-5-haiku-20241022-v1:0' export ANTHROPIC_MODEL = 'arn:aws:bedrock:us-east-2:your-account-id:application-inference-profile/your-model-id'  IAM configuration Create an IAM policy with the required permissions for Claude Code. For details, see Bedrock IAM documentation . We recommend creating a dedicated AWS account for Claude Code to simplify cost tracking and access control.  Troubleshooting If you encounter region issues: Check model availability: aws bedrock list-inference-profiles --region your-region Switch to a supported region: export AWS_REGION=us-east-1 Consider using inference profiles for cross-region access If you receive an error on-demand throughput isnt supported: Specify the model as an inference profile ID  Additional resources Bedrock documentation Bedrock pricing Bedrock inference profiles Claude Code on Amazon Bedrock: Quick Setup Guide Was this page helpful? Yes No Overview Google Vertex AI On this page Prerequisites Setup 1. Enable model access 2. Configure AWS credentials 3. Configure Claude Code 4. Model configuration IAM configuration Troubleshooting Additional resources"}]}9{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Manage Claude's memory - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Getting started Manage Claude's memory Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance Claude Code can remember your preferences across sessions, like style guidelines and common commands in your workflow.  Determine memory type Claude Code offers three memory locations, each serving a different purpose: Memory Type Location Purpose Use Case Examples Project memory ./CLAUDE.md Team-shared instructions for the project Project architecture, coding standards, common workflows User memory ~/.claude/CLAUDE.md Personal preferences for all projects Code styling preferences, personal tooling shortcuts Project memory (local) ./CLAUDE.local.md Personal project-specific preferences (Deprecated, see below) Your sandbox URLs, preferred test data All memory files are automatically loaded into Claude Codes context when launched.  CLAUDE.md imports CLAUDE.md files can import additional files using @path/to/import syntax. The following example imports 3 files: See @README for project overview and @package.json for available npm commands for this project. # Additional Instructions - git workflow @docs/git-instructions.md Both relative and absolute paths are allowed. In particular, importing files in users home dir is a convenient way for your team members to provide individual instructions that are not checked into the repository. Previously CLAUDE.local.md served a similar purpose, but is now deprecated in favor of imports since they work better across multiple git worktrees. # Individual Preferences - @~/.claude/my-project-instructions.md To avoid potential collisions, imports are not evaluated inside markdown code spans and code blocks. This code span will not be treated as an import: `@anthropic-ai/claude-code` Imported files can recursively import additional files, with a max-depth of 5 hops. You can see what memory files are loaded by running /memory command.  How Claude looks up memories Claude Code reads memories recursively: starting in the cwd, Claude Code recurses up to (but not including) the root directory / and reads any CLAUDE.md or CLAUDE.local.md files it finds. This is especially convenient when working in large repositories where you run Claude Code in foo/bar/ , and have memories in both foo/CLAUDE.md and foo/bar/CLAUDE.md . Claude will also discover CLAUDE.md nested in subtrees under your current working directory. Instead of loading them at launch, they are only included when Claude reads files in those subtrees.  Quickly add memories with the # shortcut The fastest way to add a memory is to start your input with the # character: # Always use descriptive variable names Youll be prompted to select which memory file to store this in.  Directly edit memories with /memory Use the /memory slash command during a session to open any memory file in your system editor for more extensive additions or organization.  Set up project memory Suppose you want to set up a CLAUDE.md file to store important project information, conventions, and frequently used commands. Bootstrap a CLAUDE.md for your codebase with the following command: > /init Tips: Include frequently used commands (build, test, lint) to avoid repeated searches Document code style preferences and naming conventions Add important architectural patterns specific to your project CLAUDE.md memories can be used for both instructions shared with your team and "}]}10{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Interactive mode - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Reference Interactive mode Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance  Keyboard shortcuts  General controls Shortcut Description Context Ctrl+C Cancel current input or generation Standard interrupt Ctrl+D Exit Claude Code session EOF signal Ctrl+L Clear terminal screen Keeps conversation history Up/Down arrows Navigate command history Recall previous inputs Esc + Esc Edit previous message Double-escape to modify  Multiline input Method Shortcut Context Quick escape  + Enter Works in all terminals macOS default Option+Enter Default on macOS Terminal setup Shift+Enter After /terminal-setup Paste mode Paste directly For code blocks, logs  Quick commands Shortcut Description Notes # at start Memory shortcut - add to CLAUDE.md Prompts for file selection / at start Slash command See slash commands  Vim mode Enable vim-style editing with /vim command or configure permanently via /config .  Mode switching Command Action From mode Esc Enter NORMAL mode INSERT i Insert before cursor NORMAL I Insert at beginning of line NORMAL a Insert after cursor NORMAL A Insert at end of line NORMAL o Open line below NORMAL O Open line above NORMAL  Navigation (NORMAL mode) Command Action h / j / k / l Move left/down/up/right w Next word e End of word b Previous word 0 Beginning of line $ End of line  First non-blank character gg Beginning of input G End of input  Editing (NORMAL mode) Command Action x Delete character dd Delete line D Delete to end of line dw / de / db Delete word/to end/back cc Change line C Change to end of line cw / ce / cb Change word/to end/back . Repeat last change Configure your preferred line break behavior in terminal settings. Run /terminal-setup to install Shift+Enter binding for iTerm2 and VSCode terminals.  Command history Claude Code maintains command history for the current session: History is stored per working directory Cleared with /clear command Use Up/Down arrows to navigate (see keyboard shortcuts above) Ctrl+R : Reverse search through history (if supported by terminal) Note : History expansion ( ! ) is disabled by default  See also Slash commands - Interactive session commands CLI reference - Command-line flags and options Settings - Configuration options Memory management - Managing CLAUDE.md files Was this page helpful? Yes No CLI reference Slash commands On this page Keyboard shortcuts General controls Multiline input Quick commands Vim mode Mode switching Navigation (NORMAL mode) Editing (NORMAL mode) Command history See also"}]}11{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Security - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Administration Security Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance  How we approach security  Security foundation Your codes security is paramount. Claude Code is built with security at its core, developed according to Anthropics comprehensive security program. Learn more and access resources (SOC 2 Type 2 report, ISO 27001 certificate, etc.) at Anthropic Trust Center .  Permission-based architecture Claude Code uses strict read-only permissions by default. When additional actions are needed (editing files, running tests, executing commands), Claude Code requests explicit permission. Users control whether to approve actions once or allow them automatically. We designed Claude Code to be transparent and secure. For example, we require approval for git commands before executing them, giving you direct control. This approach enables users and organizations to configure permissions directly. For detailed permission configuration, see Identity and Access Management .  Built-in protections To mitigate risks in agentic systems: Folder access restriction : Claude Code can only access the folder where it was started and its subfoldersit cannot go upstream to parent directories. This creates a clear security boundary, ensuring Claude Code only operates within the intended project scope Prompt fatigue mitigation : Support for allowlisting frequently used safe commands per-user, per-codebase, or per-organization Accept Edits mode : Batch accept multiple edits while maintaining permission prompts for commands with side effects  User responsibility Claude Code only has the permissions you grant it. Youre responsible for reviewing proposed code and commands for safety before approval.  Protect against prompt injection Prompt injection is a technique where an attacker attempts to override or manipulate an AI assistants instructions by inserting malicious text. Claude Code includes several safeguards against these attacks:  Core protections Permission system : Sensitive operations require explicit approval Context-aware analysis : Detects potentially harmful instructions by analyzing the full request Input sanitization : Prevents command injection by processing user inputs Command blocklist : Blocks risky commands that fetch arbitrary content from the web like curl and wget  Additional safeguards Network request approval : Tools that make network requests require user approval by default Isolated context windows : Web fetch uses a separate context window to avoid injecting potentially malicious prompts Trust verification : First-time codebase runs and new MCP servers require trust verification Command injection detection : Suspicious bash commands require manual approval even if previously allowlisted Fail-closed matching : Unmatched commands default to requiring manual approval Natural language descriptions : Complex bash commands include explanations for user understanding Best practices for working with untrusted content : Review suggested commands before approval Avoid piping untrusted content directly to Claude Verify proposed changes to critical files Use virtual machines (VMs) to run scripts and make tool calls, especially when interacting with external web services Report suspicious behavior with /bug While these protections significantly reduce risk, no system is completely immune to all attacks. Always mainta"}]}12{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Data usage - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Resources Data usage Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance  Data policies  Data training policy By default, Anthropic does not train generative models using code or prompts that are sent to Claude Code. We aim to be fully transparent about how we use your data. We may use feedback to improve our products and services, but we will not train generative models using your feedback from Claude Code.  Development Partner Program If you explicitly opt in to methods to provide us with materials to train on, such as via the Development Partner Program , we may use those materials provided to train our models. An organization admin can expressly opt-in to the Development Partner Program for their organization. Note that this program is available only for Anthropic first-party API, and not for Bedrock or Vertex users.  Feedback transcripts If you choose to send us feedback about Claude Code, such as transcripts of your usage, Anthropic may use that feedback to debug related issues and improve Claude Codes functionality (e.g., to reduce the risk of similar bugs occurring in the future). We will not train generative models using this feedback. Given their potentially sensitive nature, we store user feedback transcripts for only 30 days.  Data retention You can use an API key from a zero data retention organization. When doing so, Claude Code will not retain your chat transcripts on our servers. Users local Claude Code clients may store sessions locally for up to 30 days so that users can resume them. This behavior is configurable.  Privacy safeguards We have implemented several safeguards to protect your data, including: Limited retention periods for sensitive information Restricted access to user session data Clear policies against using feedback for model training For full details, please review our Commercial Terms of Service and Privacy Policy .  Data flow and dependencies Claude Code is installed from NPM . Claude Code runs locally. In order to interact with the LLM, Claude Code sends data over the network. This data includes all user prompts and model outputs. The data is encrypted in transit via TLS and is not encrypted at rest. Claude Code is compatible with most popular VPNs and LLM proxies. Claude Code is built on Anthropics APIs. For details regarding our APIs security controls, including our API logging procedures, please refer to compliance artifacts offered in the Anthropic Trust Center .  Telemetry services Claude Code connects from users machines to the Statsig service to log operational metrics such as latency, reliability, and usage patterns. This logging does not include any code or file paths. Data is encrypted in transit using TLS and at rest using 256-bit AES encryption. Read more in the Statsig security documentation . To opt out of Statsig telemetry, set the DISABLE_TELEMETRY environment variable. Claude Code connects from users machines to Sentry for operational error logging. The data is encrypted in transit using TLS and at rest using 256-bit AES encryption. Read more in the Sentry security documentation . To opt out of error logging, set the DISABLE_ERROR_REPORTING environment variable. When users run the /bug command, a copy of their full conversation history including code is sent to Anthropic. The data is encrypted in transit and at rest. Optionally, a Github issue is created in "}]}13{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Claude Code overview - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Getting started Claude Code overview Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance By integrating directly with your development environment, Claude Code streamlines your workflow without requiring additional servers or complex setup.  Basic usage To install Claude Code, use NPM: npm install -g @anthropic-ai/claude-code For more detailed installation instructions, see Set up Claude Code . To run Claude Code, simply call the claude CLI: claude You can then prompt Claude directly from the interactive Claude Code REPL session. For more usage instructions, see Quickstart .  Why Claude Code?  Accelerate development Use Claude Code to accelerate development with the following key capabilities: Editing files and fixing bugs across your codebase Answering questions about your codes architecture and logic Executing and fixing tests, linting, and other commands Searching through git history, resolving merge conflicts, and creating commits and PRs Browsing documentation and resources from the internet using web search  Security and privacy by design Your codes security is paramount. Claude Codes architecture ensures: Direct API connection : Your queries go straight to Anthropics API without intermediate servers Works where you work : Operates directly in your terminal Understands context : Maintains awareness of your entire project structure Takes action : Performs real operations like editing files and creating commits  Enterprise integration Claude Code seamlessly integrates with enterprise AI platforms. You can connect to Amazon Bedrock or Google Vertex AI for secure, compliant deployments that meet your organizations requirements.  Next steps Setup Install and authenticate Claude Code Quickstart See Claude Code in action with practical examples Commands Learn about CLI commands and controls Configuration Customize Claude Code for your workflow  Additional resources Common workflows Step-by-step guides for common workflows Troubleshooting Solutions for common issues with Claude Code Bedrock & Vertex integrations Configure Claude Code with Amazon Bedrock or Google Vertex AI Reference implementation Clone our development container reference implementation. Was this page helpful? Yes No Set up On this page Basic usage Why Claude Code? Accelerate development Security and privacy by design Enterprise integration Next steps Additional resources"}]}14{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Manage costs effectively - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Administration Manage costs effectively Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance Claude Code consumes tokens for each interaction. The average cost is $6 per developer per day, with daily costs remaining below $12 for 90% of users. For team usage, Claude Code charges by API token consumption. On average, Claude Code costs ~$50-60/developer per month with Sonnet 4 though there is large variance depending on how many instances users are running and whether theyre using it in automation.  Track your costs Use /cost to see current session usage Anthropic Console users : Check historical usage in the Anthropic Console (requires Admin or Billing role) Set workspace spend limits for the Claude Code workspace (requires Admin role) Pro and Max plan users : Usage is included in your subscription  Managing costs for teams When using Anthropic API, you can limit the total Claude Code workspace spend. To configure, follow these instructions . Admins can view cost and usage reporting by following these instructions . On Bedrock and Vertex, Claude Code does not send metrics from your cloud. In order to get cost metrics, several large enterprises reported using LiteLLM , which is an open-source tool that helps companies track spend by key . This project is unaffiliated with Anthropic and we have not audited its security.  Reduce token usage Compact conversations: Claude uses auto-compact by default when context exceeds 95% capacity Toggle auto-compact: Run /config and navigate to Auto-compact enabled Use /compact manually when context gets large Add custom instructions: /compact Focus on code samples and API usage Customize compaction by adding to CLAUDE.md: # Summary instructions When you are using compact, please focus on test output and code changes Write specific queries: Avoid vague requests that trigger unnecessary scanning Break down complex tasks: Split large tasks into focused interactions Clear history between tasks: Use /clear to reset context Costs can vary significantly based on: Size of codebase being analyzed Complexity of queries Number of files being searched or modified Length of conversation history Frequency of compacting conversations Background processes (haiku generation, conversation summarization)  Background token usage Claude Code uses tokens for some background functionality even when idle: Haiku generation : Small creative messages that appear while you type (approximately 1 cent per day) Conversation summarization : Background jobs that summarize previous conversations for the claude --resume feature Command processing : Some commands like /cost may generate requests to check status These background processes consume a small amount of tokens (typically under $0.04 per session) even without active interaction. For team deployments, we recommend starting with a small pilot group to establish usage patterns before wider rollout. Was this page helpful? Yes No Monitoring CLI reference On this page Track your costs Managing costs for teams Reduce token usage Background token usage"}]}15{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Common workflows - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Getting started Common workflows Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance Each task in this document includes clear instructions, example commands, and best practices to help you get the most from Claude Code.  Understand new codebases  Get a quick codebase overview Suppose youve just joined a new project and need to understand its structure quickly. 1 Navigate to the project root directory cd /path/to/project 2 Start Claude Code claude 3 Ask for a high-level overview > give me an overview of this codebase 4 Dive deeper into specific components > explain the main architecture patterns used here > what are the key data models? > how is authentication handled? Tips: Start with broad questions, then narrow down to specific areas Ask about coding conventions and patterns used in the project Request a glossary of project-specific terms  Find relevant code Suppose you need to locate code related to a specific feature or functionality. 1 Ask Claude to find relevant files > find the files that handle user authentication 2 Get context on how components interact > how do these authentication files work together? 3 Understand the execution flow > trace the login process from front-end to database Tips: Be specific about what youre looking for Use domain language from the project  Fix bugs efficiently Suppose youve encountered an error message and need to find and fix its source. 1 Share the error with Claude > I'm seeing an error when I run npm test 2 Ask for fix recommendations > suggest a few ways to fix the @ts-ignore in user.ts 3 Apply the fix > update user.ts to add the null check you suggested Tips: Tell Claude the command to reproduce the issue and get a stack trace Mention any steps to reproduce the error Let Claude know if the error is intermittent or consistent  Refactor code Suppose you need to update old code to use modern patterns and practices. 1 Identify legacy code for refactoring > find deprecated API usage in our codebase 2 Get refactoring recommendations > suggest how to refactor utils.js to use modern JavaScript features 3 Apply the changes safely > refactor utils.js to use ES2024 features while maintaining the same behavior 4 Verify the refactoring > run tests for the refactored code Tips: Ask Claude to explain the benefits of the modern approach Request that changes maintain backward compatibility when needed Do refactoring in small, testable increments  Work with tests Suppose you need to add tests for uncovered code. 1 Identify untested code > find functions in NotificationsService.swift that are not covered by tests 2 Generate test scaffolding > add tests for the notification service 3 Add meaningful test cases > add test cases for edge conditions in the notification service 4 Run and verify tests > run the new tests and fix any failures Tips: Ask for tests that cover edge cases and error conditions Request both unit and integration tests when appropriate Have Claude explain the testing strategy  Create pull requests Suppose you need to create a well-documented pull request for your changes. 1 Summarize your changes > summarize the changes I've made to the authentication module 2 Generate a PR with Claude > create a pr 3 Review and refine > enhance the PR description with more context about the security improvements 4 Add testing details > add information about how these changes were te"}]}16{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Monitoring - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Administration Monitoring Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance Claude Code supports OpenTelemetry (OTel) metrics and events for monitoring and observability. All metrics are time series data exported via OpenTelemetrys standard metrics protocol, and events are exported via OpenTelemetrys logs/events protocol. It is the users responsibility to ensure their metrics and logs backends are properly configured and that the aggregation granularity meets their monitoring requirements. OpenTelemetry support is currently in beta and details are subject to change.  Quick Start Configure OpenTelemetry using environment variables: export CLAUDE_CODE_ENABLE_TELEMETRY = 1 export OTEL_METRICS_EXPORTER = otlp export OTEL_LOGS_EXPORTER = otlp export OTEL_EXPORTER_OTLP_PROTOCOL = grpc export OTEL_EXPORTER_OTLP_ENDPOINT = http://localhost:4317 export OTEL_EXPORTER_OTLP_HEADERS = \"Authorization=Bearer your-token\" export OTEL_METRIC_EXPORT_INTERVAL = 10000 export OTEL_LOGS_EXPORT_INTERVAL = 5000 claude The default export intervals are 60 seconds for metrics and 5 seconds for logs. During setup, you may want to use shorter intervals for debugging purposes. Remember to reset these for production use. For full configuration options, see the OpenTelemetry specification .  Administrator Configuration Administrators can configure OpenTelemetry settings for all users through the managed settings file. This allows for centralized control of telemetry settings across an organization. See the settings precedence for more information about how settings are applied. The managed settings file is located at: macOS: /Library/Application Support/ClaudeCode/managed-settings.json Linux: /etc/claude-code/managed-settings.json Example managed settings configuration: { \"env\" : { \"CLAUDE_CODE_ENABLE_TELEMETRY\" : \"1\" , \"OTEL_METRICS_EXPORTER\" : \"otlp\" , \"OTEL_LOGS_EXPORTER\" : \"otlp\" , \"OTEL_EXPORTER_OTLP_PROTOCOL\" : \"grpc\" , \"OTEL_EXPORTER_OTLP_ENDPOINT\" : \"http://collector.company.com:4317\" , \"OTEL_EXPORTER_OTLP_HEADERS\" : \"Authorization=Bearer company-token\" } } Managed settings can be distributed via MDM (Mobile Device Management) or other device management solutions. Environment variables defined in the managed settings file have high precedence and cannot be overridden by users.  Configuration Details  Common Configuration Variables Environment Variable Description Example Values CLAUDE_CODE_ENABLE_TELEMETRY Enables telemetry collection (required) 1 OTEL_METRICS_EXPORTER Metrics exporter type(s) (comma-separated) console , otlp , prometheus OTEL_LOGS_EXPORTER Logs/events exporter type(s) (comma-separated) console , otlp OTEL_EXPORTER_OTLP_PROTOCOL Protocol for OTLP exporter (all signals) grpc , http/json , http/protobuf OTEL_EXPORTER_OTLP_ENDPOINT OTLP collector endpoint (all signals) http://localhost:4317 OTEL_EXPORTER_OTLP_METRICS_PROTOCOL Protocol for metrics (overrides general) grpc , http/json , http/protobuf OTEL_EXPORTER_OTLP_METRICS_ENDPOINT OTLP metrics endpoint (overrides general) http://localhost:4318/v1/metrics OTEL_EXPORTER_OTLP_LOGS_PROTOCOL Protocol for logs (overrides general) grpc , http/json , http/protobuf OTEL_EXPORTER_OTLP_LOGS_ENDPOINT OTLP logs endpoint (overrides general) http://localhost:4318/v1/logs OTEL_EXPORTER_OTLP_HEADERS Authentication headers for OTLP Authorization=Bearer token OTEL_EXPORTER_OTLP_METRICS"}]}17{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Claude Code SDK - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Build with Claude Claude Code SDK Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance The Claude Code SDK enables running Claude Code as a subprocess, providing a way to build AI-powered coding assistants and tools that leverage Claudes capabilities. The SDK is available for command line, TypeScript, and Python usage.  Authentication To use the Claude Code SDK, we recommend creating a dedicated API key: Create an Anthropic API key in the Anthropic Console Then, set the ANTHROPIC_API_KEY environment variable. We recommend storing this key securely (eg. using a Github secret )  Basic SDK usage The Claude Code SDK allows you to use Claude Code in non-interactive mode from your applications.  Command line Here are a few basic examples for the command line SDK: $ claude -p \"Write a function to calculate Fibonacci numbers\" $ echo \"Explain this code\" | claude -p $ claude -p \"Generate a hello world function\" --output-format json $ claude -p \"Build a React component\" --output-format stream-json  TypeScript The TypeScript SDK is included in the main @anthropic-ai/claude-code package on NPM: import { query , type SDKMessage } from \"@anthropic-ai/claude-code\" ; const messages : SDKMessage [ ] = [ ] ; for await ( const message of query ( { prompt : \"Write a haiku about foo.py\" , abortController : new AbortController ( ) , options : { maxTurns : 3 , } , } ) ) { messages . push ( message ) ; } console . log ( messages ) ; The TypeScript SDK accepts all arguments supported by the command line SDK, as well as: Argument Description Default abortController Abort controller new AbortController() cwd Current working directory process.cwd() executable Which JavaScript runtime to use node when running with Node.js, bun when running with Bun executableArgs Arguments to pass to the executable [] pathToClaudeCodeExecutable Path to the Claude Code executable Executable that ships with @anthropic-ai/claude-code  Python The Python SDK is available as claude-code-sdk on PyPI: pip install claude-code-sdk Prerequisites: Python 3.10+ Node.js Claude Code CLI: npm install -g @anthropic-ai/claude-code Basic usage: import anyio from claude_code_sdk import query , ClaudeCodeOptions , Message async def main ( ) : messages : list [ Message ] = [ ] async for message in query ( prompt = \"Write a haiku about foo.py\" , options = ClaudeCodeOptions ( max_turns = 3 ) ) : messages . append ( message ) print ( messages ) anyio . run ( main ) The Python SDK accepts all arguments supported by the command line SDK through the ClaudeCodeOptions class: from claude_code_sdk import query , ClaudeCodeOptions from pathlib import Path options = ClaudeCodeOptions ( max_turns = 3 , system_prompt = \"You are a helpful assistant\" , cwd = Path ( \"/path/to/project\" ) , allowed_tools = [ \"Read\" , \"Write\" , \"Bash\" ] , permission_mode = \"acceptEdits\" ) async for message in query ( prompt = \"Hello\" , options = options ) : print ( message )  Advanced usage The documentation below uses the command line SDK as an example, but can also be used with the TypeScript and Python SDKs.  Multi-turn conversations For multi-turn conversations, you can resume conversations or continue from the most recent session: $ claude --continue $ claude --continue \"Now refactor this for better performance\" $ claude --resume 550e8400-e29b-41d4-a716-446655440000 $ claude -p --resume 550e8400-e29b-41d4-a716"}]}18{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Corporate proxy configuration - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Deployment Corporate proxy configuration Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance Claude Code supports standard HTTP/HTTPS proxy configurations through environment variables. This allows you to route all Claude Code traffic through your organizations proxy servers for security, compliance, and monitoring purposes.  Basic proxy configuration  Environment variables Claude Code respects standard proxy environment variables: export HTTPS_PROXY = https://proxy.example.com:8080 export HTTP_PROXY = http://proxy.example.com:8080 Claude Code currently does not support the NO_PROXY environment variable. All traffic will be routed through the configured proxy. Claude Code does not support SOCKS proxies.  Authentication  Basic authentication If your proxy requires basic authentication, include credentials in the proxy URL: export HTTPS_PROXY = http://username:password@proxy.example.com:8080 Avoid hardcoding passwords in scripts. Use environment variables or secure credential storage instead. For proxies requiring advanced authentication (NTLM, Kerberos, etc.), consider using an LLM Gateway service that supports your authentication method.  SSL certificate issues If your proxy uses custom SSL certificates, you may encounter certificate errors. Ensure that you set the correct certificate bundle path: export SSL_CERT_FILE = /path/to/certificate-bundle.crt export NODE_EXTRA_CA_CERTS = /path/to/certificate-bundle.crt  Network access requirements Claude Code requires access to the following URLs: api.anthropic.com - Claude API endpoints statsig.anthropic.com - Telemetry and metrics sentry.io - Error reporting Ensure these URLs are allowlisted in your proxy configuration and firewall rules. This is especially important when using Claude Code in containerized or restricted network environments.  Additional resources Claude Code settings Environment variables reference Troubleshooting guide Was this page helpful? Yes No Google Vertex AI LLM gateway On this page Basic proxy configuration Environment variables Authentication Basic authentication SSL certificate issues Network access requirements Additional resources"}]}19{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Model Context Protocol (MCP) - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Build with Claude Model Context Protocol (MCP) Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance Model Context Protocol (MCP) is an open protocol that enables LLMs to access external tools and data sources. For more details about MCP, see the MCP documentation . Use third party MCP servers at your own risk. Make sure you trust the MCP servers, and be especially careful when using MCP servers that talk to the internet, as these can expose you to prompt injection risk.  Configure MCP servers 1 Add an MCP stdio Server claude mcp add < name > < command > [ args .. . ] claude mcp add my-server -e API_KEY = 123 -- /path/to/server arg1 arg2 2 Add an MCP SSE Server claude mcp add --transport sse < name > < url > claude mcp add --transport sse sse-server https://example.com/sse-endpoint claude mcp add --transport sse api-server https://api.example.com/mcp --header \"X-API-Key: your-key\" 3 Add an MCP HTTP Server claude mcp add --transport http < name > < url > claude mcp add --transport http http-server https://example.com/mcp claude mcp add --transport http secure-server https://api.example.com/mcp --header \"Authorization: Bearer your-token\" 4 Manage your MCP servers claude mcp list claude mcp get my-server claude mcp remove my-server Tips: Use the -s or --scope flag to specify where the configuration is stored: local (default): Available only to you in the current project (was called project in older versions) project : Shared with everyone in the project via .mcp.json file user : Available to you across all projects (was called global in older versions) Set environment variables with -e or --env flags (e.g., -e KEY=value ) Configure MCP server startup timeout using the MCP_TIMEOUT environment variable (e.g., MCP_TIMEOUT=10000 claude sets a 10-second timeout) Check MCP server status any time using the /mcp command within Claude Code MCP follows a client-server architecture where Claude Code (the client) can connect to multiple specialized servers Claude Code supports SSE (Server-Sent Events) and streamable HTTP servers for real-time communication Use /mcp to authenticate with remote servers that require OAuth 2.0 authentication  Understanding MCP server scopes MCP servers can be configured at three different scope levels, each serving distinct purposes for managing server accessibility and sharing. Understanding these scopes helps you determine the best way to configure servers for your specific needs.  Scope hierarchy and precedence MCP server configurations follow a clear precedence hierarchy. When servers with the same name exist at multiple scopes, the system resolves conflicts by prioritizing local-scoped servers first, followed by project-scoped servers, and finally user-scoped servers. This design ensures that personal configurations can override shared ones when needed.  Local scope Local-scoped servers represent the default configuration level and are stored in your project-specific user settings. These servers remain private to you and are only accessible when working within the current project directory. This scope is ideal for personal development servers, experimental configurations, or servers containing sensitive credentials that shouldnt be shared. claude mcp add my-private-server /path/to/server claude mcp add my-private-server -s local /path/to/server  Project scope Project-scoped servers enable team"}]}20{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Legal and compliance - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Resources Legal and compliance Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance  Legal agreements  License Claude Code is provided under Anthropics Commercial Terms of Service .  Commercial agreements Whether youre using Anthropics API directly (1P) or accessing it through AWS Bedrock or Google Vertex (3P), your existing commercial agreement will apply to Claude Code usage, unless weve mutually agreed otherwise.  Compliance  Healthcare compliance (BAA) If a customer has a Business Associate Agreement (BAA) with us, and wants to use Claude Code, the BAA will automatically extend to cover Claude Code if the customer has executed a BAA and has Zero Data Retention (ZDR) activated. The BAA will be applicable to that customers API traffic flowing through Claude Code.  Security and trust  Trust and safety You can find more information in the Anthropic Trust Center and Transparency Hub .  Security vulnerability reporting Anthropic manages our security program through HackerOne. Use this form to report vulnerabilities .  Anthropic PBC. All rights reserved. Use is subject to Anthropics Commercial Terms of Service . Was this page helpful? Yes No Data usage On this page Legal agreements License Commercial agreements Compliance Healthcare compliance (BAA) Security and trust Trust and safety Security vulnerability reporting"}]}21{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about LLM gateway configuration - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Deployment LLM gateway configuration Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance LLM gateways provide a centralized proxy layer between Claude Code and model providers, offering: Centralized authentication - Single point for API key management Usage tracking - Monitor usage across teams and projects Cost controls - Implement budgets and rate limits Audit logging - Track all model interactions for compliance Model routing - Switch between providers without code changes  LiteLLM configuration LiteLLM is a third-party proxy service. Anthropic doesnt endorse, maintain, or audit LiteLLMs security or functionality. This guide is provided for informational purposes and may become outdated. Use at your own discretion.  Prerequisites Claude Code updated to the latest version LiteLLM Proxy Server deployed and accessible Access to Claude models through your chosen provider  Basic LiteLLM setup Configure Claude Code :  Authentication methods Static API key Simplest method using a fixed API key: export ANTHROPIC_AUTH_TOKEN = sk-litellm-static-key { \"env\" : { \"ANTHROPIC_AUTH_TOKEN\" : \"sk-litellm-static-key\" } } This value will be sent as the Authorization and Proxy-Authorization headers, although Authorization may be overwritten (see Vertex Client-specified credentials below). Dynamic API key with helper For rotating keys or per-user authentication: Create an API key helper script: #!/bin/bash vault kv get -field = api_key secret/litellm/claude-code jwt encode  --secret = \" ${JWT_SECRET} \"  --exp = \"+1h\"  '{\"user\":\"' ${ USER } '\",\"team\":\"engineering\"}' Configure Claude Code settings to use the helper: { \"apiKeyHelper\" : \"~/bin/get-litellm-key.sh\" } Set token refresh interval: export CLAUDE_CODE_API_KEY_HELPER_TTL_MS = 3600000 This value will be sent as Authorization , Proxy-Authorization , and X-Api-Key headers, although Authorization may be overwritten (see Google Vertex AI through LiteLLM ). The apiKeyHelper has lower precedence than ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY .  Provider-specific configurations Anthropic API through LiteLLM Using pass-through endpoint : export ANTHROPIC_BASE_URL = https://litellm-server:4000/anthropic Amazon Bedrock through LiteLLM Using pass-through endpoint : export ANTHROPIC_BEDROCK_BASE_URL = https://litellm-server:4000/bedrock export CLAUDE_CODE_SKIP_BEDROCK_AUTH = 1 export CLAUDE_CODE_USE_BEDROCK = 1 Google Vertex AI through LiteLLM Using pass-through endpoint : Recommended: Proxy-specified credentials export ANTHROPIC_VERTEX_BASE_URL = https://litellm-server:4000/vertex_ai/v1 export ANTHROPIC_VERTEX_PROJECT_ID = your-gcp-project-id export CLAUDE_CODE_SKIP_VERTEX_AUTH = 1 export CLAUDE_CODE_USE_VERTEX = 1 export CLOUD_ML_REGION = us-east5 Alternative: Client-specified credentials If you prefer to use local GCP credentials: Authenticate with GCP locally: gcloud auth application-default login Set Claude Code environment: export ANTHROPIC_VERTEX_BASE_URL = https://litellm-server:4000/vertex_ai/v1 export ANTHROPIC_VERTEX_PROJECT_ID = your-gcp-project-id export CLAUDE_CODE_USE_VERTEX = 1 export CLOUD_ML_REGION = us-east5 Update LiteLLM header configuration: Ensure your LiteLLM config has general_settings.litellm_key_header_name set to Proxy-Authorization , since the pass-through GCP token will be located on the Authorization header.  Unified endpoint Using LiteLLMs Anthropic format"}]}22{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Claude Code overview - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Getting started Claude Code overview Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance By integrating directly with your development environment, Claude Code streamlines your workflow without requiring additional servers or complex setup.  Basic usage To install Claude Code, use NPM: npm install -g @anthropic-ai/claude-code For more detailed installation instructions, see Set up Claude Code . To run Claude Code, simply call the claude CLI: claude You can then prompt Claude directly from the interactive Claude Code REPL session. For more usage instructions, see Quickstart .  Why Claude Code?  Accelerate development Use Claude Code to accelerate development with the following key capabilities: Editing files and fixing bugs across your codebase Answering questions about your codes architecture and logic Executing and fixing tests, linting, and other commands Searching through git history, resolving merge conflicts, and creating commits and PRs Browsing documentation and resources from the internet using web search  Security and privacy by design Your codes security is paramount. Claude Codes architecture ensures: Direct API connection : Your queries go straight to Anthropics API without intermediate servers Works where you work : Operates directly in your terminal Understands context : Maintains awareness of your entire project structure Takes action : Performs real operations like editing files and creating commits  Enterprise integration Claude Code seamlessly integrates with enterprise AI platforms. You can connect to Amazon Bedrock or Google Vertex AI for secure, compliant deployments that meet your organizations requirements.  Next steps Setup Install and authenticate Claude Code Quickstart See Claude Code in action with practical examples Commands Learn about CLI commands and controls Configuration Customize Claude Code for your workflow  Additional resources Common workflows Step-by-step guides for common workflows Troubleshooting Solutions for common issues with Claude Code Bedrock & Vertex integrations Configure Claude Code with Amazon Bedrock or Google Vertex AI Reference implementation Clone our development container reference implementation. Was this page helpful? Yes No Set up On this page Basic usage Why Claude Code? Accelerate development Security and privacy by design Enterprise integration Next steps Additional resources"}]}23{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Identity and Access Management - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Administration Identity and Access Management Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance  Authentication methods Setting up Claude Code requires access to Anthropic models. For teams, you can set up Claude Code access in one of three ways: Anthropic API via the Anthropic Console Amazon Bedrock Google Vertex AI  Anthropic API authentication To set up Claude Code access for your team via Anthropic API: Use your existing Anthropic Console account or create a new Anthropic Console account You can add users through either method below: Bulk invite users from within the Console (Console -> Settings -> Members -> Invite) Set up SSO When inviting users, they need one of the following roles: Claude Code role means users can only create Claude Code API keys Developer role means users can create any kind of API key Each invited user needs to complete these steps: Accept the Console invite Check system requirements Install Claude Code Login with Console account credentials  Cloud provider authentication To set up Claude Code access for your team via Bedrock or Vertex: Follow the Bedrock docs or Vertex docs Distribute the environment variables and instructions for generating cloud credentials to your users. Read more about how to manage configuration here . Users can install Claude Code  Access control and permissions We support fine-grained permissions so that youre able to specify exactly what the agent is allowed to do (e.g. run tests, run linter) and what it is not allowed to do (e.g. update cloud infrastructure). These permission settings can be checked into version control and distributed to all developers in your organization, as well as customized by individual developers.  Permission system Claude Code uses a tiered permission system to balance power and safety: Tool Type Example Approval Required Yes, dont ask again Behavior Read-only File reads, LS, Grep No N/A Bash Commands Shell execution Yes Permanently per project directory and command File Modification Edit/write files Yes Until session end  Configuring permissions You can view & manage Claude Codes tool permissions with /permissions . This UI lists all permission rules and the settings.json file they are sourced from. Allow rules will allow Claude Code to use the specified tool without further manual approval. Deny rules will prevent Claude Code from using the specified tool. Deny rules take precedence over allow rules. Additional directories extend Claudes file access to directories beyond the initial working directory. Default mode controls Claudes permission behavior when encountering new requests. Permission rules use the format: Tool(optional-specifier) A rule that is just the tool name matches any use of that tool. For example, adding Bash to the list of allow rules would allow Claude Code to use the Bash tool without requiring user approval.  Permission modes Claude Code supports several permission modes that can be set as the defaultMode in settings files : Mode Description default Standard behavior - prompts for permission on first use of each tool acceptEdits Automatically accepts file edit permissions for the session plan Plan mode - Claude can analyze but not modify files or execute commands bypassPermissions Skips all permission prompts (requires safe environment - see warning below)  Working directories By default, Claude has access t"}]}24{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Add Claude Code to your IDE - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Build with Claude Add Claude Code to your IDE Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance Claude Code seamlessly integrates with popular Integrated Development Environments (IDEs) to enhance your coding workflow. This integration allows you to leverage Claudes capabilities directly within your preferred development environment.  Supported IDEs Claude Code currently supports two major IDE families: Visual Studio Code (including popular forks like Cursor and Windsurf) JetBrains IDEs (including PyCharm, WebStorm, IntelliJ, and GoLand)  Features Quick launch : Use Cmd+Esc (Mac) or Ctrl+Esc (Windows/Linux) to open Claude Code directly from your editor, or click the Claude Code button in the UI Diff viewing : Code changes can be displayed directly in the IDE diff viewer instead of the terminal. You can configure this in /config Selection context : The current selection/tab in the IDE is automatically shared with Claude Code File reference shortcuts : Use Cmd+Option+K (Mac) or Alt+Ctrl+K (Linux/Windows) to insert file references (e.g., @File#L1-99) Diagnostic sharing : Diagnostic errors (lint, syntax, etc.) from the IDE are automatically shared with Claude as you work  Installation  VS Code Open VSCode Open the integrated terminal Run claude - the extension will auto-install Going forward you can also use the /ide command in any external terminal to connect to the IDE. These installation instructions also apply to VS Code forks like Cursor and Windsurf.  JetBrains IDEs Install the Claude Code plugin from the marketplace and restart your IDE. The plugin may also be auto-installed when you run claude in the integrated terminal. The IDE must be restarted completely to take effect. Remote Development Limitations : When using JetBrains Remote Development, you must install the plugin in the remote host via Settings > Plugin (Host) .  Configuration Both integrations work with Claude Codes configuration system. To enable IDE-specific features: Connect Claude Code to your IDE by running claude in the built-in terminal Run the /config command Set the diff tool to auto for automatic IDE detection Claude Code will automatically use the appropriate viewer based on your IDE If youre using an external terminal (not the IDEs built-in terminal), you can still connect to your IDE by using the /ide command after launching Claude Code. This allows you to benefit from IDE integration features even when running Claude from a separate terminal application. This works for both VS Code and JetBrains IDEs. When using an external terminal, to ensure Claude has default access to the same files as your IDE, start Claude from the same directory as your IDE project root.  Troubleshooting  VS Code extension not installing Ensure youre running Claude Code from VS Codes integrated terminal Ensure that the CLI corresponding to your IDE is installed: For VS Code: code command should be available For Cursor: cursor command should be available For Windsurf: windsurf command should be available If not installed, use Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux) and search for Shell Command: Install code command in PATH (or the equivalent for your IDE) Check that VS Code has permission to install extensions  JetBrains plugin not working Ensure youre running Claude Code from the project root directory Check that the JetBrains plugin is enabled in"}]}25{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Quickstart - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Getting started Quickstart Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance This quickstart guide will have you using AI-powered coding assistance in just a few minutes. By the end, youll understand how to use Claude Code for common development tasks.  Before you begin Make sure you have: Installed Claude Code A terminal or command prompt open A code project to work with (or use our sample project )  Step 1: Start your first session Open your terminal in any project directory and start Claude Code: cd /path/to/your/project claude Youll see the Claude Code prompt inside a new interactive session:  Welcome to Claude Code! ... > Try \"create a util logging.py that...\"  Step 2: Ask your first question Lets start with understanding your codebase. Try one of these commands: > what does this project do? Claude will analyze your files and provide a summary. You can also ask more specific questions: > what technologies does this project use? > where is the main entry point? > explain the folder structure Claude Code reads your files as needed - you dont have to manually add context.  Step 3: Make your first code change Now lets make Claude Code do some actual coding. Try a simple task: > add a hello world function to the main file Claude Code will: Find the appropriate file Show you the proposed changes Ask for your approval Make the edit Claude Code always asks for permission before modifying files. You can approve individual changes or enable Accept all mode for a session.  Step 4: Use Git with Claude Code Claude Code makes Git operations conversational: > what files have I changed? > commit my changes with a descriptive message You can also prompt for more complex Git operations: > create a new branch called feature/quickstart > show me the last 5 commits > help me resolve merge conflicts  Step 5: Fix a bug or add a feature Claude is proficient at debugging and feature implementation. Describe what you want in natural language: > add input validation to the user registration form Or fix existing issues: > there's a bug where users can submit empty forms - fix it Claude Code will: Locate the relevant code Understand the context Implement a solution Run tests if available  Step 6: Test out other common workflows There are a number of ways to work with Claude: Refactor code > refactor the authentication module to use async/await instead of callbacks Write tests > write unit tests for the calculator functions Update documentation > update the README with installation instructions Code review > review my changes and suggest improvements Remember : Claude Code is your AI pair programmer. Talk to it like you would a helpful colleague - describe what you want to achieve, and it will help you get there.  Essential commands Here are the most important commands for daily use: Command What it does Example claude Start interactive mode claude claude \"task\" Run a one-time task claude \"fix the build error\" claude -p \"query\" Run one-off query, then exit claude -p \"explain this function\" claude -c Continue most recent conversation claude -c claude -r Resume a previous conversation claude -r claude commit Create a Git commit claude commit /clear Clear conversation history > /clear /help Show available commands > /help exit or Ctrl+C Exit Claude Code > exit  Pro tips for beginners Be specific with your requests Instead of: fix the bu"}]}26{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Development containers - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Deployment Development containers Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance The preconfigured devcontainer setup works seamlessly with VS Codes Remote - Containers extension and similar tools. The containers enhanced security measures (isolation and firewall rules) allow you to run claude --dangerously-skip-permissions to bypass permission prompts for unattended operation. Weve included a reference implementation that you can customize for your needs. While the devcontainer provides substantial protections, no system is completely immune to all attacks. Always maintain good security practices and monitor Claudes activities.  Key features Production-ready Node.js : Built on Node.js 20 with essential development dependencies Security by design : Custom firewall restricting network access to only necessary services Developer-friendly tools : Includes git, ZSH with productivity enhancements, fzf, and more Seamless VS Code integration : Pre-configured extensions and optimized settings Session persistence : Preserves command history and configurations between container restarts Works everywhere : Compatible with macOS, Windows, and Linux development environments  Getting started in 4 steps Install VS Code and the Remote - Containers extension Clone the Claude Code reference implementation repository Open the repository in VS Code When prompted, click Reopen in Container (or use Command Palette: Cmd+Shift+P  Remote-Containers: Reopen in Container)  Configuration breakdown The devcontainer setup consists of three primary components: devcontainer.json : Controls container settings, extensions, and volume mounts Dockerfile : Defines the container image and installed tools init-firewall.sh : Establishes network security rules  Security features The container implements a multi-layered security approach with its firewall configuration: Precise access control : Restricts outbound connections to whitelisted domains only (npm registry, GitHub, Anthropic API, etc.) Default-deny policy : Blocks all other external network access Startup verification : Validates firewall rules when the container initializes Isolation : Creates a secure development environment separated from your main system  Customization options The devcontainer configuration is designed to be adaptable to your needs: Add or remove VS Code extensions based on your workflow Modify resource allocations for different hardware environments Adjust network access permissions Customize shell configurations and developer tooling  Example use cases  Secure client work Use devcontainers to isolate different client projects, ensuring code and credentials never mix between environments.  Team onboarding New team members can get a fully configured development environment in minutes, with all necessary tools and settings pre-installed.  Consistent CI/CD environments Mirror your devcontainer configuration in CI/CD pipelines to ensure development and production environments match.  Related resources VS Code devcontainers documentation Claude Code security best practices Corporate proxy configuration Was this page helpful? Yes No LLM gateway Identity and Access Management On this page Key features Getting started in 4 steps Configuration breakdown Security features Customization options Example use cases Secure client work Team onboarding Consistent CI/CD environments "}]}27{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about Claude Code settings - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Reference Claude Code settings Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance Claude Code offers a variety of settings to configure its behavior to meet your needs. You can configure Claude Code by running the /config command when using the interactive REPL.  Settings files The settings.json file is our official mechanism for configuring Claude Code through hierarchical settings: User settings are defined in ~/.claude/settings.json and apply to all projects. Project settings are saved in your project directory: .claude/settings.json for settings that are checked into source control and shared with your team .claude/settings.local.json for settings that are not checked in, useful for personal preferences and experimentation. Claude Code will configure git to ignore .claude/settings.local.json when it is created. For enterprise deployments of Claude Code, we also support enterprise managed policy settings . These take precedence over user and project settings. System administrators can deploy policies to /Library/Application Support/ClaudeCode/managed-settings.json on macOS and /etc/claude-code/managed-settings.json on Linux and Windows via WSL. Example settings.json { \"permissions\" : { \"allow\" : [ \"Bash(npm run lint)\" , \"Bash(npm run test:*)\" , \"Read(~/.zshrc)\" ] , \"deny\" : [ \"Bash(curl:*)\" ] } , \"env\" : { \"CLAUDE_CODE_ENABLE_TELEMETRY\" : \"1\" , \"OTEL_METRICS_EXPORTER\" : \"otlp\" } }  Available settings settings.json supports a number of options: Key Description Example apiKeyHelper Custom script, to be executed in /bin/sh , to generate an auth value. This value will generally be sent as X-Api-Key , Authorization: Bearer , and Proxy-Authorization: Bearer headers for model requests /bin/generate_temp_api_key.sh cleanupPeriodDays How long to locally retain chat transcripts (default: 30 days) 20 env Environment variables that will be applied to every session {\"FOO\": \"bar\"} includeCoAuthoredBy Whether to include the co-authored-by Claude byline in git commits and pull requests (default: true ) false permissions See table below for structure of permissions.  Permission settings Keys Description Example allow Array of permission rules to allow tool use [ \"Bash(git diff:*)\" ] deny Array of permission rules to deny tool use [ \"WebFetch\", \"Bash(curl:*)\" ] additionalDirectories Additional working directories that Claude has access to [ \"../docs/\" ] defaultMode Default permission mode when opening Claude Code \"allowEdits\" disableBypassPermissionsMode Set to \"disable\" to prevent bypassPermissions mode from being activated. See managed policy settings \"disable\"  Settings precedence Settings are applied in order of precedence: Enterprise policies (see IAM documentation ) Command line arguments Local project settings Shared project settings User settings  Environment variables Claude Code supports the following environment variables to control its behavior: All environment variables can also be configured in settings.json . This is useful as a way to automatically set environment variables for each session, or to roll out a set of environment variables for your whole team or organization. Variable Purpose ANTHROPIC_API_KEY API key sent as X-Api-Key header, typically for the Claude SDK (for interactive usage, run /login ) ANTHROPIC_AUTH_TOKEN Custom value for the Authorization and Proxy-Authorization headers (the value you se"}]}28{"messages": [{"role": "system", "content": "You are a helpful assistant with knowledge about general topics."}, {"role": "user", "content": "What information do you have about CLI reference - Anthropic?"}, {"role": "assistant", "content": "Anthropic home page English Search... Search... Navigation Reference CLI reference Welcome Developer Guide API Guide Claude Code Model Context Protocol (MCP) Resources Release Notes Documentation Developer Discord Support Getting started Overview Set up Quickstart Memory management Common workflows Build with Claude Add Claude Code to your IDE Model Context Protocol (MCP) GitHub Actions Claude Code SDK Troubleshooting Deployment Overview Amazon Bedrock Google Vertex AI Corporate proxy LLM gateway Development containers Administration Identity and Access Management Security Monitoring Costs Reference CLI reference Interactive mode Slash commands Settings Resources Data usage Legal and compliance  CLI commands Command Description Example claude Start interactive REPL claude claude \"query\" Start REPL with initial prompt claude \"explain this project\" claude -p \"query\" Query via SDK, then exit claude -p \"explain this function\" cat file | claude -p \"query\" Process piped content cat logs.txt | claude -p \"explain\" claude -c Continue most recent conversation claude -c claude -c -p \"query\" Continue via SDK claude -c -p \"Check for type errors\" claude -r \"<session-id>\" \"query\" Resume session by ID claude -r \"abc123\" \"Finish this PR\" claude update Update to latest version claude update claude mcp Configure Model Context Protocol (MCP) servers See the Claude Code MCP documentation .  CLI flags Customize Claude Codes behavior with these command-line flags: Flag Description Example --add-dir Add additional working directories for Claude to access (validates each path exists as a directory) claude --add-dir ../apps ../lib --allowedTools A list of tools that should be allowed without prompting the user for permission, in addition to settings.json files \"Bash(git log:*)\" \"Bash(git diff:*)\" \"Write\" --disallowedTools A list of tools that should be disallowed without prompting the user for permission, in addition to settings.json files \"Bash(git log:*)\" \"Bash(git diff:*)\" \"Write\" --print , -p Print response without interactive mode (see SDK documentation for programmatic usage details) claude -p \"query\" --output-format Specify output format for print mode (options: text , json , stream-json ) claude -p \"query\" --output-format json --input-format Specify input format for print mode (options: text , stream-json ) claude -p --output-format json --input-format stream-json --verbose Enable verbose logging, shows full turn-by-turn output (helpful for debugging in both print and interactive modes) claude --verbose --max-turns Limit the number of agentic turns in non-interactive mode claude -p --max-turns 3 \"query\" --model Sets the model for the current session with an alias for the latest model ( sonnet or opus ) or a models full name claude --model claude-sonnet-4-20250514 --permission-prompt-tool Specify an MCP tool to handle permission prompts in non-interactive mode claude -p --permission-prompt-tool mcp_auth_tool \"query\" --resume Resume a specific session by ID, or by choosing in interactive mode claude --resume abc123 \"query\" --continue Load the most recent conversation in the current directory claude --continue --dangerously-skip-permissions Skip permission prompts (use with caution) claude --dangerously-skip-permissions The --output-format json flag is particularly useful for scripting and automation, allowing you to parse Claudes responses programmatically. For detailed information about print mode ( -p ) including output formats, streaming, verbose logging, and programmatic usage, see the SDK documentation .  See also Interactive mode - Shortcuts, input modes, and interactive features Slash commands - Interactive session commands Quickstart guide - Getting started with Claude Code Common workflows - Advanced workflows and patterns Settings - Configuration options SDK documentation - Programmatic usage and integrations Was this page helpful? Yes No Costs Interactive mode On this page CLI commands CLI flags See also"}]}29