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 create

Create a new Hyperstack project from a pre-built template. Templates include example stack definitions, client code, and configuration.

Usage

hs create [NAME] [OPTIONS]

Arguments

name
string
Project name (creates a directory with this name)If not provided, you’ll be prompted interactively.

Options

--template
string
Template to use. Available templates:
  • react-ore - React + TypeScript with ORE token indexer
  • rust-ore - Rust example with ORE token indexer
If not provided, you’ll be prompted to select from available templates.
--offline
boolean
Use cached templates only (no network)Useful when working without internet connection. Fails if the template isn’t cached.
--force-refresh
boolean
Force re-download templates even if cachedEnsures you have the latest template version.
--skip-install
boolean
Skip installing dependencies after creationBy default, npm install or cargo build runs automatically.

Examples

Interactive Creation

hs create
You’ll be prompted for:
  1. Project name
  2. Template selection

Create React Project

hs create my-nft-tracker --template react-ore
Output:
Creating project 'my-nft-tracker' from template 'react-ore'...

Downloading template... ✓
Extracting files... ✓
Installing dependencies... ✓

Project created successfully!

Next steps:
  cd my-nft-tracker
  hs auth login
  hs up

Create Rust Project

hs create ore-indexer --template rust-ore

Offline Mode

hs create my-project --template react-ore --offline
Uses the cached template without downloading.

Skip Dependency Installation

hs create my-project --template react-ore --skip-install
Create the project structure without running npm install.

Available Templates

react-ore

A React + TypeScript project with:
  • ORE token transfer indexer stack
  • React frontend with TypeScript SDK
  • Real-time transfer visualization
  • WebSocket connection handling
Tech stack:
  • React 18
  • TypeScript
  • Vite
  • hyperstack-react SDK

rust-ore

A Rust project with:
  • ORE token transfer indexer stack
  • Rust client using hyperstack-sdk
  • Command-line interface
Tech stack:
  • Rust 1.70+
  • hyperstack-sdk
  • tokio for async runtime

Project Structure

After running hs create my-project --template react-ore:
my-project/
├── stacks/
│   └── ore-indexer.stack       # Stack definition
├── src/
│   ├── App.tsx                 # React app
│   └── main.tsx                # Entry point
├── hyperstack.toml              # Hyperstack configuration
├── package.json                 # Dependencies
├── tsconfig.json                # TypeScript config
└── vite.config.ts               # Vite config

Template Caching

Templates are cached in:
  • macOS/Linux: ~/.cache/hyperstack/templates/
  • Windows: %LOCALAPPDATA%\hyperstack\templates\

Clear Cache

rm -rf ~/.cache/hyperstack/templates/

Next Steps After Creation

# Navigate to project
cd my-project

# Authenticate (if not already)
hs auth login

# Deploy the stack
hs up

# Start development server (for React template)
npm run dev

Error Handling

Directory Already Exists

Error: Directory 'my-project' already exists
Solution: Choose a different name or remove the existing directory.

Template Not Found

Error: Template 'invalid-template' not found
Solution: Use --template react-ore or --template rust-ore.

Network Error (Offline Mode)

Error: Template not cached and --offline mode enabled
Solution: Remove --offline flag to download the template.

Customizing Templates

After creation, you can:
  1. Modify the stack definition in stacks/*.stack
  2. Update configuration in hyperstack.toml
  3. Customize the client in src/
See Stack Definition Guide for stack syntax.

Return Codes

  • 0 - Success
  • 1 - Error (network error, template not found, directory exists, etc.)

Build docs developers (and LLMs) love