Skip to content

Instantly share code, notes, and snippets.

@costa
Last active March 6, 2026 15:55
Show Gist options
  • Select an option

  • Save costa/452a6d1156eb11a4210af3c2577bf03e to your computer and use it in GitHub Desktop.

Select an option

Save costa/452a6d1156eb11a4210af3c2577bf03e to your computer and use it in GitHub Desktop.
gemini.google.com (a genAI) "gemini cli" docker (restricted) runner script -- to be run in a project root directory
#!/bin/bash -e
cwd="$( pwd )"
test -t 0 && tty_opt=t
docker run --rm -i$tty_opt -v "$HOME/.gemini:/root/.gemini" -v "$cwd:$cwd" -w "$cwd" node npx @google/gemini-cli
@costa
Copy link
Author

costa commented Mar 6, 2026

consider another option for the command line above:
docker run --rm -i$tty_opt -v "$cwd:$cwd" -w "$cwd" -e "GEMINI_CLI_HOME=$cwd" node npx -y @google/gemini-cli "$@"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment