Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
252 changes: 126 additions & 126 deletions content/.metadata.json

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions content/anthropic-blog/claude-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Plans
* [Enterprise plan](https://www.anthropic.com/enterprise)
* [Explore pricing](https://www.anthropic.com/pricing)

* [Download apps](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38/download)
* [Claude log in](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38)
* [Download apps](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6/download)
* [Claude log in](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6)

[![Image 27](https://cdn.prod.website-files.com/67ce28cfec624e2b733f8a52/688a1d15af22ddab26ed8a3c_claude.svg) News Claude’s Character](https://www.anthropic.com/news/claude-character)

Expand Down Expand Up @@ -103,7 +103,7 @@ Company
* [News](https://www.anthropic.com/news)

* EN [This is some text inside of a div block.](https://www.anthropic.com/claude-code#)
* [Try Claude](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38/login)Try Claude Try Claude [Download App](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38/download)Download App Download App
* [Try Claude](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6/login)Try Claude Try Claude [Download App](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6/download)Download App Download App

[](https://www.anthropic.com/)

Expand All @@ -121,8 +121,8 @@ Plans
* [Enterprise plan](https://www.anthropic.com/enterprise)
* [Explore pricing](https://www.anthropic.com/pricing)

* [Download apps](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38/download)
* [Claude log in](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38)
* [Download apps](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6/download)
* [Claude log in](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6)

[![Image 33](https://cdn.prod.website-files.com/67ce28cfec624e2b733f8a52/688a1d15af22ddab26ed8a3c_claude.svg) News Claude’s Character](https://www.anthropic.com/news/claude-character)

Expand Down Expand Up @@ -199,7 +199,7 @@ Company
* [News](https://www.anthropic.com/news)

* EN [This is some text inside of a div block.](https://www.anthropic.com/claude-code#)
* [Try Claude](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38/login)Try Claude Try Claude [Download App](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38/download)Download App Download App
* [Try Claude](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6/login)Try Claude Try Claude [Download App](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6/download)Download App Download App

Your code’s new collaborator
============================
Expand All @@ -217,19 +217,19 @@ Install [Node.js 18+](https://nodejs.org/en/download), then run:

[npm install-g @anthropic-ai/claude-code](https://www.anthropic.com/claude-code#)

[Try Claude Code on Max](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38/upgrade/max?returnTo=/claude-code-install)Try Claude Code on Max
[Try Claude Code on Max](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6/upgrade/max?returnTo=/claude-code-install)Try Claude Code on Max

Try Claude Code on Max

[Try Claude Code on Max](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38/upgrade/max?returnTo=/claude-code-install)Try Claude Code on Max
[Try Claude Code on Max](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6/upgrade/max?returnTo=/claude-code-install)Try Claude Code on Max

Try Claude Code on Max

[See our pricing options](https://www.anthropic.com/claude-code#get-started)


Clauding
Transmuting

Trusted by engineers at
-----------------------
Expand Down Expand Up @@ -258,15 +258,15 @@ Claude Code embeds Claude Opus 4.1—the same model our researchers and engineer

[Terminal](https://www.anthropic.com/claude-code#)[Result](https://www.anthropic.com/claude-code#)


Pontificating
Marinating

[Terminal](https://www.anthropic.com/claude-code#)[Result](https://www.anthropic.com/claude-code#)


Ruminating
Cogitating

### Powerful intelligence

Expand Down Expand Up @@ -335,13 +335,13 @@ What could you do with Claude Code?

[Code onboarding](https://www.anthropic.com/claude-code#w-tabs-1-data-w-pane-0)[Triage issues](https://www.anthropic.com/claude-code#w-tabs-1-data-w-pane-1)[Refactor code](https://www.anthropic.com/claude-code#w-tabs-1-data-w-pane-2)


Hustling
Synthesizing


Accomplishing
Schlepping

Install [Node.js 18+](https://nodejs.org/en/download), then run:

Expand Down Expand Up @@ -425,14 +425,14 @@ Get started with Claude Code

[Individual](https://www.anthropic.com/claude-code#w-tabs-2-data-w-pane-0)[Team &Enterprise](https://www.anthropic.com/claude-code#w-tabs-2-data-w-pane-1)

* ### Pro $17 Per month with annual subscription discount; $200 billed up front. $20 if billed monthly. Claude Code is included in your Pro plan. Perfect for short coding sprints in smaller codebases with Claude Sonnet 4. [Sign up](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38/upgrade/pro?returnTo=/claude-code-install)Sign up Sign up
* ### Max 5x $100 Per person billed monthly Claude Code is included in your Max plan. Great value for everyday use in larger codebases with access to both Claude Sonnet 4 & Claude Opus 4.1. [Sign up](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38/upgrade/max?plan=max_5x&returnTo=/claude-code-install)Sign up Sign up
* ### Max 20x $200 Per person billed monthly Even more Claude Code included in your Max plan. Great value for power users with the most access to Claude Opus 4.1. [Sign up](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38/upgrade/max?plan=max_20x&returnTo=/claude-code-install)Sign up Sign up
* ### Pro $17 Per month with annual subscription discount; $200 billed up front. $20 if billed monthly. Claude Code is included in your Pro plan. Perfect for short coding sprints in smaller codebases with Claude Sonnet 4. [Sign up](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6/upgrade/pro?returnTo=/claude-code-install)Sign up Sign up
* ### Max 5x $100 Per person billed monthly Claude Code is included in your Max plan. Great value for everyday use in larger codebases with access to both Claude Sonnet 4 & Claude Opus 4.1. [Sign up](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6/upgrade/max?plan=max_5x&returnTo=/claude-code-install)Sign up Sign up
* ### Max 20x $200 Per person billed monthly Even more Claude Code included in your Max plan. Great value for power users with the most access to Claude Opus 4.1. [Sign up](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6/upgrade/max?plan=max_20x&returnTo=/claude-code-install)Sign up Sign up

*Additional [usage limits](https://support.anthropic.com/en/articles/9797557-usage-limit-best-practices) apply. Prices shown do not include applicable tax.

* ### Anthropic API Pay as you go with standard Anthropic API pricing. Deploy to unlimited developers with no per-seat fee or platform charges. [Start building](https://console.anthropic.com/login?returnTo=%2F%3F)Start building Start building
* ### Team $150 Per person / month. Minimum 5 members. Claude Code is included with Team plan premium seats. Includes self-serve seat management and additional usage at standard API rates, plus access to both Claude Sonnet 4 and Claude Opus 4.1. [Get the Team plan](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38/login)Get the Team plan Get the Team plan
* ### Team $150 Per person / month. Minimum 5 members. Claude Code is included with Team plan premium seats. Includes self-serve seat management and additional usage at standard API rates, plus access to both Claude Sonnet 4 and Claude Opus 4.1. [Get the Team plan](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6/login)Get the Team plan Get the Team plan
* ### Enterprise Enterprise plan premium seats include everything in the Team plan, plus advanced security, data, and user management. [Contact sales](https://anthropic.com/contact-sales)Contact sales Contact sales

Prices shown do not include applicable tax. [Usage limits](https://support.anthropic.com/en/articles/9797557-usage-limit-best-practices) may apply.
Expand Down Expand Up @@ -548,9 +548,9 @@ Footer
* [Max plan](https://www.anthropic.com/max)
* [Team plan](https://www.anthropic.com/team)
* [Enterprise plan](https://www.anthropic.com/enterprise)
* [Download Claude apps](https://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38/download)
* [Download Claude apps](https://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6/download)
* [Claude.ai pricing plans](https://www.anthropic.com/pricing)
* [Claude.ai login](http://claude.ai/redirect/website.v1.7ab658d3-e107-43c6-98ed-94e383a00c38/login)
* [Claude.ai login](http://claude.ai/redirect/website.v1.ebe782dd-db6f-4205-820d-3c43366878f6/login)

### API Platform

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Claude Code is intentionally low-level and unopinionated, providing close to raw

This post outlines general patterns that have proven effective, both for Anthropic's internal teams and for external engineers using Claude Code across various codebases, languages, and environments. Nothing in this list is set in stone nor universally applicable; consider these suggestions as starting points. We encourage you to experiment and find what works best for you!

_Looking for more detailed information? Our comprehensive documentation at [claude.ai/code](https://claude.ai/redirect/website.v1.6e592fcc-e67c-44da-a388-31ff8f7aa151/code)_ _covers all the features mentioned in this post and provides additional examples, implementation details, and advanced techniques._
_Looking for more detailed information? Our comprehensive documentation at [claude.ai/code](https://claude.ai/redirect/website.v1.6c5235db-5a2f-4daa-9e44-5463c6b067ee/code)_ _covers all the features mentioned in this post and provides additional examples, implementation details, and advanced techniques._

1. Customize your setup
-----------------------
Expand Down
2 changes: 1 addition & 1 deletion content/claude-code-docs/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Claude Code provides an analytics dashboard that helps organizations understand

## Access analytics

Navigate to the analytics dashboard at [console.anthropic.com/claude\_code](https://console.anthropic.com/claude_code).
Navigate to the analytics dashboard at [console.anthropic.com/claude-code](https://console.anthropic.com/claude-code).

### Required roles

Expand Down
4 changes: 2 additions & 2 deletions content/claude-code-docs/api/claude-code-analytics-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
**The Admin API is unavailable for individual accounts.** To collaborate with teammates and add members, set up your organization in **Console → Settings → Organization**.
</Tip>

The Claude Code Analytics Admin API provides programmatic access to daily aggregated usage metrics for Claude Code users, enabling organizations to analyze developer productivity and build custom dashboards. This API bridges the gap between our basic [Analytics dashboard](https://console.anthropic.com/claude_code) and the complex OpenTelemetry integration.
The Claude Code Analytics Admin API provides programmatic access to daily aggregated usage metrics for Claude Code users, enabling organizations to analyze developer productivity and build custom dashboards. This API bridges the gap between our basic [Analytics dashboard](https://console.anthropic.com/claude-code) and the complex OpenTelemetry integration.

This API enables you to better monitor, analyze, and optimize your Claude Code adoption:

Expand Down Expand Up @@ -264,7 +264,7 @@ The Claude Code Analytics API helps you understand and optimize your team's deve

* [Admin API overview](/en/api/administration-api)
* [Admin API reference](https://docs.anthropic.com/en/api/admin-api)
* [Claude Code Analytics dashboard](https://console.anthropic.com/claude_code)
* [Claude Code Analytics dashboard](https://console.anthropic.com/claude-code)
* [Usage and Cost API](/en/api/usage-cost-api) - Track API usage across all Anthropic services
* [Identity and access management](/en/docs/claude-code/iam)
* [Monitoring usage with OpenTelemetry](/en/docs/claude-code/monitoring-usage) for custom metrics and alerting
57 changes: 33 additions & 24 deletions content/claude-code-docs/sdk/custom-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,31 +132,26 @@ You can control which tools Claude can use via the `allowedTools` option:

```python Python
from claude_code_sdk import ClaudeSDKClient, ClaudeCodeOptions
import asyncio

# Use the custom tools with Claude
options = ClaudeCodeOptions(
mcp_servers={"my-custom-tools": custom_server},
allowed_tools=[
"mcp__my-custom-tools__get_weather", # Allow the weather tool
# Add other tools as needed
]
)

# Use the custom tools in your query with streaming input
async def message_generator():
yield {
"type": "user",
"message": {
"role": "user",
"content": "What's the weather in San Francisco?"
}
}
async def main():
async with ClaudeSDKClient(options=options) as client:
await client.query("What's the weather in San Francisco?")

# Extract and print response
async for msg in client.receive_response():
print(msg)

async for message in query(
prompt=message_generator(), # Use async generator for streaming input
options=ClaudeCodeOptions(
mcp_servers={"my-custom-tools": custom_server}, # Pass as dict, not list
# Optionally specify which tools Claude can use
allowed_tools=[
"mcp__my-custom-tools__get_weather", # Allow the weather tool
# Add other tools as needed
],
max_turns=3
)
):
if hasattr(message, 'result'):
print(message.result)
asyncio.run(main())
```
</CodeGroup>

Expand Down Expand Up @@ -205,7 +200,9 @@ When your MCP server has multiple tools, you can selectively allow them:
```

```python Python
from claude_code_sdk import ClaudeSDKClient, ClaudeCodeOptions
from claude_code_sdk import ClaudeSDKClient, ClaudeCodeOptions, tool, create_sdk_mcp_server
from typing import Any
import asyncio

# Define multiple tools using the @tool decorator
@tool("calculate", "Perform calculations", {"expression": str})
Expand Down Expand Up @@ -239,6 +236,7 @@ When your MCP server has multiple tools, you can selectively allow them:
}
}

<<<<<<< Updated upstream
async for message in query(
prompt=message_generator(), # Use async generator for streaming input
options=ClaudeCodeOptions(
Expand All @@ -252,6 +250,17 @@ When your MCP server has multiple tools, you can selectively allow them:
):
if hasattr(message, 'result'):
print(message.result)
=======
async def main():
async with ClaudeSDKClient(options=options) as client:
await client.query("Calculate 5 + 3 and translate 'hello' to Spanish")

# Process messages
async for msg in client.receive_response():
print(msg)

asyncio.run(main())
>>>>>>> Stashed changes
```
</CodeGroup>

Expand Down
6 changes: 3 additions & 3 deletions content/claude-code-docs/sdk/modifying-system-prompts.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ The `appendSystemPrompt` option adds your custom instructions to the default sys
```

```python Python
from anthropic_claude_code import query
from claude_code_sdk import query

messages = []

Expand Down Expand Up @@ -176,7 +176,7 @@ The `customSystemPrompt` option replaces the entire default system prompt with y
```

```python Python
from anthropic_claude_code import query
from claude_code_sdk import query

custom_prompt = """You are a Python coding specialist.
Follow these guidelines:
Expand Down Expand Up @@ -279,7 +279,7 @@ You can combine these methods for maximum flexibility:
```

```python Python
from anthropic_claude_code import query
from claude_code_sdk import query

# Assuming "Code Reviewer" output style is active (via /output-style)
# Add session-specific focus areas
Expand Down
4 changes: 2 additions & 2 deletions content/claude-code-docs/sdk/sdk-cost-tracking.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ When Claude executes tools, the usage reporting differs based on whether tools a
```

```python Python
from anthropic_claude_code import query
from claude_code_sdk import query

# Example: Tracking usage in a conversation
async def track_usage(message):
Expand Down Expand Up @@ -187,7 +187,7 @@ Here's a complete example of implementing a cost tracking system:
```

```python Python
from anthropic_claude_code import query
from claude_code_sdk import query
from datetime import datetime

class CostTracker:
Expand Down
6 changes: 3 additions & 3 deletions content/claude-code-docs/sdk/sdk-mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Configure MCP servers in `.mcp.json` at your project root:
```

```python Python
from anthropic_claude_code import query
from claude_code_sdk import query

async for message in query(
prompt="List files in my project",
Expand Down Expand Up @@ -201,7 +201,7 @@ MCP servers can expose resources that Claude can list and read:
```

```python Python
from anthropic_claude_code import query
from claude_code_sdk import query

# List available resources
async for message in query(
Expand Down Expand Up @@ -301,7 +301,7 @@ Handle MCP connection failures gracefully:
```

```python Python
from anthropic_claude_code import query
from claude_code_sdk import query

async for message in query(
prompt="Process data",
Expand Down
6 changes: 3 additions & 3 deletions content/claude-code-docs/sdk/sdk-permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Set the mode when creating a query:
```

```python Python
from anthropic_claude_code import query
from claude_code_sdk import query

result = await query(
prompt="Help me refactor this code",
Expand Down Expand Up @@ -187,7 +187,7 @@ Change the mode during a streaming session:
```

```python Python
from anthropic_claude_code import query
from claude_code_sdk import query

async def stream_input():
"""Async generator for streaming input"""
Expand Down Expand Up @@ -347,7 +347,7 @@ Here's a complete example showing how to implement interactive tool approval:
```

```python Python
from anthropic_claude_code import query
from claude_code_sdk import query

async def prompt_for_tool_approval(tool_name: str, input_params: dict):
print(f"\n🔧 Tool Request:")
Expand Down
Loading