{
  "manifest_version": "1",
  "slug": "gemini-cli",
  "title": "Gemini CLI",
  "headline": "Run Gemini CLI on a remote server",
  "description": "Google's Gemini CLI on your own VM: the Gemini API key held by an exe.dev integration, a tmux session that outlives your laptop, headless runs, MCP.",
  "category": "ai-agents",
  "tags": [
    "gemini cli",
    "google gemini",
    "gemini api",
    "remote development",
    "ai coding agent",
    "tmux",
    "headless",
    "mcp"
  ],
  "url": "https://exe.dev/deploy/gemini-cli",
  "markdown_url": "https://exe-staging.dev/deploy/gemini-cli.md",
  "upstream": {
    "website": "https://geminicli.com/",
    "source": "https://github.com/google-gemini/gemini-cli",
    "docs": "https://geminicli.com/docs/",
    "license": "Apache-2.0"
  },
  "example_vm_name": "my-gemini-cli",
  "time": "10 minutes",
  "stack": [
    {
      "name": "Gemini CLI",
      "detail": "@google/gemini-cli from npm, on Node.js 24",
      "data": "~/.gemini"
    },
    {
      "name": "Gemini integration",
      "detail": "exe.dev holds your Gemini API key and adds it to each request"
    },
    {
      "name": "Your project",
      "detail": "a Git repository",
      "data": "~/project"
    },
    {
      "name": "tmux",
      "detail": "keeps your terminal session running when you disconnect"
    }
  ],
  "access": [
    {
      "url": "ssh my-gemini-cli.exe.xyz",
      "who": "private",
      "what": "your terminal"
    },
    {
      "url": "https://gemini.int.exe.xyz/",
      "who": "private",
      "what": "the Gemini API, from this VM only, with your key added by exe.dev"
    }
  ],
  "delivers": [
    "Gemini CLI on Node.js 24, answering a headless `gemini -p` prompt",
    "A Gemini API key stored in an exe.dev integration, never on the VM",
    "A Git repository at `~/project` on persistent disk",
    "A `gemini` tmux session that survives disconnects"
  ],
  "deployable": true,
  "deploy": {
    "new_vm_url": "https://exe-staging.dev/new?prompt=Set%20up%20Gemini%20CLI%20on%20this%20VM%20by%20following%20the%20exe.dev%20recipe%20at%20https%3A%2F%2Fexe-staging.dev%2Fdeploy%2Fgemini-cli.md%20from%20top%20to%20bottom.%0A%0AThe%20recipe%27s%20example%20VM%20name%20is%20my-gemini-cli.%20This%20VM%27s%20name%20is%20the%20output%20of%20%60hostname%60%3A%20use%20it%20wherever%20the%20recipe%20writes%20my-gemini-cli.%20Skip%20the%20step%20that%20creates%20the%20VM%3B%20you%20are%20on%20it.%0A%0AYou%20are%20done%20when%20all%20of%20these%20are%20true.%20Check%20each%20one%20yourself%3A%0A-%20Gemini%20CLI%20on%20Node.js%2024%2C%20answering%20a%20headless%20%60gemini%20-p%60%20prompt%0A-%20A%20Gemini%20API%20key%20stored%20in%20an%20exe.dev%20integration%2C%20never%20on%20the%20VM%0A-%20A%20Git%20repository%20at%20%60~%2Fproject%60%20on%20persistent%20disk%0A-%20A%20%60gemini%60%20tmux%20session%20that%20survives%20disconnects%0A%0ARun%20the%20VM-side%20commands%20in%20%22Install%20Gemini%20CLI%22%20and%20%22Connect%20it%20to%0AGemini%22.%20Only%20the%20owner%20can%20create%20the%20Gemini%20integration%2C%20in%20their%0Abrowser%2C%20and%20the%20API%20key%20must%20never%20be%20on%20this%20VM%3A%20give%20them%20the%0Aintegration%20link%20from%20%22Connect%20it%20to%20Gemini%22%20with%20this%20VM%27s%20name%20in%20it%2C%0Aand%20wait%20until%20they%20say%20it%27s%20done.%20Never%20ask%20for%20the%20key.%20If%0A%60~%2F.gemini%2Fsettings.json%60%20already%20exists%2C%20set%20%60security.auth.selectedType%60%0Ain%20it%20instead%20of%20replacing%20the%20file.%20Create%20tmux%20detached%0A%28%60tmux%20new%20-d%20-s%20gemini%20-c%20~%2Fproject%60%29%20rather%20than%20attaching%2C%20and%20reuse%0Athe%20session%20if%20it%20exists.%20Do%20not%20launch%20interactive%20Gemini%20CLI%3B%20leave%20the%0Afolder-trust%20question%20to%20the%20owner.%20Verify%20with%0A%60curl%20-fsS%20https%3A%2F%2Fgemini.int.exe.xyz%2Fv1beta%2Fmodels%20%3E%2Fdev%2Fnull%60%20and%2C%20from%0A~%2Fproject%2C%20%60gemini%20--skip-trust%20-m%20flash-lite%20-p%20%22Reply%20with%20exactly%3A%20OK%22%60%2C%20and%0Acheck%20%60tmux%20has-session%20-t%20gemini%60.%20Skip%20the%20later%20optional%20sections%20and%0AFAQ.%20Finish%20with%20the%20SSH%20command%20from%20%22Take%20a%20break%22%2C%20using%20this%20VM%27s%0Aname%2C%20and%20tell%20the%20owner%20to%20run%20%60gemini%60%20inside%20it.%0A%0AFinish%20with%20the%20URLs%20I%20should%20open.%0A",
    "terminal": "curl -fsSL https://exe-staging.dev/deploy/gemini-cli/prompt.txt | ssh exe.dev new --prompt=/dev/stdin",
    "prompt": "Set up Gemini CLI on this VM by following the exe.dev recipe at https://exe-staging.dev/deploy/gemini-cli.md from top to bottom.\n\nThe recipe's example VM name is my-gemini-cli. This VM's name is the output of `hostname`: use it wherever the recipe writes my-gemini-cli. Skip the step that creates the VM; you are on it.\n\nYou are done when all of these are true. Check each one yourself:\n- Gemini CLI on Node.js 24, answering a headless `gemini -p` prompt\n- A Gemini API key stored in an exe.dev integration, never on the VM\n- A Git repository at `~/project` on persistent disk\n- A `gemini` tmux session that survives disconnects\n\nRun the VM-side commands in \"Install Gemini CLI\" and \"Connect it to\nGemini\". Only the owner can create the Gemini integration, in their\nbrowser, and the API key must never be on this VM: give them the\nintegration link from \"Connect it to Gemini\" with this VM's name in it,\nand wait until they say it's done. Never ask for the key. If\n`~/.gemini/settings.json` already exists, set `security.auth.selectedType`\nin it instead of replacing the file. Create tmux detached\n(`tmux new -d -s gemini -c ~/project`) rather than attaching, and reuse\nthe session if it exists. Do not launch interactive Gemini CLI; leave the\nfolder-trust question to the owner. Verify with\n`curl -fsS https://gemini.int.exe.xyz/v1beta/models \u003e/dev/null` and, from\n~/project, `gemini --skip-trust -m flash-lite -p \"Reply with exactly: OK\"`, and\ncheck `tmux has-session -t gemini`. Skip the later optional sections and\nFAQ. Finish with the SSH command from \"Take a break\", using this VM's\nname, and tell the owner to run `gemini` inside it.\n\nFinish with the URLs I should open.\n",
    "prompt_url": "https://exe-staging.dev/deploy/gemini-cli/prompt.txt"
  },
  "updated": "2026-10-28",
  "verified": "2026-10-28",
  "related": [
    "codex",
    "claude-code",
    "opencode",
    "exe-mcp",
    "openclaw",
    "hermes-agent"
  ]
}
