Band Band

Gemini CLI

Gemini CLI is a supported coding agent in Band that integrates with Google's Gemini models. Band communicates with Gemini CLI by spawning it as a child process and reading its NDJSON (newline-delimited JSON) output stream. This adapter supports real-time streaming, tool use visibility, and skill discovery.

Prerequisites

  1. Install the Gemini CLI. Follow the official installation guide from Google to get the gemini binary on your system.
  2. Authenticate with your Google API credentials. Gemini CLI reads credentials from your environment.
  3. Verify the installation by running gemini --version in your terminal.

Configuring Band to Use Gemini

  1. Open the Band dashboard and go to Settings.
  2. Under Coding Agent, select gemini-cli from the agent type dropdown.
  3. Optionally, set a custom executable path if the gemini binary is not on your system PATH.
  4. Save your settings. New tasks will now use the Gemini CLI adapter.

How It Works

When a task is submitted, Band spawns the Gemini CLI with the --output-format stream-json flag, which tells it to emit structured events as NDJSON on stdout. Band reads each line, parses it, and maps the events to the common AgentEvent format. The CLI is spawned with stdio: ["ignore", "pipe", "pipe"] — stdin is closed, stdout is parsed for events, and stderr is logged for diagnostics.

The Gemini CLI adapter generates a random session ID for each run since Gemini does not have a native session system. This means session resume is not available.

Feature Support

Feature Supported Notes
Real-time streaming Yes Via NDJSON output
Tool use visibility Yes Tool calls and results are streamed
Skill discovery Yes Discovers skills from workspace files
Cost tracking No Gemini CLI does not report cost data
Session listing No No persistent session storage
Session resume No Each run starts a fresh session
User input prompts No All tool calls are auto-approved

Event Format

The Gemini CLI emits the following NDJSON event types that Band processes:

  • message — Contains a text field with the assistant's response. Mapped to text-delta.
  • tool_use — A tool invocation with id, name, and input fields.
  • tool_result — The result of a tool call, with tool_use_id, output, and is_error fields.
  • result — Final session result with a status field (either "success" or an error).
  • error — An error event with a message field.

Configuration Options

  • model — Override the default Gemini model. If not set, the CLI uses its own default.
  • executablePath — Path to the gemini binary. Defaults to "gemini" (found via PATH).
  • maxTurns — Maximum number of agentic turns per session (default: 50 when run through Band).

Differences from Claude Code

  • No hook-based status detection. Band only knows about Gemini activity through tasks it submits.
  • No cost data. Task result summaries will not include cost information.
  • No session history. You cannot browse previous sessions or resume them.
  • Process-based integration. Gemini CLI runs as a child process rather than through an SDK library call.