Run it
Orbit operations
On this page
curl -fsSL https://runeditrun.com/install.sh | sh -s -- dev just-every/run-orbit
Git is required; rer brings Node and pnpm. Already have Node 22 or later? npx -y @runeditrun/rer dev just-every/ does the same.
Orbit runs through its RER CLI, rer VERB (or pnpm run VERB -- FLAGS), started from nothing with npx -y @runeditrun/rer dev just-every/ (or, without Node, the one-line installer on the Run page, which brings its own); project commands select the pinned Node 22.20.0 and pnpm 10.12.4. README.md gives the local sequence; rer describe prints every command, flag, effect and pin from OPERATIONS.json, and SEED-COMMAND-CONTRACT.md defines their shared behaviour and exit codes. rer check --profile first-party validates that contract structurally without dependencies or settings; it never claims hosted health.
Local installation
Start it with npx -y @runeditrun/rer dev just-every/, or run rer dev in an existing clone: it installs dependencies, prepares the local trial owner (owner@run-orbit.test, named after the run-orbit folder) and starts Orbit. Open RER_OPEN on this computer to sign in automatically. The optional explicit sequence is rer install, rer setup --owner-email EMAIL, rer dev. Stop dev and preview before CLI export, import, reset, build or verification.
| Path | Holds | Reset |
|---|---|---|
.wrangler/state/ | The local D1 database: owner, workspace, records | removed |
.dev.vars (0600) | OWNER_EMAIL, AUTH_ORIGIN, AUTH_LOCAL=true, MAIL_PROVIDER=development, MAIL_FROM, generated SESSION_SECRET, SETUP_TOKEN and ORBIT_ENCRYPTION_KEY | removed |
.rer/local/, .seed/installer/ | CLI bookkeeping, setup answers, private command logs and the checkout’s dev key (.rer/) | removed |
exports/, .rer/deploy/ | Your archives and deployment state | kept |
setup builds the Worker with .dev.vars moved aside, applies migrations/core to .wrangler/state, starts the built Worker briefly, posts the private SETUP_TOKEN to /auth/bootstrap to claim the first owner (an existing owner is kept), requests an ordinary sign-in link and stops. The owner’s workspace starts with reviewable defaults that the owner confirms at /setup; first-run completion is stored in D1 and survives later setups. dev serves Vite with the Cloudflare plugin on the saved loopback origin, runs the minute Cron Trigger locally and requests a fresh link before printing RER_READY. preview serves the fixed production build on the same state.
Sign-in is Base operator-auth over Orbit’s own operators and sessions. dev opens signed in: RER_OPEN trades the checkout’s dev key (.rer/, written by setup, replaced by reset) for a host-only cookie, and dev sign-in, the seller and collaborator personas answer 404 without that key, even through a tunnel. Dev sessions, and delegation credentials minted from one, count only behind the key; a deployment never has it. Local sign-in mail is never sent; sign-in is one click. Customer mail is real once its SendGrid settings are present. The CLI’s own sign-in requests carry an HMAC proof keyed by SESSION_SECRET, so restarting dev never spends the owner’s sign-in allowance; a person’s requests still do.
Build output under dist/ is disposable. Commands refuse a legacy store at dist/ before building, with exit 4, and never move or delete it: stop any app using it, copy what you need out of dist/, then remove it yourself. Settings, state and archive paths must stay inside the checkout without symlinks.
Deploy
For current run instructions, open /run/local or follow Local installation.
rer deploy [--environment NAME] builds locally, then uses the Base deploy kit against the owner’s Cloudflare account. Stop rer dev in the checkout first (rer dev --stop); deploy refuses while dev holds the local state.
- Inputs:
CLOUDFLARE_ACCOUNT_IDand an account API token inCLOUDFLARE_API_TOKENwith exactly Account · Workers Scripts · Edit and Account · D1 · Edit; the owner mailbox inOWNER_EMAIL. Hosted deployment requires both a verified SendGrid sender inMAIL_FROMand itsSENDGRID_API_KEY. The account needs a workers.dev subdomain. README → Deploy to your Cloudflare account gives the dashboard pages and steps for each value. Pass them as environment variables or in an owned 0600 file with--env-file(the README uses.dev.vars.deploy, which git ignores). - Optional secrets (
"optional": trueindeploy.json), uploaded only when present in the environment; the dry run lists them separately with the feature each turns on:MAIL_REPLY_TO,CAPTURE_MAIL_ADDRESS,SENDGRID_UNSUBSCRIBE_GROUP_ID,RER_MAIL_RELAY_SECRET,SENDGRID_WEBHOOK_PUBLIC_KEY,SENDGRID_PARSE_PUBLIC_KEY,ORBIT_ENCRYPTION_KEY,OPENAI_API_KEY,AI_MODEL,AI_INPUT_COST_PER_MILLION,AI_OUTPUT_COST_PER_MILLION,AI_CACHED_.INPUT_ COST_ PER_ MILLION deploy.jsondeclares the D1 binding, the minute Cron,AUTH_ORIGINand the secrets. The kit creates and ownssales-orbit-<environment>and its-dbdatabase, applies migrations with hash-checked history, uploads the Worker and assets, and checks/health. It never adopts a resource it did not create. To move an installation that runs elsewhere, export its Records archive and import it into the new one.- Deploy generates
SESSION_SECRETonce (Base sign-in links, step-up proofs and rate limits) and keeps the deployed one on later deploys, as it doesORBIT_ENCRYPTION_KEY. SetIDENTITY_PROVIDERto an Auth install’s address to offer provider sign-in; the owner approves the link with a fresh email proof and turns provider sign-in on at/auth/. Left empty, operators sign in by email link.settings/ identity - After health passes, deploy claims the first owner with a one-use setup token, removes that secret and records its retirement in the deployment receipt. Later deploys retain the existing owner without generating a token or claiming again. When upgrading an older deployment with an unretired token, leave
SETUP_TOKENunset: Base rotates it, confirms the existing owner and retires it. Sign in at/signinwithOWNER_EMAIL, then finish/setup. - Exporting or importing a Records archive and erasing an operator need a fresh email confirmation from the signed-in operator (Base step-up, 10 minutes); for the terminal transfer helper below, sign in by email link shortly before the transfer.
.rer/(0600) is the only proof of which resources the kit created. Keep it and back it up after every deploy; deploy from a committed checkout.deploy/ <environment>. json --dry-runbuilds and validates the declaration against the packaged Worker with no provider request and says that nothing was deployed.
Hosted sign-in and removal
Open the deployed origin’s /signin, enter an active operator email, follow the emailed link and press Confirm. Change the owner email in Settings › Team › Owner email while signed in. Hosted sign-in requires a verified MAIL_FROM and SENDGRID_API_KEY; local dev keys never authenticate to hosted Orbit. If access fails, check the operator is active and the hosted mail configuration is complete. Restore retains current full operators and the active hosted owner, imports new archived operators as ordinary operators and keeps the target identity when IDs match. When the installation already has a different owner, the archive’s own owner, the local trial owner and rer dev personas (@dev.localhost) are restored without access, for historical attribution only; their open opportunities become unassigned and their scheduled messages are cancelled. Matching mailboxes keep archive IDs for historical attribution and retain current access, name and owner status. An ID that conflicts with another current mailbox is refused before data changes; change the source operator email and export again. Collaborators need renewed invitations after restore. Sessions are revoked on success: request a fresh link to that owner’s mailbox.
To remove this checkout’s deployment after saving a private backup:
rer deploy --remove --yes --env-file .dev.vars.deploy
Add the same --environment NAME used to deploy. Preserve .rer/; it identifies the Worker and database created by the kit. Removal deletes the owned hosted resources and their data and reads back that they are gone. It does not remove local data or resources the kit did not create.
Mail and providers
Hosted native sign-in requires MAIL_FROM and SENDGRID_API_KEY. Customer outreach also requires MAIL_REPLY_TO and SENDGRID_UNSUBSCRIBE_GROUP_ID. Configure the reply address’s SendGrid Inbound Parse route to /api/ with its SENDGRID_PARSE_PUBLIC_KEY. Delivery outcomes (delivered, bounced, dropped, unsubscribes and spam reports) need one of two connections. Settings › Mail › Delivery reports walks the owner through the usual one: a SendGrid signed Event Webhook posting to /api/, with its verification key in SENDGRID_WEBHOOK_PUBLIC_KEY. It shows the exact Post URL, the events to tick and the deploy command, and reports connected/not connected with the time of the last signed event. A fleet can instead use the pinned Base event relay at /api/ with RER_MAIL_RELAY_SECRET; the relay must forward only this product’s events. Add a new Event Webhook rather than replacing another app’s. Until one is connected, sent messages say “Accepted by SendGrid · delivery not tracked”. Email Activity access supports reconciliation of unknown submissions without another send. Sending to customers needs a configured provider in an ordinary installation. Under rer demo, reviewed sends return success without contacting the provider.
Settings › Mail › Sender shows the hosted commands with your deployment environment. MAIL_FROM is a public variable in deploy.json: apply a new or changed sender with a full rer deploy --env-file .dev.vars.deploy, adding the same --environment NAME used for that installation. The full deployment reads all four mail values from the private file. For later changes to just SENDGRID_API_KEY, MAIL_REPLY_TO or SENDGRID_UNSUBSCRIBE_GROUP_ID, the page also gives separate --set-secret NAME commands; run the matching line independently. MAIL_FROM cannot be applied with --set-secret. Return to Sender and choose Check sender configuration, then send yourself the reviewed test.
Verified SendGrid, inbound-reply and relay requests share a durable limit of 600 requests per minute, after cryptographic verification. Invalid traffic uses the 300-request public per-IP limit and cannot consume that provider quota. A known provider identity with changed contents is recorded in source diagnostics and acknowledged without applying the replacement. Storage failures remain retryable; each provider event’s receipt and effects commit together.
Signed sources, AI and the minute timer
Read-only mailbox and calendar capture is configured on Capture, separately from customer sending and native sign-in. The default needs no provider console: an operator creates a private Orbit address (BCC, forward or auto-forward customer mail to it) and adds a calendar by its private iCal link. The Orbit address needs one hosting step: set CAPTURE_MAIL_ADDRESS (for example orbit@capture.example.com) and route that mailbox to this Worker, either with Cloudflare Email Routing (a rule for the address with Send to a Worker, and Subaddressing on, so tagged orbit+tag@ addresses reach the same rule) or with SendGrid Inbound Parse for its host posting the raw MIME message to /api/, signed with the same SENDGRID_PARSE_PUBLIC_KEY as the reply route. Without it, Capture says the address is not available and shows those steps. Mailbox access through the owner’s own OAuth client stays available as a guided setup: Gmail and Google Calendar, Outlook and Microsoft calendars. Select labels/folders and calendars explicitly; calendars require a fixed date window. No provider intake occurs until that scope is saved. The app shows sync status and reviewed proposals, and disconnect deletes tokens immediately. Live-account acceptance remains the procedure in OWNER-STEPS.md.
Provider access tokens, refresh tokens, client secrets and pending OAuth exchanges are encrypted with ORBIT_ENCRYPTION_KEY. Keep that key stable and private. Losing or replacing it requires reconnecting sources. Restored sources also require reconnecting because credentials, pending OAuth exchanges and sync leases are excluded from archives.
Signed signal sources need a persistent ORBIT_ENCRYPTION_KEY (32 random bytes, 64 hexadecimal characters) to encrypt their configured HMAC secrets in D1. Configure sources in Settings › Capture › Website and app events; clients sign the exact raw request body with the source’s timestamp and HMAC as the source screen describes. Losing the encryption key requires reconfiguring the source secrets; it does not erase data.
AI is optional. Set OPENAI_API_KEY, AI_MODEL, AI_INPUT_COST_PER_MILLION, and AI_OUTPUT_COST_PER_MILLION to configure it. AI_CACHED_ applies the selected cached-input rate. Without that rate, estimates use the normal input rate and can overestimate. The operator previews the exact request before generation; no AI request approves mail.
The Worker runs a minute Cron for bounded provider capture, scheduled dispatch, timed queue transitions, retryable failures, reconciliation and removal of transfer copies left by an interrupted erasure. Operator mutations evaluate pending changes within their request. An ambiguous submission is reconciled by its durable key, never blindly resent. Monitor visible message states, source diagnostics and stale evaluations in the operator app. /health checks the D1 schema; provider readiness and workflow outcome checks are separate.
Moving data
Local package-mode archives: rer export --output exports/FILE and rer import --input exports/FILE --yes use Base portability over the local D1. Every Orbit table moves except installation-bound state: operator sessions and sign-in links, owner bootstrap records, rate limits, runtime controls, erasure signals, collaborator authority (access_grants, access_invitations, access_form_authorities, access_write_guards), mail and calendar capture credentials (capture_credentials, capture_oauth, capture_locks; reconnect a provider source after restore), delegation credentials (delegation_*), installation-bound agent door policy/approval/audit/event custody and Business person mappings (agent_door_*, bs_*, orbit_agent_write_context; reapply signed settings and policy at the destination; native record/timeline attribution remains in the archive), Records-archive bookkeeping (archive_*), private CSV originals, reviews, import jobs and undo custody (ik_*, crm_import_*). Signal source secrets are written as null; reconfigure them after restore. Full-text search is rebuilt from the restored rows. The receipt reports the content hash, row counts and exclusions; export, import and export again give the same content hash. Import needs an empty destination: run it after reset --yes, then setup --owner-email with the archive’s owner.
Local restore withdraws published contact forms because their capture authorization does not travel. In Settings › Forms, choose Reopen latest publication, review a new contact limit and expiry, then Approve reviewed page and Publish approved page. The form text, reviewed page and existing submissions remain available.
Hosted archives: Settings › Data › Export and restore prepares, resumes, downloads, restores and cancels the hosted installation’s own archive. The CLI also supports this archive through Orbit’s remote portability adapter. From a checkout with dependencies installed, sign in by an ordinary email link shortly before the transfer (archive operations require fresh email confirmation within 10 minutes). Put only __Host-orbit_session=... from that sign-in in an owned private (0600) file under the ignored .rer/ directory and run:
rer export --target remote --origin https://your-origin.example --session-file .rer/orbit-cookie --output exports/orbit-hosted.json
rer import --target remote --origin https://empty-origin.example --session-file .rer/orbit-cookie --input exports/orbit-hosted.json --yes
Remote export was observed working on Orbit v0.2.0 with rer 0.2.59 (an orbit-export version 3 archive). The current rer 0.2.72 pin explicitly accepts Orbit’s remote-capable adapter; its hosted-export refusal applies only to adapters without remote support. Use the destination operator’s fresh session file for import. Wait for Verified archive saved before treating an export as complete. These commands call Orbit’s scripts/ helper over the authenticated Records archive API; they do not export the local D1 database. Without --target remote, CLI transfers use the separate local archive format above.
Raw D1 SQL export is not a supported Orbit backup: Orbit’s FTS5 search tables prevent that export. Use the authenticated Records archive for hosted backup and recovery, as described in MIGRATION-RECOVERY.md. Worker secrets must be saved separately in private storage.
The hosted archive is an orbit-export version 3 JSON document (orbit-fold-1) framed as bounded lines. The reader retains version 2 compatibility; restore validates the archive against the supported native lineage and destination schema. A version 3 archive requires an edition supporting that generation and matching schema, not an arbitrary older checkout. The transfer streams it to disk, verifies every part checksum, and publishes the private file only after the closing record and manifest counts validate. Export keeps a private adjacent .transfer.json checkpoint and .partial download until verified completion; an interrupted transfer is resumed or discarded from Settings › Data › Export and restore with its transfer ID. The remote CLI commands above do not forward --resume; use Settings › Data › Export and restore to resume. After downloading, the immutable snapshot retains the transfer slot. A repeat export shows your active transfer ID: enter it under Settings › Data › Export and restore and choose Resume export to download the same snapshot, or Discard export, clear the ID and Prepare export to include later edits. Other operators cannot see your transfer ID. Export takes a consistent atomic snapshot before serializing; workspace edits can continue during preparation. Import requires an empty customer database, preserves the current hosted owner as active while importing archived operators, revokes sessions on success and never blindly retries an ambiguous write. Hosted archives exclude sessions, sign-in and identity proofs, owner bootstrap and first-run metadata, runtime and rate-limit state, delegation credentials, installation-bound agent door policy/approval/audit/event custody and Business mappings, collaborator grants/invitations/form authority, archive bookkeeping, private CSV originals and import custody, capture credentials/OAuth/leases, and search indexes. Signal source secrets are omitted; search is rebuilt. Published contact forms are withdrawn because their capture authorization does not travel. In Forms, choose Reopen latest publication, review a new contact limit and expiry, then Approve reviewed page and Publish approved page. Native operators, customer records and privacy matching contexts travel. Worker secrets do not. Keep the archive, checkpoint and partial files private (0600), copy completed backups to private storage outside the checkout, and remove session-cookie files when finished. See MIGRATION-RECOVERY.md for a clean separate restore. CLI local archives and Records archives use different formats. To move local records to hosted, export through Settings › Data › Export and restore in the local app and restore that archive through the same section on hosted.
Contact do-not-contact safety survives deletion through anonymous keyed matching proofs in the audit trail. Suppression and clear receipts are appended with their actual recorded times; clearing does not delete the earlier audit proof. The mailbox itself and its personal history are erased. Each installation generates a privacy matching context; it is available only in the authenticated private archive, so restoring an archive can still match previously suppressed addresses. Treat archives and their backup copies as confidential. Restore preserves existing safety contexts and proofs and restores the exact prior state on rollback. Ordinary record saves and imports cannot clear suppression. Use the separate reviewed contact action; it never revives a cancelled message.
Contact erasure also retains anonymous keyed capture replay proofs and erasure times, without addresses, subjects, original message IDs or snippets. They prevent a provider resync or re-import from recreating erased originals and historical evidence containing that mailbox; genuinely new evidence remains eligible for the normal matching and review rules. These proofs and their private matching contexts travel in archives. Records restore preserves the destination’s existing anonymous proofs for subsequent intake; restoring an owner-supplied historical archive retains the existing archive restoration behavior. Erasures completed before these proofs existed cannot gain replay protection for identities already removed.
Deleting a contact erases the person’s data and makes every prepared or staged Records transfer copy unreachable in one atomic database batch (the transfer jobs, stored parts and segments are replaced by empty ones, so every copy belongs to a job that no longer exists). The orphaned copies and old parts are then removed in bounded batches (at most 20,000 narrow rows or 8 stored parts per statement), and the minute timer finishes any removal an interruption left behind.
Verification
rer verify runs retained user flows within the 200-test seed budget and blocks failed or skipped checks; TESTING.md lists its gates. Read ACCEPTANCE.md for the provider, capacity, deployment and owner-change requirements that local verification does not establish.
Hosted scheduling is available immediately. Cloudflare can take several minutes to activate a new Cron trigger. Until then, due sends and follow-ups are processed when a signed-in operator next opens Orbit or reads its API. A shared D1 lease bounds request work to one mail dispatch and reconciliation item per pass, with five seconds between completed passes and a thirty-second lease for interrupted work. Cron continues processing due work independently. Both paths use the same atomic message claim and current permission/content checks, so a request racing Cron cannot send the same attempt twice. The opportunity page shows the approved time and actual Cron health, and explains that due sends wait for the next use while the timer is starting.
Managed mail and transfer resume
Managed and Assisted previews select MAIL_PROVIDER=rer with the assigned MAIL_FROM, MAIL_RELAY_URL and secret MAIL_API_KEY. Sign-in, sender tests and approved customer mail use that relay. Direct deployments continue to use the configured SendGrid key, reply address and unsubscribe group; local sign-in remains automatic while approved local customer mail uses SendGrid. Provider acceptance does not confirm delivery. An uncertain managed submission stays unresolved without automatic resend.
Settings › Data › Export and restore saves progress after each request. Returning to the panel resumes an unfinished export or an already uploaded restore. For a part-way upload, choose the same unchanged archive and tick the confirmation again. A content digest covers its validated manifest and ordered part hashes; the server checks the durable uploaded content before applying it. Completed exports say “Finished — ready to download”.
Optional form challenge
Forms use SESSION_SECRET for server-issued fill proofs and anonymous network rate buckets. To enable Cloudflare Turnstile for a form, enter the public site key in the form editor and set its matching secret as ORBIT_FORM_TURNSTILE_SECRET on the installation before publishing.
- On this computer, add the secret to the private
.dev.varsfile in the Orbit folder, then stop and restart local Orbit withrer dev --stopandrer dev. - On your Cloudflare deployment, add the secret to the private
.dev.vars.deployfile in the Orbit folder used for deployment. Runrer deploy --env-file .dev.vars.deploy --set-secret ORBIT_FORM_TURNSTILE_SECRETthere. If you deployed with--environment, pass the same environment again.
Review and publish the protected revision. A form with an empty site key makes no Turnstile request. Missing or failed verification refuses the enquiry with a visible reason in Forms → Read spam and refusals. Full operators can release its saved original once or erase it. Withdrawn or expired publication authority blocks release.
Existing form artifacts compiled before abuse protection must be saved, compiled, reviewed and published again to supply the new fill proof. Their exact saved bytes remain unchanged; submissions without that proof are refused and available for review.