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 --directSynopsis
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
| Option | Description |
|---|---|
--on <genbox> | Use a specific genbox |
--direct | Run directly on this machine (no isolation) |
-y, --yes | Skip confirmation prompts |
-p, --prompt-mode | Interactive prompt mode with optional images |
-e, --editor | Use $EDITOR for prompt input (with -p) |
-b, --background | Run session in background (with -p) |
Subcommands
| Subcommand | Description |
|---|---|
list | List 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 --directPrompt 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 -bBackground 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-xyz789Session 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-foxImage 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 fixesMulti-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 watchSession 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:
--yoloflag (auto-approve actions)- Full access to the genbox filesystem
- Shell command execution
- Git integration
See Also
gb session- Session management commandsgb claude- Claude AI sessionsgb codex- Codex AI sessionsgb opencode- OpenCode AI sessionsgb cursor- Cursor AI sessionsgb create- Create genboxes- Shortcuts Reference - All power user shortcuts
Last updated on