Getting Started
/
Installation
Installation
Add rastack to your project and compile your first resource in under a minute.
View as Markdown
llms.txt
React API Stack ships as a single npm package, rastack, with subpath exports for the DSL, the CLI, the React runtime, and the design-token framework. The fastest way in is the one-line installer — no clone, no config.
Install the CLI
Install the rastack CLI with a single command, the way you'd install Poetry or rustup. It drops a self-contained copy under ~/.rastack — no sudo, nothing outside your home directory — and wires it onto your PATH.
terminal
bash · copy
1
# macOS / Linux
2
curl
-fsSL
https://reactapistack.com/setup.sh
|
sh
3
4
# Windows (PowerShell) — from cmd, prefix with: powershell -c "…"
5
irm
https://reactapistack.com/setup.ps1
|
iex
Good to know
rastack is a Node package, so Node.js 18+ is the one prerequisite — the way Python is for Poetry. Pin a version with RASTACK_VERSION=x.y.z before the command, relocate with RASTACK_HOME, or skip the PATH edit with RASTACK_NO_MODIFY_PATH=1.
Add it to a project
Prefer a package manager, or want rastack pinned as a project dependency in package.json? Both work:
terminal
bash · copy
1
npm
install
-g
rastack
# the global CLI, via npm
2
npm
install
-D
rastack
# or as a dev dependency in one project
Good to know
This is alpha software you can install and test today. Expect rough edges and breaking changes between releases.
Requirements
Node.js 18+ and a package manager (npm, pnpm, or yarn).
A TypeScript project. Resources are authored in .ts and the compiler builds a real ts.Program to read your types.
React 18+ for the generated hooks (built on TanStack Query).
Optional: Rust + the wasm32-unknown-unknown target if you want to run the engine locally in the browser.
Verify the install
Compile the resource graph and inspect it — no server or database required:
terminal
bash · copy
1
# TypeScript resources → schema.rastack.json + openapi.json
2
npx
rastack
compile
3
4
# introspect the resource graph and its relations
5
npx
rastack
list
6
npx
rastack
urls
Package subpaths
Everything lives under the one rastack package so versions never drift:
Import
What it provides
rastack/define
The resource() DSL and the s.* field builders.
rastack/hooks
The generated, typed React Query hooks and runtime.
rastack/provider
<RAStackProvider> — the runtime mode switch (local / s3 / remote).
rastack/tokens · rastack/theme
The design-token DSL and the <ThemeProvider> runtime.
rastack/sync · rastack/cache
The local-first sync store and the local Iceberg file cache.
Tip
Continue to the Quick Start to define a resource, generate the client, and read data end-to-end.
Build with AI
Every page is available as clean Markdown for LLMs and coding agents. Point one at the files below to build on top of React API Stack.
React API Stack · alpha · built to scale to millions