zuke.tools.claude

← Python API reference

@zuke/claude 1.1.2: @zuke/claude — a typed [Claude Code](https://docs.claude.com/en/docs/claude-code) CLI (claude) task wrapper for Zuke builds.

Symbols

#

ClaudeCommandSettings

class
class ClaudeCommandSettings(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(ClaudeCommandSettings)

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

#

ClaudeMcpSettings

class
class ClaudeMcpSettings(ClaudeCommandSettings)

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

#

ClaudeRunSettings

class
class ClaudeRunSettings(ToolSettings)

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

  • prompt(text: str) -> Self

    The prompt to run non-interactively. Required.

  • model(id: str) -> Self

    Pin the model by name or alias, e.g. model("sonnet") (--model).

  • fallback_model(id: str) -> Self

    Model to fall back to when the primary is overloaded (--fallback-model).

  • output_format(format: Literal['text', 'json', 'stream-json']) -> Self

    Shape of the printed response (--output-format).

  • input_format(format: Literal['text', 'stream-json']) -> Self

    Shape of the supplied input (--input-format).

  • allowed_tools(*tools: str) -> Self

    Allow only these tools, comma-joined into --allowedTools. Repeatable.

  • disallowed_tools(*tools: str) -> Self

    Deny these tools, comma-joined into --disallowedTools. Repeatable.

  • add_dir(*dirs: str) -> Self

    Grant the session access to extra directories (--add-dir). Repeatable.

  • permission_mode(mode: Literal['default', 'acceptEdits', 'bypassPermissions', 'plan']) -> Self

    How tool permissions are handled for the run (--permission-mode).

  • dangerously_skip_permissions() -> Self

    Bypass all permission prompts (--dangerously-skip-permissions).

  • append_system_prompt(text: str) -> Self

    Append text to the system prompt (--append-system-prompt).

  • max_turns(turns: float) -> Self

    Cap the number of agentic turns (--max-turns).

  • mcp_config(path_or_json: str) -> Self

    MCP server configuration, as a file path or inline JSON (--mcp-config).

  • settings(path_or_json: str) -> Self

    Settings, as a file path or inline JSON (--settings).

  • session_id(id: str) -> Self

    Run under a specific session id (--session-id).

  • continue_session() -> Self

    Continue the most recent conversation (--continue).

  • resume(session_id: str | None=None) -> Self

    Resume a conversation, optionally by session id (--resume).

  • verbose() -> Self

    Emit verbose logging (--verbose).

#

ClaudeTasks

class
class ClaudeTasks

Typed task functions for the Claude Code CLI.

  • static async run(ctx: ServiceContext, configure: Callable[[ClaudeRunSettings], ClaudeRunSettings] | None=None) -> ExecResult

    Run a prompt non-interactively (claude --print).

  • static async mcp(ctx: ServiceContext, configure: Callable[[ClaudeMcpSettings], ClaudeMcpSettings] | None=None) -> ExecResult

    Manage MCP servers (claude mcp …).

  • static async config(ctx: ServiceContext, configure: Callable[[ClaudeConfigSettings], ClaudeConfigSettings] | None=None) -> ExecResult

    Manage configuration (claude config …).

  • static async update(ctx: ServiceContext, configure: Callable[[ClaudeUpdateSettings], ClaudeUpdateSettings] | None=None) -> ExecResult

    Self-update the CLI (claude update).

#

ClaudeUpdateSettings

class
class ClaudeUpdateSettings(ToolSettings)

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