Documentation

Claude Agent SDK Python Docs CLI

claude-agent-sdk-python-docs-pp-cli

Install

npx -y @mvanhorn/printing-press-library install claude-agent-sdk-python-docs

Installs the CLI binary and the agent skill for Claude Code, Codex, Cursor, Gemini CLI, Copilot, and more. Add --cli-only or --skill-only for one half. Requires Node.

Documentation

A source-grounded CLI for exploring and verifying the Claude Agent SDK Python docs.

Fetch the raw Claude Code docs index, search the Python Agent SDK reference, and extract exact symbols, examples, and citations. Novel verification and context commands help agents use the SDK without guessing.

Quick Start

# Verify the CLI and local configuration without network or docs writes.
claude-agent-sdk-python-docs-pp-cli doctor --dry-run

# Fetch the docs index and Python Agent SDK page through the generated docs endpoints.
claude-agent-sdk-python-docs-pp-cli sync --resources pages --full

# Find the exact docs page and section for an SDK option or type.
claude-agent-sdk-python-docs-pp-cli search "ClaudeAgentOptions" --type pages --agent --select items.title,items.url

# Read a symbol with its anchor, examples, and citations.
claude-agent-sdk-python-docs-pp-cli symbol ClaudeSDKClient --agent

# Build a compact task bundle for an agent implementing SDK custom tools.
claude-agent-sdk-python-docs-pp-cli context "custom tools" --agent --select sections.title,examples.code,citations.url

Unique Features

These capabilities aren't available in any other tool for this API.

Docs-grounded verification

  • verify — Check Python code imports and qualified names against documented Claude Agent SDK symbols.

    Use this before trusting generated SDK code or reviewing a PR that imports claude_agent_sdk.

    claude-agent-sdk-python-docs-pp-cli verify ./src --agent
    
  • diff — Compare current docs entity hashes against an optional baseline file.

    Use this to detect whether SDK docs facts have changed against a saved baseline.

    claude-agent-sdk-python-docs-pp-cli diff --since latest --agent
    
  • audit-links — Validate internal anchors, guide links, and section references in the fetched docs corpus.

    Use this before relying on context bundles or citations in generated code reviews.

    claude-agent-sdk-python-docs-pp-cli audit-links --agent
    

Agent-native context

  • context — Build a compact source-cited docs bundle for one SDK implementation task.

    Use this when an agent needs exact docs context without loading full Markdown pages.

    claude-agent-sdk-python-docs-pp-cli context "custom tools" --agent --select sections.title,examples.code,citations.url
    
  • recipe — Compose a deterministic implementation scaffold from documented snippets and exact signatures.

    Use this when you need a copyable starting point constrained to documented SDK patterns.

    claude-agent-sdk-python-docs-pp-cli recipe "streaming ClaudeSDKClient" --agent
    

SDK surface intelligence

  • map — Map functions, classes, types, options, tools, hooks, and message blocks by entity type.

    Use this to discover the available SDK surface before choosing an implementation path.

    claude-agent-sdk-python-docs-pp-cli map --kind classes,types,options --agent
    
  • coverage examples — Report which documented symbols have extracted examples and which do not.

    Use this to find example-backed SDK APIs and documentation coverage gaps.

    claude-agent-sdk-python-docs-pp-cli coverage examples --agent
    

Recipes

Find the right option fields for a client setup

claude-agent-sdk-python-docs-pp-cli search "ClaudeAgentOptions" --type pages --agent --select items.title,items.url,items.snippet

Returns only the high-signal fields an agent needs instead of the full reference page.

Build a custom-tools implementation bundle

claude-agent-sdk-python-docs-pp-cli context "custom tools" --agent --select sections.title,examples.code,citations.url

Pairs --agent with --select so downstream agents get just examples, section titles, and citations.

Verify a Python project against current docs

claude-agent-sdk-python-docs-pp-cli verify ./src --agent

Flags undocumented Claude Agent SDK Python identifiers with source citations.

Inspect documented SDK surface area

claude-agent-sdk-python-docs-pp-cli map --kind classes,types,options --agent

Shows the SDK inventory by entity type before writing code.

Usage

Run claude-agent-sdk-python-docs-pp-cli --help for the full command reference and flag list.

Commands

pages

Fetch Claude Agent SDK documentation pages

  • claude-agent-sdk-python-docs-pp-cli pages custom-tools - Fetch the Agent SDK custom tools guide
  • claude-agent-sdk-python-docs-pp-cli pages index - Fetch the Claude Code documentation index
  • claude-agent-sdk-python-docs-pp-cli pages mcp - Fetch the Agent SDK MCP guide
  • claude-agent-sdk-python-docs-pp-cli pages overview - Fetch the Agent SDK overview
  • claude-agent-sdk-python-docs-pp-cli pages permissions - Fetch the Agent SDK permissions guide
  • claude-agent-sdk-python-docs-pp-cli pages python - Fetch the Python Agent SDK reference
  • claude-agent-sdk-python-docs-pp-cli pages quickstart - Fetch the Agent SDK quickstart
  • claude-agent-sdk-python-docs-pp-cli pages sessions - Fetch the Agent SDK sessions guide
  • claude-agent-sdk-python-docs-pp-cli pages structured-outputs - Fetch the Agent SDK structured output guide

Output Formats

# Raw Markdown response (binary response; use read/search/context for structured output)
claude-agent-sdk-python-docs-pp-cli pages custom-tools

# Dry run — show the request without sending
claude-agent-sdk-python-docs-pp-cli pages custom-tools --dry-run

# Structured agent output
claude-agent-sdk-python-docs-pp-cli context "custom tools" --agent --select sections.title,examples.code,citations.url

Agent Usage

This CLI is designed for AI agent consumption:

  • Non-interactive - never prompts, every input is a flag
  • Pipeable - --json output to stdout, errors to stderr
  • Filterable - --select id,name returns only fields you need
  • Previewable - --dry-run shows the request without sending
  • Read-only by default - this CLI does not create, update, delete, publish, send, or mutate remote resources
  • Agent-friendly - docs intelligence commands return structured JSON with --agent and --select
  • Agent-safe by default - no colors or formatting unless --human-friendly is set

Exit codes: 0 success, 2 usage error, 3 not found, 5 API error, 7 rate limited, 10 config error.

Freshness

The generated pages endpoints and hand-authored docs intelligence commands read the public Claude Code docs over HTTPS. The docs intelligence commands intentionally reject --data-source local; use --data-source auto or --data-source live for those commands.

For structured retrieval, prefer read, search, symbol, examples, guide, or context over raw pages binary endpoints.

Health Check

claude-agent-sdk-python-docs-pp-cli doctor

Verifies configuration and connectivity to the API.

Configuration

Config file: ~/.config/claude-agent-sdk-python-docs-pp-cli/config.json

Static request headers can be configured under headers; per-command header overrides take precedence.

Troubleshooting

Not found errors (exit code 3)

  • Check the page key or symbol spelling.
  • Run claude-agent-sdk-python-docs-pp-cli map --agent to see documented symbols.

API-specific

  • Search returns no results. — Try a more specific SDK symbol, such as ClaudeSDKClient or ClaudeAgentOptions.
  • A symbol seems missing. — Run claude-agent-sdk-python-docs-pp-cli map --kind classes,types,options --agent to inspect the parsed docs surface.
  • Generated code uses an undocumented SDK name. — Run claude-agent-sdk-python-docs-pp-cli verify ./path --agent and follow the cited replacement or docs link.

For agents: pass /documentation/claude-agent-sdk-python-docs/agents.md to install this CLI from a prompt.