zuke.tools.gemini

← Python API reference

@zuke/gemini 1.1.2: @zuke/gemini — a typed [Gemini CLI](https://github.com/google-gemini/gemini-cli) (gemini) task wrapper for Zuke builds.

Symbols

#

GeminiCommandSettings

class
class GeminiCommandSettings(SubcommandSettings)

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

#

GeminiExtensionsSettings

class
class GeminiExtensionsSettings(GeminiCommandSettings)

Settings for a gemini extensions … invocation (manage extensions).

#

GeminiMcpSettings

class
class GeminiMcpSettings(GeminiCommandSettings)

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

#

GeminiRunSettings

class
class GeminiRunSettings(ToolSettings)

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

  • prompt(text: str) -> Self

    The prompt to run non-interactively (--prompt). Required.

  • model(id: str) -> Self

    Pin the model, e.g. model("gemini-2.5-pro") (--model).

  • sandbox() -> Self

    Run tools inside a sandbox (--sandbox).

  • sandbox_image(image: str) -> Self

    Container image to use for the sandbox (--sandbox-image).

  • all_files() -> Self

    Include all files in the context (--all-files).

  • yolo() -> Self

    Automatically approve all tool calls (--yolo).

  • approval_mode(mode: Literal['default', 'auto_edit', 'yolo', 'plan']) -> Self

    How tool calls are approved (--approval-mode).

  • include_directories(*dirs: str) -> Self

    Add directories to the workspace context (--include-directories). Repeatable.

  • extensions(*names: str) -> Self

    Restrict to these extensions (--extensions). Repeatable.

  • allowed_tools(*names: str) -> Self

    Allow only these tools (--allowed-tools). Repeatable.

  • allowed_mcp_server_names(*names: str) -> Self

    Allow only these MCP servers (--allowed-mcp-server-names). Repeatable.

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

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

  • debug() -> Self

    Emit debug output (--debug).

  • checkpointing() -> Self

    Enable checkpointing of file edits (--checkpointing).

  • show_memory_usage() -> Self

    Report memory usage in the status bar (--show-memory-usage).

#

GeminiTasks

class
class GeminiTasks

Typed task functions for the Gemini CLI.

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

    Run a prompt non-interactively (gemini --prompt).

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

    Manage MCP servers (gemini mcp …).

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

    Manage extensions (gemini extensions …).