Skip to Content
New to Genbox? Check out our Getting Started guide
Commandsgemini

gb gemini

Start or attach to a Gemini AI session. Gemini is Google’s AI assistant, offering fast response times and strong coding capabilities.

Shortcut

gbg # Equivalent to: gb gemini gbgd # Equivalent to: gb gemini --direct

Synopsis

gb gemini [options] gb gemini [subcommand] [args]

Description

The gemini command provides a streamlined interface to start Gemini CLI sessions on genboxes (cloud or local) or directly on your machine. Sessions are persistent and can be detached/reattached using dtach.

Options

OptionDescription
--on <genbox>Use a specific genbox
--directRun directly on this machine (no isolation)
-y, --yesSkip confirmation prompts
-p, --prompt-modeInteractive prompt mode with optional images
-e, --editorUse $EDITOR for prompt input (with -p)
-b, --backgroundRun session in background (with -p)

Subcommands

SubcommandDescription
listList all Gemini sessions
attach <session>Attach to an existing session
stop <session>Stop a session
kill <session>Kill/destroy a session
migrate <session>Migrate session to another genbox

Examples

Basic Usage

# Interactive mode - shows menu to select genbox gb gemini # Use a specific genbox gb gemini --on dusty-summit # Run directly on your machine (no isolation) gb gemini --direct

Prompt Mode

Prompt mode (-p) allows you to compose a multi-line prompt with optional images before starting the session:

# Interactive prompt mode gb gemini -p # Use editor for complex prompts gb gemini -p -e # Background mode - start session and return immediately gb gemini -p -b

Background Sessions

Background mode is essential for orchestration:

# Start background session with prompt gb gemini -p -b # Output: # âś“ Session created: gemini-xyz789 # Session running in background. # Attach with: gb gemini attach gemini-xyz789

Session Management

# List all Gemini sessions gb gemini list # Attach to existing session gb gemini attach gemini-swift-fox # Stop a session gb gemini stop gemini-swift-fox # Kill a session gb gemini kill gemini-swift-fox

Image Support

Include local images in your prompts:

# Start prompt mode gb gemini -p # In the prompt interface: # > What does this UI mockup show? # > /path/to/mockup.png # > (empty line to finish)

Workflow Examples

Quick Task

# Start Gemini for a quick task gb gemini --on my-genbox # Gemini is great for: # - Fast iterations # - Code reviews # - Quick fixes

Multi-Agent Orchestration

# Use Gemini alongside Claude for different tasks gb claude -p -b --on genbox-1 # "Implement the complex algorithm" gb gemini -p -b --on genbox-2 # "Write documentation for the API" # Monitor both gb session watch

Session Persistence

Sessions use dtach for persistence:

  • Detach: Press Ctrl+\ to detach
  • Reattach: Use gb gemini attach <session-name>
  • List sessions: Use gb gemini list

Environment

Gemini sessions run with:

  • --yolo flag (auto-approve actions)
  • Full access to the genbox filesystem
  • Shell command execution
  • Git integration

See Also

Last updated on