Skip to content

CLI Command Reference

Complete reference for the Hyperstack CLI (hs).


OptionDescription
--config, -c <path>Path to hyperstack.toml (default: hyperstack.toml)
--jsonOutput as JSON
--verboseEnable verbose output
--help, -hShow help
--version, -VShow version
--completions <SHELL>Generate shell completions (bash, zsh, fish, powershell, elvish)

CommandDescription
hyperstack-cli create [name]Scaffold a new app from a template
hs initInitialize a stack project
hs up [stack]Deploy stack (push + build + deploy)
hs push [stack]Push stack to remote (alias)
hs statusShow project overview
hs stack listList all stacks
hs stack showShow stack details
hs telemetry statusShow telemetry status
hs exploreDiscover stacks and schemas

Scaffold a new Hyperstack project from a template. This is the fastest way to get started.

Terminal window
# Interactive — prompts for name and template
npx hyperstack-cli create
# With project name
npx hyperstack-cli create my-app
# With specific template
npx hyperstack-cli create my-app --template react-ore

Available templates:

TemplateAliasesDescription
react-oreore-reactORE mining rounds viewer (React + Vite)
rust-oreore-rustORE mining rounds client (Rust + Tokio)
typescript-oreore-typescript, ts-ore, ore-tsORE mining rounds client (TypeScript CLI)

Options:

FlagDescription
--template <name>Skip interactive selection
--offlineUse cached templates only
--force-refreshClear template cache and re-download
--skip-installDon’t run npm install automatically

Templates are downloaded from GitHub releases and cached in ~/.hyperstack/templates/.


Initialize a new Hyperstack project.

Terminal window
hs init

Creates hyperstack.toml with auto-discovered stacks from .hyperstack/*.stack.json.

Validate your configuration.

Terminal window
hs config validate

Hyperstack is currently in closed beta. Contact us to receive an API key.

Save your API key to authenticate.

Terminal window
# Interactive — prompts for API key
hs auth login
# Or pass directly
hs auth login --key <your-api-key>

Options:

FlagDescription
--key, -kAPI key (prompts if not provided)

Remove stored credentials.

Terminal window
hs auth logout

Check local authentication status.

Terminal window
hs auth status

Verify authentication with server.

Terminal window
hs auth whoami

Credentials location: ~/.hyperstack/credentials.toml


Discover available stacks and explore their schemas. Works without authentication for public stacks.

Terminal window
# List all available stacks
hs explore
# Show entities and views for a stack
hs explore ore
# Show fields and types for a specific entity
hs explore ore OreRound
# JSON output (for agents and scripts)
hs explore --json
hs explore ore --json
hs explore ore OreRound --json

Arguments:

ArgumentDescription
[name]Stack name to explore
[entity]Entity name to show field details

Output varies by specificity:

CommandShows
hs exploreAll available stacks with entity names
hs explore <stack>Stack entities, views, and field counts
hs explore <stack> <entity>Entity fields with types, sections, and views

Public stacks are visible without authentication. Log in with hs auth login to also see global stacks and your own deployed stacks.


Deploy a stack: push, build, and deploy in one command.

Terminal window
# Deploy all stacks
hs up
# Deploy specific stack
hs up my-stack
# Deploy to branch
hs up my-stack --branch staging
# Creates: my-stack-staging.stack.usehyperstack.com
# Preview deployment
hs up my-stack --preview
# Preview what would be deployed (no actual deployment)
hs up my-stack --dry-run

Options:

FlagDescription
--branch, -b <name>Deploy to named branch
--previewCreate preview deployment
--dry-runShow what would be deployed without deploying

Show overview of all stacks, builds, and deployments.

Terminal window
hs status
hs status --json

List all stacks with their deployment status.

Terminal window
hs stack list
hs stack list --json

Output:

STACK STATUS VERSION URL
settlement-game active v3 wss://settlement-game.stack.usehyperstack.com
token-tracker active v1 wss://token-tracker.stack.usehyperstack.com

Push local stacks to remote.

Terminal window
# Push all stacks
hs stack push
# Push specific stack
hs stack push my-stack

Show detailed stack information including deployment status and versions.

Terminal window
hs stack show my-stack
hs stack show my-stack --version 3
hs stack show my-stack -v 3

Options:

FlagDescription
--version, -v <n>Show specific version details

Output includes:

  • Entity information
  • Deployment status and URL
  • Latest version details
  • Recent builds

Show version history.

Terminal window
hs stack versions my-stack
hs stack versions my-stack --limit 10
hs stack versions my-stack -l 10

Options:

FlagDescription
--limit, -l <n>Maximum number of versions (default: 20)

Delete a stack from remote.

Terminal window
hs stack delete my-stack
hs stack delete my-stack --force # Skip confirmation
hs stack delete my-stack -f

Options:

FlagDescription
--force, -fSkip confirmation prompt

Rollback to a previous deployment.

Terminal window
# Rollback to previous version
hs stack rollback my-stack
# Rollback to specific version
hs stack rollback my-stack --to 2
# Rollback to specific build
hs stack rollback my-stack --build 123
# Rollback branch deployment
hs stack rollback my-stack --branch staging

Options:

FlagDescription
--to <version>Target version
--build <id>Target build ID
--branch <name>Branch to rollback (default: production)
--rebuildForce full rebuild
--no-waitDon’t watch progress

Stop a deployment.

Terminal window
hs stack stop my-stack
hs stack stop my-stack --branch staging
hs stack stop my-stack --force # Skip confirmation

Options:

FlagDescription
--branch <name>Branch deployment to stop
--force, -fSkip confirmation prompt

List stacks available for SDK generation.

Terminal window
hs sdk list

Generate TypeScript SDK.

Terminal window
hs sdk create typescript my-stack
hs sdk create typescript my-stack --output ./src/generated/
hs sdk create typescript my-stack --package-name @myorg/my-sdk
hs sdk create typescript my-stack --url wss://my-stack.stack.usehyperstack.com

Options:

FlagDescription
--output, -o <path>Output file path (overrides config)
--package-name, -p <name>Package name for TypeScript
--url <url>WebSocket URL for the stack

Generate Rust SDK crate.

Terminal window
hs sdk create rust my-stack
hs sdk create rust my-stack --output ./crates/
hs sdk create rust my-stack --crate-name my-stack-sdk
hs sdk create rust my-stack --module # Generate as module instead of crate
hs sdk create rust my-stack --url wss://my-stack.stack.usehyperstack.com

Options:

FlagDescription
--output, -o <path>Output directory path (overrides config)
--crate-name <name>Custom crate name for generated Rust crate
--moduleGenerate as a module (mod.rs) instead of a standalone crate
--url <url>WebSocket URL for the stack

The --module flag generates the SDK as a Rust module (with mod.rs) that can be embedded directly into an existing crate, rather than creating a standalone crate with its own Cargo.toml. This is useful for monorepo setups or when you want to include generated code within your own crate.


File: hyperstack.toml

[project]
name = "my-project"
# SDK generation settings
[sdk]
output_dir = "./generated" # Default output for both languages
typescript_output_dir = "./frontend/src/generated" # Override for TypeScript only
rust_output_dir = "./crates/generated" # Override for Rust only
typescript_package = "@myorg/my-sdk" # Package name for TypeScript
rust_module_mode = false # Generate Rust SDKs as modules by default
# Build preferences
[build]
watch_by_default = true
# Stack definitions
# Auto-discovered from .hyperstack/*.stack.json
# Define explicitly for custom naming or per-stack overrides:
[[stacks]]
name = "my-game"
stack = "SettlementGame" # Stack name or path to .stack.json
description = "Settlement game tracking"
typescript_output_file = "./src/generated/game.ts" # Per-stack TypeScript output path
rust_output_crate = "./crates/game-stack" # Per-stack Rust output path
rust_module = true # Per-stack: generate as module instead of crate
OptionScopeDescription
output_dir[sdk]Default output directory for both languages
typescript_output_dir[sdk]Override output directory for TypeScript SDKs
rust_output_dir[sdk]Override output directory for Rust SDKs
typescript_package[sdk]Package name for generated TypeScript code
rust_module_mode[sdk]Generate Rust SDKs as modules by default
typescript_output_file[[stacks]]Per-stack TypeScript output file path
rust_output_crate[[stacks]]Per-stack Rust output crate/module directory
rust_module[[stacks]]Per-stack override for module vs crate generation

For most projects, you only need:

[project]
name = "my-project"

The CLI auto-discovers stacks from .hyperstack/*.stack.json files.


pending → uploading → queued → building → pushing → deploying → completed
↘ failed
PhaseDescription
SUBMITTEDQueued for processing
PROVISIONINGStarting build environment
DOWNLOAD_SOURCEPreparing source
INSTALLInstalling dependencies
PRE_BUILDPreparing build
BUILDCompiling
POST_BUILDFinalizing
UPLOAD_ARTIFACTSPublishing image
FINALIZINGDeploying to runtime

Terminal window
# Initialize project
hs init
# Login with your API key
hs auth login
# Validate configuration
hs config validate
Terminal window
# Make changes to stack, rebuild Rust crate
cargo build
# Deploy
hs up my-stack
# Check status
hs status
Terminal window
# Deploy feature branch
hs up my-stack --branch feature-x
# URL: my-stack-feature-x.stack.usehyperstack.com
# Check deployment
hs stack list
# Clean up when done
hs stack stop my-stack --branch feature-x
Terminal window
# Quick rollback to previous version
hs stack rollback my-stack
# Rollback to specific version
hs stack rollback my-stack --to 2

Hyperstack collects anonymous usage data to improve the CLI. No personal information or project details are sent.

Show current telemetry status.

Terminal window
hs telemetry status

Enable telemetry collection.

Terminal window
hs telemetry enable

Disable telemetry collection.

Terminal window
hs telemetry disable

VariableDescription
HYPERSTACK_API_URLOverride API endpoint
DO_NOT_TRACK=1Disable telemetry (standard)
HYPERSTACK_TELEMETRY_DISABLED=1Disable telemetry (Hyperstack-specific)

ErrorSolution
Not authenticatedRun hs auth login
Stack not foundCheck hs stack list for available stacks
Stack file not foundRun cargo build to generate stack spec
Build failedTry again
Config invalidRun hs config validate

After successful deployment:

TypePattern
Productionwss://{stack-name}.stack.usehyperstack.com
Branchwss://{stack-name}-{branch}.stack.usehyperstack.com
Localws://localhost:8080

Get the URL with:

Terminal window
hs stack show <stack-name>