Skip to content

Installation

Set up the Hyperstack CLI and SDKs for your project.


The Hyperstack CLI (hs) manages specs, deployments, and SDK generation.

Terminal window
# Clone the repository
git clone https://github.com/HyperTekOrg/hyperstack-oss
cd hyperstack-oss
# Install globally
cargo install --path cli
# Verify installation
hs --version
target/release/hs
cargo build --release -p hyperstack-cli

Terminal window
npm install hyperstack-react

Peer dependencies:

  • react ^18.0.0
  • zustand ^4.0.0
Terminal window
# Install peer dependencies if needed
npm install react zustand

Add to your Cargo.toml:

[dependencies]
hyperstack-sdk = { git = "https://github.com/HyperTekOrg/hyperstack-oss", branch = "main" }
tokio = { version = "1.0", features = ["full"] }
Terminal window
pip install hyperstack-sdk

Before deploying specs, authenticate with Hyperstack:

Terminal window
# Create a new account
hs auth register
# Or login to existing account
hs auth login
# Verify authentication
hs auth whoami

Credentials are stored in ~/.hyperstack/credentials.toml.


Terminal window
# In your project directory
hs init

This creates hyperstack.toml and auto-discovers any existing AST files.

hyperstack.toml:

[project]
name = "my-project"
[sdk]
output_dir = "./generated"
# Specs are auto-discovered from .hyperstack/*.ast.json
# Define explicitly for custom naming:
[[specs]]
name = "my-spec"
ast = "MyEntity"
Terminal window
hs config validate

If you’re writing specs, add these dependencies:

[dependencies]
hyperstack = { path = "../hyperstack-oss/main/hyperstack", features = ["full"] }
hyperstack-spec-macros = { path = "../hyperstack-oss/main/spec-macros" }
hyperstack-interpreter = { path = "../hyperstack-oss/main/interpreter" }
# For local server
hyperstack-server = { path = "../hyperstack-oss/main/rust/hyperstack-server" }
# Required
tokio = { version = "1.0", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
borsh = { version = "1.5", features = ["derive"] }
Terminal window
# Install SDK
npm install hyperstack-react
# For local development, use localhost WebSocket
# For production, use your deployed spec URL

VariableDescriptionDefault
HYPERSTACK_API_URLOverride API endpointProduction API

Terminal window
hs --help
hs auth status
import { HyperstackProvider, useHyperstack, defineStack } from 'hyperstack-react';
// If this compiles, you're ready to go
const TestStack = defineStack({
name: 'test',
views: {},
});


IssueSolution
hs: command not foundEnsure ~/.cargo/bin is in your PATH
Cannot find module 'hyperstack-react'Run npm install hyperstack-react
Peer dependency warningsInstall react and zustand explicitly
Authentication failedRun hs auth login to refresh credentials