Skip to main content
Manage templates for HopX sandboxes using the template command (alias: tpl). List available templates, view template details, build custom templates, and delete templates.

Command Syntax

Subcommands

list

List all available templates. Syntax:
Options:
  • --output, -o FORMAT - Output format: table, json, plain (default: table)
Examples:
Expected Output (Table):
Exit Codes:
  • 0 - Success
  • 3 - Authentication error

info

Get detailed information about a template. Syntax:
Arguments:
  • TEMPLATE_NAME - Template name or 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 - Template not found

build

Build a custom template from a Dockerfile. Syntax:
Options:
  • --name TEXT - Template name (required)
  • --dockerfile PATH - Path to Dockerfile
  • --image TEXT - Base image (e.g., python:3.11, node:20)
  • --context PATH - Build context directory
  • --output, -o FORMAT - Output format: table, json, plain (default: table)
Examples:
Expected Output:
Exit Codes:
  • 0 - Success
  • 1 - Build failed
  • 3 - Authentication error

delete

Delete a custom template. Syntax:
Arguments:
  • TEMPLATE_ID - Template ID to delete (required)
Options:
  • --force - Skip confirmation prompt
Examples:
Expected Output:
Exit Codes:
  • 0 - Success
  • 3 - Authentication error
  • 4 - Template not found

Shell Scripting Examples

List and Filter Templates

Build and Use Custom Template

Next Steps