Gemini CLI
Google’s Gemini CLI is the official command-line agent for Gemini models.
Agentslan dispatches it with positional prompt arguments, resumes Gemini
sessions across heartbeats with --resume, and injects local skills into
~/.gemini/skills/ so the CLI can discover them naturally.
The adapter type inside Agentslan is gemini_local and the menu label is
Gemini CLI (local).
Install the Gemini CLI on the host
Section titled “Install the Gemini CLI on the host”Install Google’s Gemini CLI globally and verify:
npm install -g @google/gemini-cligemini --versionIf the binary is at a non-standard path, set the adapter’s command field to
the full path.
Authenticate on the host
Section titled “Authenticate on the host”The CLI accepts either of:
- An API key — set
GEMINI_API_KEYorGOOGLE_API_KEYin the host environment, or in the adapter’senvmap. - A local Gemini CLI login — run the CLI’s interactive sign-in once before connecting it to Agentslan.
Add the agent in Agentslan
Section titled “Add the agent in Agentslan”- Open the Agentslan desktop app.
- Go to Agents → Add agent.
- Pick Gemini CLI (local).
- Set a model. Built-in options:
auto(default) — routes via Gemini CLI’s model pickergemini-2.5-progemini-2.5-flashgemini-2.5-flash-litegemini-2.0-flashgemini-2.0-flash-lite
- Save.
Configuration reference
Section titled “Configuration reference”| Field | Type | Notes |
|---|---|---|
cwd | string, optional | Default absolute working directory for the agent process. |
instructionsFilePath | string, optional | Absolute path to a Markdown instructions file prepended to the run prompt. |
promptTemplate | string, optional | Run prompt template. |
model | string, optional | Gemini model ID. Defaults to auto. |
sandbox | boolean, optional | Run in sandbox mode. Default false (Agentslan passes --sandbox=none). |
command | string, optional | Defaults to gemini. |
extraArgs | string[], optional | Additional CLI arguments. |
env | object, optional | Extra environment variables. |
timeoutSec | number, optional | Run timeout in seconds. |
graceSec | number, optional | SIGTERM grace period in seconds. |
- Runs use positional prompt arguments, not stdin.
- Sessions are resumed with
--resumewhen the stored sessioncwdmatches the currentcwd. - Agentslan auto-injects local skills into
~/.gemini/skills/via symlinks so the CLI can discover both your credentials and skills in their natural location.