Skip to main content
The HopX CLI provides terminal access to HopX cloud sandboxes - secure, isolated VMs that start in seconds. Execute code, manage files, run commands, and build custom templates from your terminal.

What is the HopX CLI?

The HopX CLI is the official command-line interface for HopX.ai cloud sandboxes. It provides terminal-based access to all HopX features including sandbox management, code execution, file operations, and template building. Version: 0.1.2
Python Support: 3.12+
Framework: Typer (built on Click)

Use Cases

  • AI agent code execution - Execute AI-generated code safely in isolated environments
  • Running untrusted code - Test code without risking your local machine
  • Integration testing - Run tests in clean, reproducible environments
  • Data processing pipelines - Process data in isolated sandboxes
  • Browser automation - Automate browser interactions with desktop features
  • Educational environments - Create learning environments for students

When to Use CLI vs SDK vs API

Use CLI When:

  • You prefer command-line workflows
  • You’re writing shell scripts or automation
  • You need quick one-off operations
  • You’re integrating with CI/CD pipelines
  • You want interactive terminal sessions

Use SDK When:

  • You’re building applications in Python or JavaScript
  • You need programmatic control in your code
  • You want type safety and IDE support
  • You’re building libraries or frameworks

Use API When:

  • You’re building in languages without SDK support
  • You need direct HTTP control
  • You’re building custom integrations
  • You need fine-grained request/response handling

Command Groups

The CLI provides 15 command groups for complete sandbox management:

Quick Example

Features

Authentication

  • Browser-based OAuth login (Google, GitHub)
  • API key management (create, list, revoke)
  • Secure credential storage via system keyring
  • Multi-profile support for different environments

Output Formats

  • Table (default) - Human-readable tables with borders
  • JSON - Machine-readable JSON for scripting
  • Plain - Minimal text output for piping

Configuration

  • YAML configuration file (~/.hopx/config.yaml)
  • Environment variable support (HOPX_* prefix)
  • Multiple profiles for dev/prod environments
  • Config precedence: CLI flags > environment > config file > defaults

Exit Codes

The CLI uses standardized exit codes for scripting automation:

Global Options

All commands support these global options:

Next Steps