Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hopx.ai/llms.txt

Use this file to discover all available pages before exploring further.

Run shell commands in HopX sandboxes for system administration, package installation, and automation. This hub covers all command execution methods.

What You’ll Learn

  • How to run shell commands synchronously
  • How to run commands in the background
  • How to handle command output and errors
  • How to use commands for system administration
  • How to integrate commands with code execution

Command Execution Overview

Execution ModeSDK MethodAPI Endpoint
Running Commandssandbox.commands.run()POST /commands/run
Background Commandssandbox.commands.run_background()POST /commands/background

Core Concepts

Running Commands

Execute shell commands synchronously and wait for results.

Background Commands

Run long-running commands in the background without blocking.

SDK Reference

Python SDK

Complete reference for Python command execution.
  • Commands Module - Complete command API
    • commands.run() - Run commands synchronously
    • commands.run_background() - Run commands in background

JavaScript SDK

Complete reference for JavaScript/TypeScript command execution.
  • Commands Module - Complete command API
    • commands.run() - Run commands synchronously
    • commands.runBackground() - Run commands in background

API Reference

VM Agent API

REST API endpoints for command execution.

Quick Start

If you’re new to command execution, start here:
  1. Running Commands - Run your first command
  2. Background Commands - Run long-running commands

Next Steps