@zuke/claude

← API reference

`@zuke/claude` — a typed [Claude Code](https://docs.claude.com/en/docs/claude-code)

Symbols

# ClaudeCommandSettings class
class ClaudeCommandSettings extends SubcommandSettings

Shared builder for claude <group> … subcommand groups (mcp, config): name the verb and operands with .command(...) and pass anything else with .flag(...).

# ClaudeConfigSettings class
class ClaudeConfigSettings extends ClaudeCommandSettings

Settings for a claude config … invocation (manage configuration).

# ClaudeInputFormat type
type ClaudeInputFormat = text | stream-json

Input format for a headless claude --print run (--input-format).

# ClaudeMcpSettings class
class ClaudeMcpSettings extends ClaudeCommandSettings

Settings for a claude mcp … invocation (manage MCP servers).

# ClaudeOutputFormat type
type ClaudeOutputFormat = text | json | stream-json

Output format for a headless claude --print run (--output-format).

# ClaudePermissionMode type
type ClaudePermissionMode = default | acceptEdits | bypassPermissions | plan

Permission mode for a run (--permission-mode).

# ClaudeRunSettings class
class ClaudeRunSettings extends ToolSettings

Settings for a non-interactive claude --print run — the build-friendly way to send a single prompt and capture the response.

MemberSignatureDoc
prompt prompt(text: string): this The prompt to run non-interactively. Required.
model model(id: string): this Pin the model by name or alias, e.g. model("sonnet") (--model).
fallbackModel fallbackModel(id: string): this Model to fall back to when the primary is overloaded (--fallback-model).
outputFormat outputFormat(format: ClaudeOutputFormat): this Shape of the printed response (--output-format).
inputFormat inputFormat(format: ClaudeInputFormat): this Shape of the supplied input (--input-format).
allowedTools allowedTools(...tools: string[]): this Allow only these tools, comma-joined into --allowedTools. Repeatable.
disallowedTools disallowedTools(...tools: string[]): this Deny these tools, comma-joined into --disallowedTools. Repeatable.
addDir addDir(...dirs: string[]): this Grant the session access to extra directories (--add-dir). Repeatable.
permissionMode permissionMode(mode: ClaudePermissionMode): this How tool permissions are handled for the run (--permission-mode).
dangerouslySkipPermissions dangerouslySkipPermissions(): this Bypass all permission prompts (--dangerously-skip-permissions).
appendSystemPrompt appendSystemPrompt(text: string): this Append text to the system prompt (--append-system-prompt).
maxTurns maxTurns(turns: number): this Cap the number of agentic turns (--max-turns).
mcpConfig mcpConfig(pathOrJson: string): this MCP server configuration, as a file path or inline JSON (--mcp-config).
settings settings(pathOrJson: string): this Settings, as a file path or inline JSON (--settings).
sessionId sessionId(id: string): this Run under a specific session id (--session-id).
continueSession continueSession(): this Continue the most recent conversation (--continue).
resume resume(sessionId?: string): this Resume a conversation, optionally by session id (--resume).
verbose verbose(): this Emit verbose logging (--verbose).
# ClaudeTasks const
const ClaudeTasks: ClaudeTasksApi

Typed task functions for the Claude Code CLI.

# ClaudeTasksApi interface
interface ClaudeTasksApi

The shape of ClaudeTasks.

MemberSignatureDoc
run run(configure?: Configure<ClaudeRunSettings>): Promise<CommandOutput> Run a prompt non-interactively (claude --print).
mcp mcp(configure?: Configure<ClaudeMcpSettings>): Promise<CommandOutput> Manage MCP servers (claude mcp …).
config config(configure?: Configure<ClaudeConfigSettings>): Promise<CommandOutput> Manage configuration (claude config …).
update update(configure?: Configure<ClaudeUpdateSettings>): Promise<CommandOutput> Self-update the CLI (claude update).
# ClaudeUpdateSettings class
class ClaudeUpdateSettings extends ToolSettings

Settings for claude update (self-update the CLI).