Complete reference for the Hyperstack CLI (hs).
| Option | Description |
|---|---|
--config, -c <path> |
Path to hyperstack.toml (default: hyperstack.toml) |
--json |
Output as JSON |
--verbose |
Enable verbose output |
--completions <shell> |
Generate shell completions (bash, zsh, fish, powershell, elvish) |
--help, -h |
Show help |
--version, -V |
Show version |
| Command | Description |
|---|---|
hs init |
Initialize project |
hs up [stack] |
Deploy stack (push + build + deploy) |
hs status |
Show project overview |
hs auth login |
Authenticate |
Initialize a new Hyperstack project.
hs initCreates hyperstack.toml with auto-discovered stacks from .hyperstack/*.ast.json.
Validate your configuration.
hs config validateCreate a new account.
hs auth registerPrompts for username and password (min 8 characters).
Login to your account.
hs auth loginRemove stored credentials.
hs auth logoutCheck local authentication status.
hs auth statusVerify authentication with server.
hs auth whoamiCredentials location: ~/.hyperstack/credentials.toml
Deploy a stack: push, build, and deploy in one command.
# 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 --previewOptions:
| Flag | Description |
|---|---|
--branch, -b <name> |
Deploy to named branch |
--preview |
Create preview deployment |
--dry-run |
Show what would be deployed without deploying |
Show overview of all stacks, builds, and deployments.
hs status
hs status --jsonList all stacks with deployment status.
hs stack list
hs stack list --jsonPush local stacks to remote.
# Push all stacks
hs stack push
# Push specific stack
hs stack push my-stackShow detailed stack information including deployment status and recent builds.
hs stack show my-stack
hs stack show my-stack --version 3Show version history.
hs stack versions my-stack
hs stack versions my-stack --limit 10Delete a stack from remote.
hs stack delete my-stack
hs stack delete my-stack --force # Skip confirmationRollback to a previous deployment.
# 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 stagingOptions:
| Flag | Description |
|---|---|
--to <version> |
Target version |
--build <id> |
Target build ID |
--branch <name> |
Branch to rollback |
--rebuild, -r |
Force full rebuild |
--no-wait, -n |
Don't watch progress |
Stop a running deployment.
hs stack stop my-stack
hs stack stop my-stack --branch stagingThese commands are for advanced users who need fine-grained control over the build process.
Create a new build from a stack.
hs build create my-stack
hs build create my-stack --version 2
hs build create my-stack --ast-file ./my-stack.ast.json
hs build create my-stack --no-waitOptions:
| Flag | Description |
|---|---|
--version, -v <n> |
Use specific version (default: latest) |
--ast-file <path> |
Use local AST file directly |
--no-wait, -n |
Don't wait for completion |
List all builds.
hs build list
hs build list --status completed
hs build list --limit 10Get detailed build status.
hs build status 123
hs build status 123 --watch
hs build status 123 --jsonList stacks available for SDK generation.
hs sdk listGenerate TypeScript SDK.
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-sdkFile: hyperstack.toml
[project]
name = "my-project"
# SDK generation settings
[sdk]
output_dir = "./generated"
typescript_package = "@myorg/my-sdk"
# Build preferences
[build]
watch_by_default = true
# Stack definitions
# Auto-discovered from .hyperstack/*.ast.json
# Define explicitly for custom naming:
[[stacks]]
name = "my-game"
ast = "SettlementGame" # Entity name or path to .ast.json
description = "Settlement game tracking"
[[stacks]]
name = "token-tracker"
ast = ".hyperstack/Token.ast.json"pending → uploading → queued → building → pushing → deploying → completed
↘ failed
| Phase | Description |
|---|---|
| SUBMITTED | Queued for processing |
| PROVISIONING | Starting build environment |
| DOWNLOAD_SOURCE | Preparing source |
| INSTALL | Installing dependencies |
| PRE_BUILD | Preparing build |
| BUILD | Compiling |
| POST_BUILD | Finalizing |
| UPLOAD_ARTIFACTS | Publishing image |
| FINALIZING | Deploying to runtime |
# Initialize project
hs init
# Create account and login
hs auth register
# Validate configuration
hs config validate# Make changes, rebuild Rust crate
cargo build
# Deploy
hs up my-stack
# Check status
hs status# 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# Quick rollback to previous version
hs stack rollback my-stack
# Rollback to specific version
hs stack rollback my-stack --to 2| Variable | Description |
|---|---|
HYPERSTACK_API_URL |
Override API endpoint |
| Error | Solution |
|---|---|
Not authenticated |
Run hs auth login |
Stack not found |
Check hs stack list for available stacks |
AST file not found |
Run cargo build to generate AST |
Build failed |
Check hs build status <id> for details |
Config invalid |
Run hs config validate |
After successful deployment:
| Type | Pattern |
|---|---|
| Production | wss://{stack-name}.stack.usehyperstack.com |
| Branch | wss://{stack-name}-{branch}.stack.usehyperstack.com |
Get the URL with:
hs stack show <stack-name>