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
- Install the Gemini CLI. Follow the official installation guide from Google to get the
geminibinary on your system. - Authenticate with your Google API credentials. Gemini CLI reads credentials from your environment.
- Verify the installation by running
gemini --versionin your terminal.
Configuring Band to Use Gemini
- Open the Band dashboard and go to Settings.
- Under Coding Agent, select
gemini-clifrom the agent type dropdown. - Optionally, set a custom executable path if the
geminibinary is not on your system PATH. - 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
textfield with the assistant's response. Mapped totext-delta. - tool_use — A tool invocation with
id,name, andinputfields. - tool_result — The result of a tool call, with
tool_use_id,output, andis_errorfields. - result — Final session result with a
statusfield (either"success"or an error). - error — An error event with a
messagefield.
Configuration Options
- model — Override the default Gemini model. If not set, the CLI uses its own default.
- executablePath — Path to the
geminibinary. 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.