@zuke/gemini
`@zuke/gemini` — a typed [Gemini CLI](https://github.com/google-gemini/gemini-cli)
@zuke/gemini on JSR ↗ 8 symbols
Symbols
type GeminiApprovalMode = default | auto_edit | yolo | plan Approval mode for tool calls (--approval-mode).
class GeminiCommandSettings extends SubcommandSettings Shared builder for gemini <group> … subcommand groups (mcp, extensions): name the verb and operands with .command(...) and pass anything else with .flag(...).
class GeminiExtensionsSettings extends GeminiCommandSettings Settings for a gemini extensions … invocation (manage extensions).
class GeminiMcpSettings extends GeminiCommandSettings Settings for a gemini mcp … invocation (manage MCP servers).
type GeminiOutputFormat = text | json | stream-json Output format for a non-interactive run (--output-format).
class GeminiRunSettings extends ToolSettings Settings for a non-interactive gemini --prompt 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 (--prompt). Required. |
model | model(id: string): this | Pin the model, e.g. model("gemini-2.5-pro") (--model). |
sandbox | sandbox(): this | Run tools inside a sandbox (--sandbox). |
sandboxImage | sandboxImage(image: string): this | Container image to use for the sandbox (--sandbox-image). |
allFiles | allFiles(): this | Include all files in the context (--all-files). |
yolo | yolo(): this | Automatically approve all tool calls (--yolo). |
approvalMode | approvalMode(mode: GeminiApprovalMode): this | How tool calls are approved (--approval-mode). |
includeDirectories | includeDirectories(...dirs: string[]): this | Add directories to the workspace context (--include-directories). Repeatable. |
extensions | extensions(...names: string[]): this | Restrict to these extensions (--extensions). Repeatable. |
allowedTools | allowedTools(...names: string[]): this | Allow only these tools (--allowed-tools). Repeatable. |
allowedMcpServerNames | allowedMcpServerNames(...names: string[]): this | Allow only these MCP servers (--allowed-mcp-server-names). Repeatable. |
outputFormat | outputFormat(format: GeminiOutputFormat): this | Shape of the printed response (--output-format). |
debug | debug(): this | Emit debug output (--debug). |
checkpointing | checkpointing(): this | Enable checkpointing of file edits (--checkpointing). |
showMemoryUsage | showMemoryUsage(): this | Report memory usage in the status bar (--show-memory-usage). |
const GeminiTasks: GeminiTasksApi Typed task functions for the Gemini CLI.
interface GeminiTasksApi The shape of GeminiTasks.
| Member | Signature | Doc |
|---|---|---|
run | run(configure?: Configure<GeminiRunSettings>): Promise<CommandOutput> | Run a prompt non-interactively (gemini --prompt). |
mcp | mcp(configure?: Configure<GeminiMcpSettings>): Promise<CommandOutput> | Manage MCP servers (gemini mcp …). |
extensions | extensions(configure?: Configure<GeminiExtensionsSettings>): Promise<CommandOutput> | Manage extensions (gemini extensions …). |