Deploy SAM

Gemini CLI

Google's terminal agent with a Gemini API key

Google's open-source command-line coding agent. Add a Gemini API key and SAM runs it in your workspace with Gemini 4 and Gemini 3 models.

  • Gemini 4 Argon
  • Gemini 3.8 Flash
  • Gemini 3.1 Pro Preview
  • Gemini 3.5 Flash-Lite

What you get

Gemini 4 and Gemini 3

Choose Gemini 4 Argon, Gemini 3.8 Flash, Gemini 3.1 Pro Preview or a lighter Flash-Lite model per profile.

API key sign-in

Add a key from Google AI Studio. SAM injects it into the workspace when the agent starts.

Your toolchain

Gemini CLI runs inside your repository's devcontainer with the same runtimes and test tools your team uses.

A project chat in SAM: the user asks for a ledger migration, the agent replies with a plan, and each file read, edit and test command appears as an expandable step.A project chat in SAM: the user asks for a ledger migration, the agent replies with a plan, and each file read, edit and test command appears as an expandable step.
Every agent, Gemini CLI included, streams its work into project chat, where you can follow and steer it. Full size

Set it up in 3 steps

  1. Add your API key

    Paste a Gemini API key in Settings → Agents.

  2. Pick a profile

    Choose Gemini CLI and a model in an agent profile.

  3. Start a chat or task

    SAM places the work on a machine and starts Gemini CLI in your devcontainer.

Good for

Cost-sensitive batches

Use Flash or Flash-Lite models for many small tasks, such as adding types or fixing lint.

Comparing agents

Run the same task with Gemini CLI and another agent and compare the results.

Questions

Which models can I choose?

Gemini 4 Argon and the Gemini 3 models, such as Gemini 3.8 Flash and Gemini 3.1 Pro Preview. Gemini 2.5 remains for existing users until Google retires it.

Can I sign in with a Google account instead of a key?

Not yet. SAM signs Gemini CLI in with a Gemini API key.

Where does Gemini CLI run?

On a cloud VM, inside your repository's devcontainer, using a cloud account connected to your SAM installation. A profile can choose an Instant session on Cloudflare Containers instead, which needs no cloud account but does not use your devcontainer.


Get your coding agents off your laptop

SAM is open source. Deploy it to your Cloudflare account and connect your agent. Add a cloud provider when you want full environments on your own servers.