@oodarun/cli
v0.1.49
Published
Publish static sites and manage their access, versions and secrets
Readme
@oodarun/cli
Publish a static site to a permanent, shareable URL.
Point ooda at an HTML file, a folder, or a project's build output and get
https://{slug}.ooda.run — with access control, versioning, and runtime config.
Every command is non-interactive, so agents and CI can drive it end to end.
Quick start
Your coding agent runs the CLI. The setup depends on where the agent runs: on your computer (a local agent) or in a sandbox (a cloud agent).
Local agents
curl -fsSL https://ooda.run/install | sh
ooda login
ooda publish ./index.html # …or a folder, or a project rootThe installer puts a standalone binary in ~/.ooda/bin. It does not need
Node.js. It supports macOS and Linux on x64 and arm64. Set OODA_VERSION to
install a specific version. Run ooda upgrade to update it.
The CLI is also on npm. Use npm on Windows, or when you prefer it:
npm install -g @oodarun/cli. You can also run it without an install with
npx @oodarun/cli@latest. Either way, the CLI tells you when a newer version is
available.
Sign-in is a 6-digit email code. Your session is saved to ~/.ooda/auth.json
(mode 0600), so you only do it once.
Then tell your agent: "Fetch https://ooda.run/skill.md and follow its instructions."
Cloud agents
Cloud agents, such as Claude Code on the web, Codex, ChatGPT and Claude.ai, run their code in a sandbox, and most sandboxes block ooda by default. Set up the network once for each environment:
- Claude Code on the web: in the environment settings, set Network access to Custom. Add
ooda.runand*.ooda.runto Allowed domains, and select Also include default list of common package managers. - Codex: in the cloud environment settings, set Agent internet access to On. Choose the Common dependencies allowlist and add
ooda.runandapi.ooda.run. Keep all HTTP methods allowed, because a publish usesPOST. Codex runs a task without you, so send the login code as a follow-up message. - ChatGPT: use Work, not Chat: switch the toggle at the top of ChatGPT. Code in a Chat conversation cannot reach ooda. If a Work conversation is blocked too, turn on Settings → Data controls → Work network access. In a workspace, an admin can turn this off.
- Claude.ai: in Settings → Capabilities → Code execution and file creation, turn on Allow network egress. If the allowlist is not All domains, add
ooda.runand*.ooda.run. On Team and Enterprise plans, an admin controls this setting.
The sandbox keeps no session, so add an access token to its environment variables:
- Open Create a token in the dashboard. The link fills in the two scopes a publish needs, Read sites and Publish sites.
- Copy the
OODA_TOKEN=…line. The token appears only once. - Paste the line into the environment variables of the sandbox, not into the chat (Claude Code on the web: Environment variables; Codex: Environment variables, not Secrets). Then start a new session.
The CLI reads OODA_TOKEN by itself, so the agent publishes with no
ooda login. For an account in several orgs, choose a default org for the
token, or set OODA_ORG_ID.
ChatGPT and Claude.ai have no environment variables. There, the agent signs in
with an email code in each new session. The agent runs
ooda login --email [email protected], you paste the code into the chat, and the
agent runs ooda login --email [email protected] --code 123456.
A sandbox installs the CLI with npm. The sandboxes include Node.js and
allow the npm registry, and the Node CLI reads HTTPS_PROXY, HTTP_PROXY
and NO_PROXY. Some sandbox proxies do not work with the standalone binary. An older CLI needs NODE_USE_ENV_PROXY=1.
Publishing
ooda publish never runs your build. Point it at any of three things:
ooda publish ./page.html # a single HTML file → served at /
ooda publish ./my-site # a folder with index.html → the folder IS the site
ooda publish # a project root → its dist/ (or build/, out/, …) is the siteA project root with both index.html and dist/ publishes dist/ — the build
output is the site, the root is the source.
ooda publish --slug my-app # choose the slug
ooda publish --title "My App" --description "A demo blog" --tags blog,astro
ooda publish --message "new hero copy" # note what changed, per version
ooda publish --draft # upload a version without making it live
ooda publish --org acme # publish to another of your orgs
ooda publish --dry-run # say what would happen, upload nothing
ooda publish --new # a separate copy, not the site in ooda.json
ooda publish --json # machine-readable outputBefore it uploads, every publish says what it is about to do:
→ Updating Acme/portfolio-k3x9 (v3 → v4)
→ Creating a new site in Acme: portfolio-k3x9The resolved slug is written back to ooda.json, so re-publishing keeps the same
URL. So is the version, which the next publish sends back: if anyone has
published that site since, the publish stops with stale_base rather than
replacing their work. An ooda.json with no version skips the check once,
then records one.
A slug that names an existing site means that site. When the slug comes from
--slug or ooda.json, the publish updates that site or stops with exit code 1
and the reason — it never publishes a copy somewhere else:
| --json code | What happened | What fixes it |
|---|---|---|
| not_site_owner | Another member owns the site and you aren't one of its editors (owner, yourRole, requiredRole) | The owner or an org admin adds you as an editor, or --new |
| site_exists | A same-org site this folder didn't publish | --force to replace it, or --new |
| site_in_other_org | The site is in another of your orgs | --org <id>, ooda switch <id>, or --new |
| slug_taken | The site belongs to an org you are not in | --new |
| stale_base | Someone published a newer version since this folder last did (latest says who, when and their message) | Bring their changes into this folder and publish again (ooda pull fetches their version into a new folder), or --force to replace them |
Each refusal also lists its fixes under fix, with the exact command to run.
A new site's name never fails the publish. A folder name that is taken or
reserved, and the rule that new {slug}.ooda.run addresses end in a random
suffix, all resolve to a free suffixed slug, preferring one the server
suggests. The publish reports the slug it landed on (requestedSlug in
--json).
Publishing a folder skips what you never meant to serve — .git/, .env,
node_modules/, dotfiles, and ooda.json — and prints exactly what it skipped,
so nothing is dropped silently. .well-known/ is kept, because it's a real web
path (ACME challenges, security.txt).
A file set with no index.html is refused — by the CLI and the server,
because the site would publish "successfully" and then 404 at its own URL. Pass
--force if you meant it.
A single file is its own site. Its slug is remembered under files in the
neighbouring ooda.json, never the folder's own slug:
{ "slug": "my-site", "files": { "about.html": { "slug": "about" } } }Access control
Every site has an access mode. The org default is login — org members only.
ooda sites list # what's published, and who owns it
ooda sites list --owner me --tag travel --query offsite # narrowed: your sites, a tag, any text
ooda sites access my-app --mode public # anyone with the link
ooda sites access my-app --mode password --password hunter2 # shared password
ooda sites access my-app --mode login # org members only
ooda sites access my-app --clear-mode # inherit the org defaultVersions
Every publish appends a version. Making an old one live is a pointer move, not a re-upload.
ooda sites versions my-app # list versions, marking the live one
ooda sites pin my-app 3 # make version 3 live
ooda sites pin my-app latest # re-pin the newest
ooda sites delete my-app # unpublishEditors
A site's owner and org admins can let other members publish to it. Editors can't change its access, variables or editors.
ooda members # the org's members and their emails
ooda sites share my-app [email protected] # let Bob edit my-app
ooda sites sharing my-app # owner and editors
ooda sites unshare my-app [email protected] # take it awayA personal access token needs the sites:share scope for share and
unshare. It is off unless you tick it when you create the token.
Pulling a site into a folder
ooda pull downloads a published site's live files into a folder, with an
ooda.json that points at the site and records the version, so ooda publish
from that folder updates the same site. Use it to pick up a teammate's site,
recover one whose folder is gone, or compare against a newer version after a
stale_base refusal.
ooda pull my-app-k3x9 # into ./my-app-k3x9
ooda pull my-app-k3x9 my-app-v5 # into a folder you nameThese are the files ooda serves. For a site built from source code, that's the
build output, not the source. A folder that already has files is refused unless
you pass --force, which replaces same-named files and deletes nothing.
Env vars & secrets
Give a site configuration without hardcoding it. A value is either a
non-secret env var (--env) or a true secret (the default).
ooda secrets set API_URL=https://api.example.com --env # org-wide, public
ooda secrets set STRIPE_KEY=sk_live_... --site my-app # per-site, private
ooda secrets use API_URL --site my-app # this site uses that org var
ooda secrets list --site my-app # masked — keys only, never values
ooda secrets check # reconcile ooda.json's `secrets` manifest--envvalues are delivered to the page aswindow.__OODA_ENV__.KEY.- True secrets are never exposed to the browser. A site reaches them through
a same-origin proxy (
/__ooda/proxy/<name>/…) that injects the credential server-side. - The CLI never prints a value back — there is no
revealcommand, because the CLI is usually driven by an LLM. An admin reveals in the dashboard.
Commands
ooda # your org + published sites
ooda login | whoami | logout # email-code sign-in, session check, sign out
ooda orgs | switch <org-id> # list your orgs, choose the current one
ooda publish [path] # publish an .html file, a folder, or a build dir
ooda pull <slug> [dir] # download a published site into a folder
ooda sites [list|access|password|versions|pin|delete]
ooda secrets [set|list|use|rm|check]
ooda comments [slug|reply|resolve|reopen] # read and close comments on a site
ooda --help # full command + flag referenceEvery command takes --json for machine-readable output. An unrecognised
command exits non-zero.
Auth options
| Method | Details |
|--------|---------|
| Interactive | ooda login — a 6-digit email code (saved to ~/.ooda/auth.json) |
| Flags | ooda login --email [email protected] --code 123456 --json |
| Access token | Set OODA_TOKEN to a personal access token from the dashboard (Account). For cloud agents and CI. |
| Environment | Set OODA_ACCESS_TOKEN and OODA_ORG_ID to skip login entirely |
With the env vars set, every command runs fully non-interactively and exits 0 on success, non-zero on error — which is what you want in CI or an agent loop.
Several orgs
One account can belong to several orgs. Every command acts on the current org,
which ooda whoami prints. ooda orgs lists your orgs, and ooda switch
<org-id> changes the current one. A switch needs no new login. You join
another org in the dashboard, through an email invite or a join link. With
OODA_ORG_ID set, that variable sets the org and ooda switch refuses.
To act on another org for one command only, add --org <org-id> to
publish, sites or secrets. The current org does not change. Other
commands refuse --org.
ooda publish records the org that owns the slug as orgId in ooda.json. A
re-publish goes to that org, whatever the current org is. --org with a
different org is refused, unless --slug names a separate site. If an older
ooda.json has no orgId and its slug is in another of your orgs, the publish
stops and names that org.
Requirements
- macOS or Linux for the standalone binary, or Node.js 20+ for the npm package
- An ooda account — org admins invite members, or sign up at ooda.run
More info
- ooda.run — marketing site
- ooda.run/docs — documentation
- npm — package registry
