Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/hypertekorg/hyperstack/llms.txt

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

hs stack

Manage your deployed stacks with commands for listing, viewing details, pushing updates, rollback, and deletion.

Subcommands


list

List all stacks with their deployment status.

Usage

hs stack list [OPTIONS]

Options

--json
boolean
Output in JSON format

Example

hs stack list
Output:
STACK NAME       STATUS    VERSION   ENDPOINT
nft-indexer      live      v3        wss://nft-indexer.stack.usehyperstack.com
token-tracker    live      v5        wss://token-tracker.stack.usehyperstack.com
ore-monitor      stopped   v2        wss://ore-monitor.stack.usehyperstack.com

JSON Output

hs stack list --json
[
  {
    "name": "nft-indexer",
    "status": "live",
    "version": 3,
    "endpoint": "wss://nft-indexer.stack.usehyperstack.com",
    "updated_at": "2026-03-01T10:30:00Z"
  },
  {
    "name": "token-tracker",
    "status": "live",
    "version": 5,
    "endpoint": "wss://token-tracker.stack.usehyperstack.com",
    "updated_at": "2026-02-28T15:45:00Z"
  }
]

push

Push local stack definitions to remote. Creates a new version if the stack definition has changed.

Usage

hs stack push [STACK_NAME]

Arguments

stack_name
string
Name of specific stack to pushIf not provided, pushes all stacks from hyperstack.toml.

Examples

Push All Stacks

hs stack push
Output:
Pushing stacks...
✓ nft-indexer (version 3 → 4)
✓ token-tracker (no changes)

Push Specific Stack

hs stack push nft-indexer

Notes

  • Only creates a new version if the stack definition changed
  • Does not trigger a build or deployment (use hs up for that)
  • Useful for versioning without deploying

show

Show detailed information about a stack including deployment status, versions, and configuration.

Usage

hs stack show STACK_NAME [OPTIONS]

Arguments

stack_name
string
required
Name of the stack

Options

--version
integer
Show specific version details
--json
boolean
Output in JSON format

Examples

Show Latest Version

hs stack show nft-indexer
Output:
Stack: nft-indexer
Status: live
Version: 3 (latest)
Created: 2026-03-01 10:30:00 UTC
Updated: 2026-03-01 10:35:00 UTC

Production Deployment:
  Endpoint: wss://nft-indexer.stack.usehyperstack.com
  Build: #12
  Status: live
  Deployed: 2026-03-01 10:35:00 UTC

Branch Deployments:
  staging:
    Endpoint: wss://nft-indexer-staging.stack.usehyperstack.com
    Build: #11
    Status: live

Entities: 3
Projections: 5

Show Specific Version

hs stack show nft-indexer --version 2
Output:
Stack: nft-indexer
Version: 2
Created: 2026-02-15 08:20:00 UTC

Deployments using this version:
  Production: #8 (rolled back)
  staging: #7 (active)

Entities: 2
Projections: 4

versions

Show version history for a stack.

Usage

hs stack versions STACK_NAME [OPTIONS]

Arguments

stack_name
string
required
Name of the stack

Options

--limit
integer
default:"20"
Maximum number of versions to show
--json
boolean
Output in JSON format

Example

hs stack versions nft-indexer
Output:
VERSION   CREATED                  DEPLOYED   BUILDS
v3        2026-03-01 10:30:00      yes        #12 (live), #13 (failed)
v2        2026-02-15 08:20:00      yes        #8, #9, #10
v1        2026-02-01 14:00:00      yes        #1, #2, #3

Limit Results

hs stack versions nft-indexer --limit 5

delete

Delete a stack from remote. This stops all deployments and removes all versions.

Usage

hs stack delete STACK_NAME [OPTIONS]

Arguments

stack_name
string
required
Name of the stack to delete

Options

--force
boolean
Skip confirmation prompt

Examples

Interactive Delete

hs stack delete nft-indexer
Output:
Warning: This will permanently delete the stack 'nft-indexer' and all its data.

This will:
  - Stop all running deployments
  - Delete all versions
  - Remove all build artifacts

Are you sure? (y/N): y

Deleting stack 'nft-indexer'...
  Stopping production deployment... ✓
  Stopping staging deployment... ✓
  Deleting versions... ✓
  Removing build artifacts... ✓

Stack deleted successfully.

Force Delete (No Confirmation)

hs stack delete nft-indexer --force
This permanently deletes the stack and all its data. This action cannot be undone.

rollback

Rollback a deployment to a previous version.

Usage

hs stack rollback STACK_NAME [OPTIONS]

Arguments

stack_name
string
required
Name of the stack to rollback

Options

--to
integer
Rollback to specific version numberIf not provided, rolls back to the previous successful deployment.
--build
integer
Rollback to specific build ID
--branch
string
default:"production"
Branch deployment to rollback
--rebuild
boolean
Force full rebuild instead of using existing image
--no-wait
boolean
Don’t watch the rollback progress

Examples

Rollback to Previous Version

hs stack rollback nft-indexer
Output:
Rolling back nft-indexer to previous successful deployment...

Current: version 3, build #12
Target: version 2, build #10

Rollback initiated...
  Deploying build #10... 100% ✓

Rollback successful!
Endpoint: wss://nft-indexer.stack.usehyperstack.com

Rollback to Specific Version

hs stack rollback nft-indexer --to 2

Rollback to Specific Build

hs stack rollback nft-indexer --build 10

Rollback Branch Deployment

hs stack rollback nft-indexer --branch staging --to 2

Force Rebuild

hs stack rollback nft-indexer --to 2 --rebuild
Forces a new build from version 2 instead of reusing build #10.

How Rollback Works

  1. Find target version/build - Determines which version to rollback to
  2. Check existing build - Looks for a successful build of that version
  3. Rebuild if needed - Creates a new build if --rebuild is used or no build exists
  4. Deploy - Deploys the target build
  5. Verify - Confirms the rollback was successful

When to Use Rollback

  • Production incident caused by recent deployment
  • New version has bugs
  • Need to quickly restore service

When to Use Rebuild

  • Previous build artifacts are corrupted
  • Infrastructure changes require new images
  • Rollback fails with existing build

stop

Stop a running deployment.

Usage

hs stack stop STACK_NAME [OPTIONS]

Arguments

stack_name
string
required
Name of the stack to stop

Options

--branch
string
Branch deployment to stopIf not provided, stops the production deployment.
--force
boolean
Skip confirmation prompt

Examples

Stop Production Deployment

hs stack stop nft-indexer
Output:
Warning: This will stop the production deployment of 'nft-indexer'.

Endpoint: wss://nft-indexer.stack.usehyperstack.com
Status: live

Are you sure? (y/N): y

Stopping deployment...
  Draining connections... ✓
  Stopping containers... ✓
  Updating DNS... ✓

Deployment stopped successfully.

Stop Branch Deployment

hs stack stop nft-indexer --branch staging

Force Stop (No Confirmation)

hs stack stop nft-indexer --force

When to Stop a Deployment

  • Maintenance window
  • Critical bug requires immediate shutdown
  • Cost optimization (stop unused environments)
  • Before deleting a stack

Restarting a Stopped Deployment

To restart, deploy again:
hs up nft-indexer
Or rollback to a previous build:
hs stack rollback nft-indexer

Return Codes

All hs stack commands use standard return codes:
  • 0 - Success
  • 1 - Error

Build docs developers (and LLMs) love