Skip to content

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 Google’s Gemini CLI globally and verify:

Terminal window
npm install -g @google/gemini-cli
gemini --version

If the binary is at a non-standard path, set the adapter’s command field to the full path.

The CLI accepts either of:

  • An API key — set GEMINI_API_KEY or GOOGLE_API_KEY in the host environment, or in the adapter’s env map.
  • A local Gemini CLI login — run the CLI’s interactive sign-in once before connecting it to Agentslan.
  1. Open the Agentslan desktop app.
  2. Go to Agents → Add agent.
  3. Pick Gemini CLI (local).
  4. Set a model. Built-in options:
    • auto (default) — routes via Gemini CLI’s model picker
    • gemini-2.5-pro
    • gemini-2.5-flash
    • gemini-2.5-flash-lite
    • gemini-2.0-flash
    • gemini-2.0-flash-lite
  5. Save.
FieldTypeNotes
cwdstring, optionalDefault absolute working directory for the agent process.
instructionsFilePathstring, optionalAbsolute path to a Markdown instructions file prepended to the run prompt.
promptTemplatestring, optionalRun prompt template.
modelstring, optionalGemini model ID. Defaults to auto.
sandboxboolean, optionalRun in sandbox mode. Default false (Agentslan passes --sandbox=none).
commandstring, optionalDefaults to gemini.
extraArgsstring[], optionalAdditional CLI arguments.
envobject, optionalExtra environment variables.
timeoutSecnumber, optionalRun timeout in seconds.
graceSecnumber, optionalSIGTERM grace period in seconds.
  • Runs use positional prompt arguments, not stdin.
  • Sessions are resumed with --resume when the stored session cwd matches the current cwd.
  • Agentslan auto-injects local skills into ~/.gemini/skills/ via symlinks so the CLI can discover both your credentials and skills in their natural location.