Quickstart
This guide gets you from zero to a running Reactor server on your machine. By the end you will have a project directory, a local dev server with ephemeral Postgres, and a deployed bundle ready for a remote target.
Prerequisites
Section titled “Prerequisites”- macOS or Linux — Windows is supported via WSL2.
- curl — for the install script (optional).
- Homebrew (macOS/Linux) or Rust 1.78+ — for CLI installation.
Install the CLI
Section titled “Install the CLI”brew install reactor-cloud/tap/reactorVerify the installation:
reactor versioncurl -fsSL https://reactor.cloud/install.sh | shAdd the install directory to your PATH if prompted, then verify:
reactor versionRequires Rust 1.78 or later:
cargo install reactor-cliOr build from source in the monorepo:
git clone https://github.com/reactor-cloud/reactor-cloud.gitcd reactor-cloudcargo build --release --package reactor-cliExpected output (version numbers will vary):
reactor-cli 0.1.0reactor-server (not running)Create a project
Section titled “Create a project”Initialize a new project in the current directory’s parent:
reactor init my-appcd my-appThis creates:
| Path | Purpose |
|---|---|
reactor.toml | Project manifest — ID, name, capability paths |
.reactorignore | Patterns excluded from deploy bundles |
functions/hello/index.ts | Sample HTTP function |
data/migrations/001_sample.sql | Sample database migration |
functions/, sites/, data/migrations/ | Empty scaffold directories |
Inspect the manifest:
reactor project showStart local development
Section titled “Start local development”From your project root:
reactor devreactor dev does the following:
- Starts an embedded PostgreSQL instance (ephemeral — data resets when you stop).
- Runs pending SQL migrations from
data/migrations/. - Launches
reactor-serverwith all capabilities enabled. - Prints the local endpoint (default
http://localhost:8080).
Leave this terminal open. Open a second terminal for the commands below.
Background mode
Section titled “Background mode”Prefer a daemon-style server?
reactor up # start in backgroundreactor status # check healthreactor down # stopVerify the server
Section titled “Verify the server”reactor doctorreactor data migrate # ensure migrations are appliedreactor functions list# Health checkcurl http://localhost:8080/health
# Invoke the sample functioncurl -X POST http://localhost:8080/fn/v1/hello \ -H "Content-Type: application/json" \ -d '{"name": "Reactor"}'Expected response:
{"message": "Hello, Reactor!"}npm install @reactor/clientimport { createClient } from '@reactor/client';
const reactor = createClient('http://localhost:8080');
const { data, error } = await reactor.functions.invoke('hello', { body: { name: 'Reactor' },});
console.log(data); // { message: "Hello, Reactor!" }Run database migrations
Section titled “Run database migrations”Migrations run automatically during reactor dev, but you can apply them manually:
reactor data migrateInspect a table after migration:
reactor data inspect itemsAuthenticate (optional for local dev)
Section titled “Authenticate (optional for local dev)”Local dev often runs with relaxed auth. When you connect to a remote server, log in first:
reactor loginreactor whoamiTokens are stored in your OS keychain or an environment variable, depending on context configuration.
Configure a deploy target
Section titled “Configure a deploy target”Before deploying, add a context — a named connection to a Reactor server:
# Local (created automatically by reactor dev in many setups)reactor context add local --endpoint http://localhost:8080
# Reactor.cloud productionreactor context add production \ --endpoint https://api.reactor.cloud \ --org my-org
reactor context use productionreactor loginList and inspect contexts:
reactor context listreactor context show productionBuild and deploy
Section titled “Build and deploy”When you are ready to push to a remote server:
# Build a deployment bundle (validates manifest, packages functions/sites/migrations)reactor build
# Deploy to the active contextreactor deployDeploy runs migrations on the target, uploads function bundles, and publishes site assets. Progress is printed to the terminal; use --output json in CI.
✓ Validated reactor.toml✓ Built bundle (1.2 MB)✓ Applied 1 migration✓ Deployed 1 function✓ Published site "web"Deployed to production (https://my-app.reactor.cloud)reactor deploy --output json{ "ok": true, "data": { "context": "production", "endpoint": "https://api.reactor.cloud", "functions_deployed": 1, "sites_deployed": 1, "migrations_applied": 1 }}Common issues
Section titled “Common issues”| Symptom | Fix |
|---|---|
project manifest not found | Run commands from the project root or pass --manifest path/to/reactor.toml |
connection refused on deploy | Check reactor context show — is the endpoint correct? Is the server running? |
| Port already in use | Stop other services on :8080 or set REACTOR_DEV_PORT=9090 |
| Migration failed | Run reactor data inspect <table> and fix SQL in data/migrations/ |
Run diagnostics anytime:
reactor doctorWhat’s next?
Section titled “What’s next?”- Your first app — end-to-end tutorial with auth, data, a function, and site deploy.
- Concepts — deep dive into
reactor.toml, contexts, and deployment grades. - CLI reference — full command list and global flags.