Skip to main content
Connect to interactive terminal sessions in HopX sandboxes using the terminal command (alias: term). Access WebSocket-based terminal sessions for interactive shell access.

Command Syntax

Subcommands

connect

Connect to an interactive terminal session. Syntax:
Arguments:
  • SANDBOX_ID - Sandbox ID (required)
Options:
  • --command TEXT - Command to execute (default: interactive shell)
  • --timeout INTEGER - Connection timeout in seconds
Examples:
Expected Output:
Exit Codes:
  • 0 - Success
  • 3 - Authentication error
  • 4 - Sandbox not found
  • 5 - Connection timeout

info

Get terminal information for a sandbox. Syntax:
Arguments:
  • SANDBOX_ID - Sandbox ID (required)
Options:
  • --output, -o FORMAT - Output format: table, json, plain (default: table)
Examples:
Expected Output (Table):
Exit Codes:
  • 0 - Success
  • 3 - Authentication error
  • 4 - Sandbox not found

url

Get WebSocket URL for terminal access. Syntax:
Arguments:
  • SANDBOX_ID - Sandbox ID (required)
Examples:
Expected Output:
Exit Codes:
  • 0 - Success
  • 3 - Authentication error
  • 4 - Sandbox not found

Interactive Terminal Usage

When connected to an interactive terminal:
  • Type commands as you would in a normal terminal
  • Press Ctrl+C to interrupt running commands
  • Press Ctrl+D or type exit to disconnect
  • Use arrow keys for command history
  • Tab completion is available

Shell Scripting Examples

Connect and Execute Commands

Get Terminal URL for External Tools

Next Steps