genbox
v1.0.187
Published
Genbox CLI - AI-Powered Development Environments
Maintainers
Readme
Genbox CLI
AI-Powered Cloud Development Environments
Create isolated, fully-configured development environments in the cloud in minutes. Each environment gets its own server, database, and HTTPS URLs.
Installation
npm install -g genboxQuick Start
# 1. Login to your account
gb login
# 2. Initialize your project
gb init
# 3. Create a development environment
gb create feature-auth
# 4. Check setup progress
gb status -w
# 5. Connect via SSH
gb connect
# 6. Clean up when done
gb destroyFeatures
- Instant Environments - Spin up fully-configured dev environments in minutes
- Database Sync - Copy your staging/production database to your environment
- HTTPS URLs - Each service gets a unique HTTPS URL
- SSH Access - Direct SSH access to your environment
- Port Forwarding - Debug remotely with local tools
- Auto-Destroy - Environments auto-cleanup when inactive (saves credits)
- Snapshots - Stop and resume environments instantly
Commands
Core Commands
| Command | Description |
|---------|-------------|
| gb create [name] | Create a new environment |
| gb list | List all environments |
| gb destroy [name] | Delete an environment |
| gb connect [name] | SSH into an environment |
| gb status [name] | Check status and services |
Lifecycle
| Command | Description |
|---------|-------------|
| gb start [name] | Start a stopped environment |
| gb stop [name] | Stop (pause) an environment |
| gb restart [name] | Restart services |
| gb extend [name] | Extend lifetime / disable auto-destroy |
| gb rebuild [name] | Rebuild with updated config |
Development
| Command | Description |
|---------|-------------|
| gb urls [name] | Show service URLs |
| gb forward [name] | Set up port forwarding |
| gb push | Push local changes |
| gb run <prompt> | Run Claude Code prompt remotely |
Database
| Command | Description |
|---------|-------------|
| gb db sync | Sync database from staging/production |
| gb db restore | Restore from a snapshot |
| gb restore-db | Restore local MongoDB to environment |
Configuration
| Command | Description |
|---------|-------------|
| gb init | Initialize project configuration |
| gb config show | Show resolved configuration |
| gb profiles list | List available profiles |
| gb validate | Validate configuration |
Shell Completion
Enable tab completion for a better experience:
# Bash
gb completion bash --install
# Zsh
gb completion zsh --install
# Fish
gb completion fish --installConfiguration
Genbox uses a genbox.yaml file in your project root:
version: 4
project_name: my-project
git:
repo: https://github.com/org/repo.git
branch: main
auth:
type: pat
token_env: GITHUB_PAT
services:
api:
port: 3000
healthcheck: /health
admin:
port: 5173
database:
container: mongodb
name: mydbRun gb init to generate this file interactively.
Environment Variables
Create a .env.genbox file for secrets:
GITHUB_PAT=ghp_xxxxxxxxxxxx
DATABASE_URL=mongodb://...
API_KEY=secretExamples
Create with Options
# Use a specific profile
gb create feature-auth --profile api-only
# Specify server size
gb create feature-auth --size medium
# Copy database from staging
gb create feature-auth --db copy --db-source staging
# Use existing branch
gb create feature-auth --branch feature/authPort Forwarding
# Forward all configured ports
gb forward feature-auth
# Forward specific ports
gb forward feature-auth --ports 3000,5432Database Operations
# Sync from staging
gb db sync --source staging
# Restore from local
gb restore-db feature-authPricing
Environments are billed hourly based on size:
- Small - 1 credit/hour (2 vCPU, 4GB RAM)
- Medium - 2 credits/hour (4 vCPU, 8GB RAM)
- Large - 4 credits/hour (8 vCPU, 16GB RAM)
Environments auto-destroy after 58 minutes of inactivity to save credits.
Links
- Website: genbox.dev
- Documentation: genbox.dev/docs
- Support: genbox.dev/support
License
MIT
