HUB
Sign inSign up
gemini-cli logo

swaleio/gemini-cli

By swaleio

•Updated 1 day ago

Google's Gemini CLI, run unattended in Swale workflows. Backs the gemini-cli task.

Image
0

333

swaleio/gemini-cli repository overview

⁠gemini-cli

Swale-built image backing the gemini-cli task definition. It runs Gemini CLI⁠, Google's coding agent, once and unattended in a directory the caller names, and emits the agent's final answer as a task output.

  • Base: node:24-trixie-slim
  • Installed: Gemini CLI from Google's npm package @google/gemini-cli, at the version pinned in the Dockerfile⁠, plus git and ripgrep
  • User: non-root swale (uid 1000)
  • Updates and usage statistics: off, in the system settings file /etc/gemini-cli/settings.json, which outranks every other settings file
  • WORKDIR /mnt/workspace, ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

⁠Invocation

The entrypoint takes no arguments. It reads the task's inputs from the platform's INPUT_* environment variables, changes into INPUT_DIRECTORY and runs gemini --skip-trust --output-format json with the prompt as one argument and stdin closed. Run unattended, Gemini CLI refuses a folder nobody has marked as trusted, so the directory is trusted for the run.

Input envEffect
INPUT_PROMPTThe instructions, passed as a single --prompt. Required.
INPUT_DIRECTORYThe full path the agent works in. Required.
INPUT_MODELThe model, passed as --model. Required.
INPUT_API_KEYExported as GEMINI_API_KEY when set: a Gemini API key. Pass a secret.
INPUT_PERMISSIONread: no edits and no commands (--approval-mode default). edit (default): file edits, no commands (auto_edit). full: everything (yolo). Anything that would ask for approval is refused.
INPUT_RESULT_PATHWhen set, the final answer is also written to this file.
INPUT_MAX_MINUTESThe run stops after this many minutes (default 60) and the task fails.

⁠Output

After a successful run, the entrypoint appends

result=<the final answer as a JSON string>

to $WORKFLOW_TASK_OUTPUT. The consuming task must declare a result output.

⁠Tags

Each tag is the version of Gemini CLI the image packages, such as 0.72.0. A rebuild that keeps that version, to pick up a fixed base image or wrapper, adds -r1, -r2, and so on. A tag is never reused; latest follows the newest publish.

⁠Building

From the repository root:

docker build -t swaleio/gemini-cli:dev images/gemini-cli

Merging a change under images/gemini-cli publishes the image under its next tag; task definitions reference it by digest.


Built from images/gemini-cli⁠ in the swaleio/task-definitions⁠ repository. For how a task definition references an image, see the task definition reference⁠ in the Swale documentation⁠.

Gemini CLI is a product of Google. This image is built by Swale; Google does not build, endorse or support it.

The Dockerfile and entrypoint are covered by the MIT License⁠. Gemini CLI is Apache-2.0-licensed.

This image also contains software from other projects, each under its own license. The license texts those projects ship are inside the image: /usr/share/doc/<package>/copyright for Debian packages, /usr/local/LICENSE for Node.js and the directory of each npm package under /usr/local/lib/node_modules. node-pty's Linux build ships none, so its project's license is in /usr/share/licenses/node-pty. Source code for its GPL and LGPL components: https://snapshot.debian.org/package/<source-package>/<version>/. We also provide that source code on request: see Third-party software⁠.

Tag summary
Recent tags
Content type
Image
Digest
sha256:cb171daf8…
Size
136.6 MB
Last updated
1 day ago
docker pull swaleio/gemini-cli:latest