Skip to main content
This example runs the official scoped Gemini CLI package inside a disposable Node.js microVM. The project is copied into the guest, while Gemini authentication and settings live in a named volume.

Run Gemini CLI

1

Start Gemini CLI

Gemini CLI first asks whether you trust the workspace. Review the copied files, then continue to authentication. The sandbox cannot directly modify the original host directory.
Install the scoped package exactly as shown: @google/gemini-cli. Do not substitute similarly named unscoped packages.
2

Start another session

After leaving Gemini CLI, return to the same sandbox and workspace with:
3

Verify the installation

Exit the TUI and run:
The pinned example prints 0.52.0.
4

Export changes

Create a patch inside the sandbox:
Copy the patch to the host:
Check that it applies cleanly before applying it:
5

Clean up

Remove the sandbox:
Remove persisted Gemini data only when you no longer need it:

Reference