API Reference claude_code_sdk v#0.2.2

View Source

Modules

Multi-provider authentication abstraction.

Anthropic-specific authentication via claude setup-token.

AWS Bedrock authentication.

Google Vertex AI authentication.

Persistent token storage for authentication.

Authentication checker and environment validator for Claude Code SDK.

Manages authentication tokens for Claude Code SDK.

Content extraction helper for Claude Code SDK messages.

Comprehensive debugging and diagnostics for Claude Code SDK.

Simple JSON parser for Claude Code SDK.

Represents a message from Claude Code CLI.

Mock implementation for the Claude Code CLI for testing purposes.

Mock process implementation that returns predefined responses instead of spawning a CLI.

Smart option builder for Claude Code SDK configurations.

Configuration options for Claude Code SDK requests.

Concurrent query orchestration with rate limiting and error recovery.

Handles spawning and communicating with the Claude Code CLI process using erlexec.

Handles querying Claude Code and processing responses.

Helper functions for working with Claude sessions.

Persistent session storage and management.

Bidirectional streaming for interactive Claude conversations.

Parses streaming events from Claude CLI's --include-partial-messages output.

GenServer managing a persistent bidirectional streaming session with Claude.

A module for calculating factorial of non-negative integers.

Mix Tasks

Sets up a long-lived authentication token for Claude Code SDK.

Runs Elixir scripts against the live Claude API instead of using mocks.

Run the Claude Code SDK comprehensive showcase.

Runs tests against the live Claude API instead of using mocks.