Files
ninan-nn 1d3a412c4d docs: comprehensive docs site refactoring (#1090)
* docs: comprehensive docs site refactoring

- Replace 856-line manifest auto-generation with direct VitePress docs
- Restructure from flat 4-section layout to 10-section information architecture
  (Getting Started, Architecture, Guides, SDKs, Components, Kubernetes, API, CLI, Examples, Community)
- Establish single source of truth: docs/ owns user-facing content, READMEs are slim pointers
- Remove incomplete Chinese i18n (30-40% coverage), keep English only
- Add VitePress features: custom containers, code groups, edit links, footer, dark mode
- Simplify build: just `vitepress build`, no docs:sync or docs:spec preprocessing
- Add documentation rules to AGENTS.md and CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: simplify CLAUDE.md to point at AGENTS.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve 38 broken links, stale paths, and content issues across docs

- Fix 16 broken inbound links to moved docs pages (README, CONTRIBUTING,
  SECURITY, ROADMAP, GOVERNANCE, server/configuration, kubernetes/)
- Move sandbox.kill() inside async-with block in quick start and README
- Update execd paths from /opt/opensandbox/bin/ to /opt/opensandbox/
- Fix wrong batchsandbox-template GitHub raw URL
- Remove references to deleted RELEASE_NOTE_TEMPLATE and removed scripts
- Add missing cd context to server, egress, and MCP command snippets
- Add missing OSEP-0012 (multi-tenancy) and OSEP-0013 to index
- Fix timeout described as mandatory (it is optional)
- Replace duplicated contributing/code-of-conduct with GitHub pointers
- Fix broken Chinese doc references in SDK README_zh files
- Remove dead Chinese docs link from README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: align README links with versioned docs

* docs: address remaining review comments

* docs: clarify README ownership for components

* docs: fix remaining navigation and example comments

* docs: refine documentation ownership rules

* docs: remove obsolete spec doc generator

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-17 19:23:26 +08:00

2.0 KiB

title, description
title description
Gemini CLI Call Google Gemini via the @google/gemini-cli npm package in OpenSandbox.

Gemini CLI Example

Call Google Gemini via the @google/gemini-cli npm package in OpenSandbox.

Start OpenSandbox server [local]

Pre-pull the code-interpreter image (includes Node.js):

docker pull sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/code-interpreter:v1.1.0

# use docker hub
# docker pull opensandbox/code-interpreter:v1.1.0

Start the local OpenSandbox server, logs will be visible in the terminal:

uv pip install opensandbox-server
opensandbox-server init-config ~/.sandbox.toml --example docker
opensandbox-server

Create and Access the Gemini Sandbox

# Install OpenSandbox package
uv pip install opensandbox

# Run the example (requires SANDBOX_DOMAIN / SANDBOX_API_KEY / GEMINI_API_KEY)
uv run python examples/gemini-cli/main.py

The script installs the Gemini CLI (npm install -g @google/gemini-cli@latest) at runtime (Node.js is already in the code-interpreter image), then sends a simple request gemini "Compute 1+1=?.". Auth is passed via GEMINI_API_KEY; you can override endpoint/model with GEMINI_BASE_URL / GEMINI_MODEL.

Environment Variables

Variable Default Description
SANDBOX_DOMAIN localhost:8080 Sandbox service address
SANDBOX_API_KEY (optional for local) API key if your server requires authentication
SANDBOX_IMAGE sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/code-interpreter:v1.1.0 Sandbox image to use
GEMINI_API_KEY (required) Your Google Gemini API key
GEMINI_BASE_URL (optional) Gemini API endpoint (e.g., proxy)
GEMINI_MODEL gemini-2.5-flash Model to use

References