Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

CLI

reactor talks to /console/v1 with a console session, and to the platform routes with an operator token. Both can live in ~/.config/reactor/credentials.json. REACTOR_HOME overrides that directory.

Project commands read reactor.toml in the current directory.

Terminal window
reactor setup --url http://127.0.0.1:18000 --cluster local --email you@example.com --name "Ada Lovelace"
reactor login --url http://127.0.0.1:18000 --email you@example.com
reactor login --url http://127.0.0.1:18000 --token "$OPERATOR_TOKEN"

setup is the first run. It stores the console session. login --email stores a console token. login --token stores the platform operator token used by db migrate. A password flag or REACTOR_PASSWORD skips the prompt.

Terminal window
reactor projects
reactor projects create todos --link
reactor link --url http://127.0.0.1:18000 --ref <ref> --service-key <service key>
reactor keys rotate

projects lists projects this operator can open. create prints the ref, anon key, and service key once. --link writes reactor.toml and .reactor/service_key. link does the same write when you already have the key. keys rotate prints a new pair and rewrites .reactor/service_key when that file exists.

Terminal window
reactor deploy
reactor db migrate --all
reactor db tables
reactor db rows todos

deploy uses the service key in .reactor/service_key. It applies pending project migrations, uploads functions/<name>/ as zips, and uploads site/ as one deployment.

db migrate --all needs the operator token from login --token. --dry-run lists project refs and does not apply SQL. db tables and db rows read the linked project through the console. rows prints up to 50 lines.

Terminal window
reactor logs
reactor users
reactor members
reactor members add --email dev@example.com --name "Dev" --role developer
reactor cluster
reactor functions
reactor functions promote ping 2
reactor functions demote ping
reactor sites
reactor sites env
reactor sites env set SITE_BANNER "hello" --visible
reactor sites env unset SITE_BANNER
reactor storage

members add creates an operator if the email is new. The role default is developer. functions lists deployments. Promote pins a version. Demote clears the pin. sites env set without --visible stores a secret, and the value is not returned later.

cluster prints liveness. Platform-admin actions on operators are in the console.