983 pages for bash.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
migration-guide
Claude Developer Platform · in the page
models/sonnet-5-5/migration-guide
…et-5-5/migration-guide#turn-off-up-front-thinking). <CodeGroup> ```bash cURL curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-…
overview
Claude Developer Platform · in the page
release-notes/overview
…system prompt, an attached document, or the output of a tool such as `bash`, `read`, or an MCP tool does not count: a `web_fetch` call for it returns a `url_not_in_prior_context` error result to the a…
reduce-latency
Claude Developer Platform · in the page
test-and-evaluate/strengthen-guardrails/reduce-latency
…evel, and leaves room in `max_tokens` for thinking: <CodeGroup> ```bash cURL # For time-sensitive applications, use Claude Haiku 5.5 at low effort curl https://api.anthropic.com/v1/messages \…
Use Claude Code with a screen reader
Claude Code CLI · in the page
accessibility
…ll: set the `CLAUDE_AX_SCREEN_READER` environment variable to `1`. In Bash or Zsh, run `export CLAUDE_AX_SCREEN_READER=1`. In PowerShell, run `$env:CLAUDE_AX_SCREEN_READER = "1"`. Add that line to you…
Set up Claude Code for your organization
Claude Code CLI · in the page
admin-setup
…different layers. Denying WebFetch blocks Claude's fetch tool, but if Bash is allowed, `curl` and `wget` can still reach any URL. Sandboxing closes that gap with a network domain allowlist enforced at…
Escalate hard decisions with the advisor tool
Claude Code CLI · in the page
advisor
…ession without changing your saved setting, launch with the flag: ```bash theme={null} claude --advisor opus ``` Claude Code uses the flag instead of the `advisorModel` setting for that session. It…
How the agent loop works
Claude Code CLI · in the page
agent-sdk/agent-loop
…session metadata. Then the loop begins: 1. **Turn 1:** Claude calls `Bash` to run `npm test`. The SDK yields an [`AssistantMessage`](#message-types) with the tool call, executes the command, then yie…
Use Claude Code features in the SDK
Claude Code CLI · in the page
agent-sdk/claude-code-features
…rces=["user", "project"], allowed_tools=["Read", "Edit", "Bash"], ), ): if isinstance(message, AssistantMessage): for block in message.content:…
Give Claude custom tools
Claude Code CLI · in the page
agent-sdk/custom-tools
…d it with the package manager your project uses: **Python (uv)** ```bash theme={null} uv add httpx ``` **Python (pip)** ```bash theme={null} pip install httpx ``` ### Weather tool example This e…
Rewind file changes with checkpointing
Claude Code CLI · in the page
agent-sdk/file-checkpointing
…[!WARNING] > > `rewindFiles()` doesn't undo what `sed -i` or another Bash command did to a file, unless a tool such as Write or Edit had modified that file in the main conversation. [Subagent](/docs/…
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…this hook to the Write and Edit tools. If Claude writes `.env` with a Bash command, the hook doesn't run. To block Bash writes to a file where [the sandbox runs](/docs/en/sandboxing.md), see the sandb…
Hosting the Agent SDK
Claude Code CLI · in the page
agent-sdk/hosting
…ed only for traces; omit it if you export metrics and logs alone. ```bash title=".env" theme={null} CLAUDE_CODE_ENABLE_TELEMETRY=1 CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1 OTEL_TRACES_EXPORTER=otlp OTEL…
Connect to external tools with MCP
Claude Code CLI · in the page
agent-sdk/mcp
…its"` does not auto-approve MCP tools (only file edits and filesystem Bash commands). `permissionMode: "bypassPermissions"` does auto-approve MCP tools but also disables most other safety prompts, whi…
Migrate to Claude Agent SDK
Claude Code CLI · in the page
agent-sdk/migration-guide
…peScript or JavaScript project **1. Uninstall the old package:** ```bash theme={null} npm uninstall @anthropic-ai/claude-code ``` **2. Install the new package:** ```bash theme={null} npm install @…
Modifying system prompts
Claude Code CLI · in the page
agent-sdk/modifying-system-prompts
…built-in commit and pull request instructions, which are part of the Bash tool's description and reach Claude even with a custom `systemPrompt`. With the minimal default, a custom `systemPrompt`, or…
Observability with OpenTelemetry
Claude Code CLI · in the page
agent-sdk/observability
…propagation is enabled, the CLI also forwards `TRACEPARENT` to every Bash and PowerShell command it runs. If a command launched through the Bash tool emits its own OpenTelemetry spans, those spans ne…
Configure permissions
Claude Code CLI · in the page
agent-sdk/permissions
…blocked, even in `bypassPermissions` mode. Bare-name deny rules like `Bash` remove the tool from Claude's context before this evaluation begins, so only scoped rules like `Bash(rm *)` are checked at t…
Agent SDK reference - Python
Claude Code CLI · in the page
agent-sdk/python
…system Python fails with `error: externally-managed-environment`. ```bash theme={null} python3 -m venv .venv source .venv/bin/activate pip install claude-agent-sdk ``` For uv, Windows PowerShell, an…
Quickstart
Claude Code CLI · in the page
agent-sdk/quickstart
…e a project folder** Create a new directory for this quickstart: ```bash theme={null} mkdir my-agent cd my-agent ``` For your own projects, you can run the SDK from any folder; it will have access…
Securely deploying AI agents
Claude Code CLI · in the page
agent-sdk/secure-deployment
…urity.md) for full details. * **Permissions system**: Every tool and bash command can be configured to allow, block, or prompt the user for approval. Use glob patterns to create rules like "allow all…
Persist sessions to external storage
Claude Code CLI · in the page
agent-sdk/session-storage
…with pytest, which isn't an SDK dependency, install pytest first: ```bash theme={null} pip install pytest ``` Then pass your adapter to the suite in a test file as a zero-argument factory, which `ru…
Extend agents with skills
Claude Code CLI · in the page
agent-sdk/skills
…nvoke every discovered skill allowed_tools=["Read", "Write", "Bash"], ) async for message in query( prompt="Help me process this PDF document", options=options ):…
Stream responses in real-time
Claude Code CLI · in the page
agent-sdk/streaming-output
…tions( include_partial_messages=True, allowed_tools=["Bash", "Read"], ) async for message in query(prompt="List the files in my project", options=options): if isinstan…
Get structured output from agents
Claude Code CLI · in the page
agent-sdk/structured-outputs
…each one. It autonomously decides which tools to use (Grep to search, Bash to run git commands) and combines the results into a single structured response. The schema includes optional fields (`autho…
Subagents in the SDK
Claude Code CLI · in the page
agent-sdk/subagents
…iling tests - Suggesting fixes for failures""", # Bash access lets this subagent run test commands tools=["Bash", "Read", "Grep"], ),…
Scale to many tools with tool search
Claude Code CLI · in the page
agent-sdk/tool-search
…tools that load on demand. The SDK loads core built-in tools such as Bash, Read, and Edit upfront and doesn't count them toward the threshold. A [mod](/docs/en/plugins/mods/reference.md#tools) in one…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…including all functions, types, and interfaces. ## Installation ```bash theme={null} npm install @anthropic-ai/claude-agent-sdk ``` > [!NOTE] > > The SDK bundles a native Claude Code binary for yo…
TypeScript SDK V2 session API (removed)
Claude Code CLI · in the page
agent-sdk/typescript-v2-preview
…the last V2-compatible release, pin the major and minor version: ```bash theme={null} npm install @anthropic-ai/[email protected] ``` > [!NOTE] > > The SDK bundles a native Claude Code binary fo…
Handle approvals and user input
Claude Code CLI · in the page
agent-sdk/user-input
…sions.md) or permission mode. Check `tool_name` for the tool (e.g., `"Bash"`, `"Write"`). 2. **Claude asks a question**: Claude calls the `AskUserQuestion` tool. Check if `tool_name == "AskUserQuestio…
Orchestrate teams of Claude Code sessions
Claude Code CLI · in the page
agent-teams
…" } ``` To set the mode for a single session, pass it as a flag: ```bash theme={null} claude --teammate-mode auto ``` The `--teammate-mode` flag is experimental and doesn't appear in `claude --help…
Manage multiple agents with agent view
Claude Code CLI · in the page
agent-view
…d come back to it. **1. Open agent view** From your shell, run: ```bash theme={null} claude agents ``` If you haven't yet accepted the [workspace trust dialog](/docs/en/permissions.md#project-allo…
Run agents in parallel
Claude Code CLI · in the page
agents
…different problem than splitting work across agents: * A [background bash command](/docs/en/interactive-mode.md#background-bash-commands) runs one shell command without blocking the conversation. It…
Claude Code on Amazon Bedrock
Claude Code CLI · in the page
amazon-bedrock
…cess key ID, secret access key, and default region when prompted: ```bash theme={null} aws configure ``` The AWS CLI saves the key to the `default` profile in `~/.aws/credentials`, where the credent…
Authentication
Claude Code CLI · in the page
authentication
…ngs, session history, and claude.ai login or API key. For example, in Bash or Zsh, add this alias to `~/.bashrc` or `~/.zshrc` so that `claude-work` uses your work account while `claude` keeps your pe…
Auto mode classifier request charges
Claude Code CLI · in the page
auto-mode-classifier-billing
…or in the [`env` settings key](/docs/en/settings-reference#env): ```bash theme={null} export CLAUDE_CODE_AUTO_MODE_SERVER=0 ``` Classifier requests are then always Claude Code's own, billed the sam…
Configure auto mode
Claude Code CLI · in the page
auto-mode-config
…live): ```json theme={null} { "permissions": { "ask": [ "Bash(git push *)", "Bash(gh pr create *)" ] } } ``` These rules match commands that begin with `git push` or `gh pr c…
Best practices for Claude Code
Claude Code CLI · in the page
best-practices
…laude fetch what it needs**. Tell Claude to pull context itself using Bash commands, MCP tools, or by reading files. *** ## Configure your environment A few setup steps make Claude Code significant…
Claude Code changelog
Claude Code CLI · in the page
changelog
…age OpenTelemetry destinations * Changed `sed -i` to get the standard Bash prompt and run as written, not a simulated file-edit preview; like other Bash edits, it is no longer restored by `/rewind` *…
Push events into a running session with channels
Claude Code CLI · in the page
channels
…Telegram plugin, which begins polling for messages from your bot: ```bash theme={null} claude --channels plugin:telegram@claude-plugins-official ``` **5. Pair your account** Open Telegram and send…
Channels reference
Claude Code CLI · in the page
channels-reference
…s alongside the MCP SDK. Create a new directory and install both: ```bash theme={null} mkdir webhook-channel && cd webhook-channel bun add @modelcontextprotocol/sdk zod ``` **2. Write the channel se…
Checkpointing
Claude Code CLI · in the page
checkpointing
…orward, keeping your initial instructions intact ## Limitations ### Bash command changes not tracked Once Claude has edited a file with its file editing tools in your conversation, `/rewind` undoes…
Use Claude Code with Chrome
Claude Code CLI · in the page
chrome
…e Code with Chrome** Start Claude Code with the `--chrome` flag: ```bash theme={null} claude --chrome ``` The first time you launch with Chrome, Claude Code shows a one-time dialog that introduces…
Claude apps gateway for Amazon Bedrock, Claude Platform on AWS, Google Cloud, and Microsoft Foundry
Claude Code CLI · in the page
claude-apps-gateway
…e gateway is up, the config is valid, and all boot checks passed: ```bash theme={null} curl -s https://claude-gateway.internal.example.com/.well-known/oauth-authorization-server | jq ``` ```json the…
Claude apps gateway configuration
Claude Code CLI · in the page
claude-apps-gateway-config
…a key with a self-signed certificate that is valid for one year: ```bash theme={null} openssl req -x509 -newkey rsa:2048 -nodes -keyout idp-client.key -out idp-client.crt -days 365 -subj "/CN=claude…
Claude apps gateway deployment and operations
Claude Code CLI · in the page
claude-apps-gateway-deploy
…take longer. This example sets 60 seconds in a developer's shell: ```bash theme={null} export CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS=60000 ``` An unanswered re-send can wait 5 to 6 minutes, until the […
Deploy Claude apps gateway on AWS
Claude Code CLI · in the page
claude-apps-gateway-on-aws
…subnets to find two private ones in different Availability Zones: ```bash theme={null} aws ec2 describe-subnets --filters "Name=vpc-id,Values=<your-vpc-id>" \ --query 'Subnets[].{ID:SubnetId,AZ:Ava…
Deploy Claude apps gateway on Google Cloud
Claude Code CLI · in the page
claude-apps-gateway-on-gcp
…e pointing at the load balancer Set the project and region once: ```bash theme={null} export PROJECT_ID=<your-project> export REGION=us-east5 # a region where the Claude models you need are publis…
Claude apps gateway spend limits
Claude Code CLI · in the page
claude-apps-gateway-spend-limits
…sets an org-wide default of \$500 per month for every developer: ```bash theme={null} curl -sS https://claude-gateway.internal.example.com/v1/organizations/spend_limits \ -H "x-api-key: $GATEWAY_A…
Use Claude Code in the cloud
Claude Code CLI · in the page
claude-code-on-the-web
…rt a cloud session from the command line with the `--cloud` flag: ```bash theme={null} claude --cloud "Fix the authentication bug in src/auth/login.ts" ``` This creates a new cloud session on claude…
Explore the .claude directory
Claude Code CLI · in the page
claude-directory
…ect a custom output style from output-styles/</>], tips: [<>Bash permission patterns support wildcards: <C>Bash(npm test *)</C> matches any command starting with <C>npm test</C></>, <>Array…