Opencode and Gemini CLI integrations?

You will need to install Node and then install Gemini CLI. Instructions below for Windows, Linux, and Mac:

:window: Windows

  1. Prerequisites
  1. Install Options
  • Quick trial (no install):

powershell

CopyEdit

npx https://github.com/google-gemini/gemini-cli
  • Global install (recommended):

powershell

CopyEdit

npm install -g @google/gemini-cli
gemini --version
  • Via winget:

powershell

CopyEdit

winget install OpenJS.NodeJS.LTS --silent
npm install -g @google/gemini-cli
  • Via Chocolatey:

powershell

CopyEdit

choco install nodejs-lts -y
elevate npm install -g @google/gemini-cli
``` :contentReference[oaicite:8]{index=8}  

  1. Authenticate & First Run

powershell

CopyEdit

setx GEMINI_API_KEY "YOUR_KEY_HERE" /m
``` :contentReference[oaicite:14]{index=14}  

:penguin: Linux (Ubuntu / Debian / others)

  1. Prerequisites
  1. Install
  • Global install via npm:

bash

CopyEdit

sudo npm install -g @google/gemini-cli
  • Or quick trial via npx:

bash

CopyEdit

npx https://github.com/google-gemini/gemini-cli
``` :contentReference[oaicite:20]{index=20}  

  1. Ubuntu Snap Desktop!
    Want a GUI? Install Gemini Desktop (unofficial):

bash

CopyEdit

sudo snap install gemini-desktop
sudo snap connect gemini-desktop:audio-record
``` :contentReference[oaicite:23]{index=23}  

  1. Authenticate
  • Run gemini and sign in (Google account free tier)
  • Or set GEMINI_API_KEY via:

bash

CopyEdit

export GEMINI_API_KEY="YOUR_KEY_HERE"
``` :contentReference[oaicite:26]{index=26}  

:apple: macOS

  1. Prerequisites
  1. Install
  • Via Homebrew (if available):

bash

CopyEdit

brew install gemini-cli

(Some unofficial guide references support; otherwise use npm)

  • Or via npm globally:

bash

CopyEdit

npm install -g @google/gemini-cli
  • Or quick test with npx:

bash

CopyEdit

npx https://github.com/google-gemini/gemini-cli
``` :contentReference[oaicite:33]{index=33}  

  1. Authenticate
  • gemini → sign in with Google → free tier
  • Or export your API key:

bash

CopyEdit

export GEMINI_API_KEY="YOUR_KEY_HERE"
``` :contentReference[oaicite:36]{index=36}  

:white_check_mark: Post‑Install Quickstart (All Platforms)

bash

CopyEdit

gemini "Explain quantum computing in simple terms"
gemini --prompt "Translate 'hello' to Spanish"
gemini --file path/to/code.js "Review this code for bugs"
  • For multimodal use, e.g., with screenshots/PDFs:

bash

CopyEdit

gemini --image screenshot.png "Describe this UI mockup"
``` :contentReference[oaicite:38]{index=38}  

:books: Additional Resources

  • Official Google announcement: “Gemini CLI: your open‑source AI agent” (Jun 25 2025) indiatimes.com+5blog.google+5gemini-cli.blog+5
  • Community & advanced usage guide (unofficial): npm-based install and multimodal workflows

Summary Table

Platform Install Method Auth Options
Windows npm / npx / winget / choco Google sign‑in or GEMINI_API_KEY
Linux npm / npx (+ optional Snap GUI) sign‑in or GEMINI_API_KEY
macOS Homebrew / npm / npx sign‑in or GEMINI_API_KEY
1 Like