Appearance
Gemini CLI
The gemini-cli template ships Google's Gemini CLI preinstalled.
Setup
bash
pip install ovrin
export OVRIN_API_KEY="ovrin_..."Run the agent
python
import ovrin
client = ovrin.Client() # reads OVRIN_API_KEY
sandbox = client.sandboxes.create(
template="gemini-cli",
env={"GEMINI_API_KEY": "..."},
timeout=1800,
)
result = sandbox.run('gemini -p "Compute 1+1 and explain it"')
print(result.stdout)
sandbox.kill()Work on a repository
python
sandbox.files.write("/workspace/app.py", open("app.py").read())
result = sandbox.run(
'cd /workspace && gemini -p "document every function in app.py"',
timeout=600,
)
print(sandbox.files.read("/workspace/app.py"))Auth
| Variable | Purpose |
|---|---|
GEMINI_API_KEY | Google AI Studio API key |
GEMINI_BASE_URL | Point at a proxy or gateway |
GEMINI_MODEL | Override the default model |
Related
- Agent environments — every template and its auth
- Claude Code — the same shape with Anthropic's CLI