Installation
Set up the Hyperstack CLI and SDKs for your project.
CLI Installation
Section titled “CLI Installation”The Hyperstack CLI (hs) manages specs, deployments, and SDK generation.
From Source (Recommended)
Section titled “From Source (Recommended)”# Clone the repositorygit clone https://github.com/HyperTekOrg/hyperstack-osscd hyperstack-oss
# Install globallycargo install --path cli
# Verify installationhs --versionBuild Without Installing
Section titled “Build Without Installing”cargo build --release -p hyperstack-cliSDK Installation
Section titled “SDK Installation”TypeScript / React
Section titled “TypeScript / React”npm install hyperstack-reactPeer dependencies:
react^18.0.0zustand^4.0.0
# Install peer dependencies if needednpm install react zustandAdd to your Cargo.toml:
[dependencies]hyperstack-sdk = { git = "https://github.com/HyperTekOrg/hyperstack-oss", branch = "main" }tokio = { version = "1.0", features = ["full"] }Python
Section titled “Python”pip install hyperstack-sdkAuthentication
Section titled “Authentication”Before deploying specs, authenticate with Hyperstack:
# Create a new accounths auth register
# Or login to existing accounths auth login
# Verify authenticationhs auth whoamiCredentials are stored in ~/.hyperstack/credentials.toml.
Project Setup
Section titled “Project Setup”Initialize a New Project
Section titled “Initialize a New Project”# In your project directoryhs initThis creates hyperstack.toml and auto-discovers any existing AST files.
Configuration File
Section titled “Configuration File”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"Validate Configuration
Section titled “Validate Configuration”hs config validateDevelopment Setup
Section titled “Development Setup”For Spec Development (Rust)
Section titled “For Spec Development (Rust)”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 serverhyperstack-server = { path = "../hyperstack-oss/main/rust/hyperstack-server" }
# Requiredtokio = { version = "1.0", features = ["full"] }serde = { version = "1.0", features = ["derive"] }borsh = { version = "1.5", features = ["derive"] }For Frontend Development
Section titled “For Frontend Development”# Install SDKnpm install hyperstack-react
# For local development, use localhost WebSocket# For production, use your deployed spec URLEnvironment Variables
Section titled “Environment Variables”| Variable | Description | Default |
|---|---|---|
HYPERSTACK_API_URL | Override API endpoint | Production API |
Verify Installation
Section titled “Verify Installation”hs --helphs auth statusTypeScript SDK
Section titled “TypeScript SDK”import { HyperstackProvider, useHyperstack, defineStack } from 'hyperstack-react';
// If this compiles, you're ready to goconst TestStack = defineStack({ name: 'test', views: {},});Next Steps
Section titled “Next Steps”- React Quickstart - Build your first real-time app
- CLI Commands - Full command reference
- Creating Specs - Create custom data streams
Troubleshooting
Section titled “Troubleshooting”| Issue | Solution |
|---|---|
hs: command not found | Ensure ~/.cargo/bin is in your PATH |
Cannot find module 'hyperstack-react' | Run npm install hyperstack-react |
Peer dependency warnings | Install react and zustand explicitly |
Authentication failed | Run hs auth login to refresh credentials |