API Reference ClaudeCode v#0.36.4

View Source

Modules

Elixir SDK for Claude Code CLI.

Behaviour for ClaudeCode adapters.

Distributed adapter that runs Adapter.Port on a remote BEAM node.

Struct and builder for custom subagent configurations.

Type definitions for control protocol responses.

Utilities for working with content blocks in Claude messages.

Represents a compaction content block within a Claude message.

Represents a container upload content block within a Claude message.

Represents a document content block within a Claude message.

Represents an image content block within a Claude message.

Represents an MCP tool result content block within a Claude message.

Represents an MCP tool use content block within a Claude message.

Represents a redacted thinking content block within a Claude message.

Represents a server-side tool result content block within a Claude message.

Represents a server-side tool use content block within a Claude message.

Represents a text content block within a Claude message.

Represents a thinking content block within a Claude message.

Represents a tool result content block within a Claude message.

Represents a tool use content block within a Claude message.

Utilities for reading and parsing Claude Code session history files.

Metadata about a Claude Code session, extracted from session file stat + head/tail reads.

A message from a session's conversation history, built via parentUuid chain walking.

Behaviour for hook callbacks.

Top-level hook output struct returned to the CLI.

Signals that the hook will respond asynchronously.

Hook-specific output for Notification events.

Hook-specific output for PermissionRequest events.

Hook-specific output for PostToolUse events.

Hook-specific output for PostToolUseFailure events.

Hook-specific output for PreCompact events.

Hook-specific output for PreToolUse events.

Hook-specific output for SessionStart events.

Hook-specific output for SubagentStart events.

Hook-specific output for UserPromptSubmit events.

Allows a tool to execute, optionally with modified input or updated permissions.

Denies a tool from executing, with an optional message and interrupt flag.

Integration with the Model Context Protocol (MCP).

Macro for generating MCP tool modules from a concise DSL.

Status information for an MCP server connection.

Utilities for working with messages from the Claude CLI.

Represents an assistant message from the Claude CLI.

Represents an authentication status message from the Claude CLI.

Represents a partial assistant message from the Claude CLI when using partial message streaming.

Represents a prompt suggestion message from the Claude CLI.

Represents a rate limit event from the Claude CLI.

Represents a result message from the Claude CLI.

Umbrella module for system message subtypes from the Claude CLI.

Represents a conversation compaction boundary message from the Claude CLI.

Represents an elicitation complete message from the Claude CLI.

Represents a files persisted event from the Claude CLI.

Represents a hook progress system message from the Claude CLI.

Represents a hook response system message from the Claude CLI.

Represents a hook started system message from the Claude CLI.

Represents the session initialization system message from the Claude CLI.

Represents a local command output message from the Claude CLI.

Represents a status message from the Claude CLI.

Represents a task notification system message from the Claude CLI.

Represents a task progress system message from the Claude CLI.

Represents a task started system message from the Claude CLI.

Represents a tool progress message from the Claude CLI.

Represents a tool use summary message from the Claude CLI.

Represents a user message from the Claude CLI.

Model-related types: info, usage tracking, and effort levels.

Effort level for controlling how much effort Claude puts into its response.

Information about an available model.

Per-model token usage statistics from the Claude CLI.

Session option validation, CLI flag conversion, and configuration guide.

Plugin management functions wrapping the claude plugin CLI commands.

Marketplace management functions wrapping claude plugin marketplace CLI commands.

Top-level sandbox configuration struct.

Filesystem isolation settings for sandbox configuration.

Network isolation settings for sandbox configuration.

Public API for interacting with Claude Code sessions.

Information about the authenticated user's account.

Information about an available subagent.

Represents a permission denial from the Claude CLI.

Permission mode for controlling how Claude handles permission requests.

Information about an available skill (invoked via /command syntax).

Stream utilities for handling Claude Code responses.

Supervisor for managing multiple ClaudeCode sessions.

Req.Test-style test helpers for ClaudeCode.

Token usage statistics from the Claude API.

Mix Tasks

Runs claude setup-token using the resolved CLI binary.

Installs the Claude CLI binary.

Prints the path to the resolved Claude CLI binary.

Removes the bundled Claude CLI binary.