@zuke/claude
`@zuke/claude` — a typed [Claude Code](https://docs.claude.com/en/docs/claude-code)
@zuke/claude on JSR ↗ 10 symbols
Symbols
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(...).
class ClaudeConfigSettings extends ClaudeCommandSettings Settings for a claude config … invocation (manage configuration).
type ClaudeInputFormat = text | stream-json Input format for a headless claude --print run (--input-format).
class ClaudeMcpSettings extends ClaudeCommandSettings Settings for a claude mcp … invocation (manage MCP servers).
type ClaudeOutputFormat = text | json | stream-json Output format for a headless claude --print run (--output-format).
type ClaudePermissionMode = default | acceptEdits | bypassPermissions | plan Permission mode for a run (--permission-mode).
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.
| Member | Signature | Doc |
|---|---|---|
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). |
const ClaudeTasks: ClaudeTasksApi Typed task functions for the Claude Code CLI.
interface ClaudeTasksApi The shape of ClaudeTasks.
| Member | Signature | Doc |
|---|---|---|
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). |
class ClaudeUpdateSettings extends ToolSettings Settings for claude update (self-update the CLI).