CLI reference
Every one9x command and flag — login, tokens, pages create/release/deploy/diff/releases, and domains.
read as markdownOne binary, one9x. Products are subcommand groups (pages); sites and
domains are account-level nouns shared across products. Everywhere a site is
named it’s the --site flag. It takes the site’s name — its subdomain — and
also accepts a numeric id, a platform host, or a custom domain you have linked.
| Global flag | Description | |
|---|---|---|
--portal <url> | optional | Portal base URL. Also ONE9X_PORTAL; defaults to portal.one9x.com. |
--json | optional | Emit machine-readable JSON on stdout. Progress goes to stderr. |
-v, --version | optional | Print the CLI’s version and exit. |
| Environment variable | Description |
|---|---|
ONE9X_TOKEN | A machine token to use instead of the stored login — for CI, cron and agents. |
ONE9X_PORTAL | Portal base URL, as --portal; the flag wins if both are set. |
ONE9X_CONFIG_DIR | Where the CLI keeps its login and its update-check cache. Defaults to a one9x folder in your user config directory (~/.config/one9x on Linux). |
ONE9X_NO_UPDATE_CHECK | Set to any value to turn off the once-a-day check for a newer version. It also turns off ONE9X_AUTO_UPDATE. |
ONE9X_AUTO_UPDATE | Set to 1 to install a newer published version automatically before a command runs. It takes effect from the next command; if it fails, nothing changes and the command runs as usual. Off by default. |
one9x login / logout / whoami
Authorize the CLI against your One9x account and store a token locally. Run once per machine — the login renews itself, so it doesn’t expire out from under you.
On a server with no browser, add --no-browser and approve the printed URL from
any other device. In CI, skip login entirely and set ONE9X_TOKEN to a machine
token.
one9x tokens
Machine tokens authenticate CI, cron and agents with no browser.
| Command | |
|---|---|
tokens create <name> | Mints one and prints it once — store it then, because it is hashed and can never be shown again. --expires-in <days> chooses the lifetime, up to 365; the default is 90. |
tokens extend <id> | Pushes the expiry out without changing the secret, so CI keeps working with the value it already has. --expires-in <days> sets the new expiry that many days from now — default 90, up to 365. Expiry only moves forward. |
tokens list | What exists, when each was last used, when each expires. |
tokens revoke <id> | Kills one immediately, after confirming — --yes skips the prompt. |
one9x pages create / list / rm
pages create <name> makes a new site — the name becomes <name>.one9x.app and
is what you pass to --site. --title sets the display title; it defaults to the
name. pages list shows your sites and their status, and
pages rm --site <site> deletes one, after confirming — --yes skips the prompt for scripts.
Deleting takes the site offline at once and frees its name for anyone to take. Its custom domains are detached but stay on your account, ready to use on another site. The content — releases, forms and submissions — is kept for 45 days and then purged; you can’t restore it yourself in the meantime.
one9x pages release <dir>
Upload a directory as a new release. Staged unless you pass --deploy.
| Flag | Description | |
|---|---|---|
--site <site> | required | Site name (subdomain), host, custom domain, or numeric id. |
--deploy | optional | Make this release live immediately instead of staging it. |
--spa | optional | Serve /index.html (200) for unmatched routes. |
--index <path> | optional | File to serve for / instead of /index.html, for a build that has none — e.g. /install.sh. Same slot as --spa, so unmatched routes get it too. |
--error <code>:<path> | repeatable | Map an HTTP status code to a page in the build. |
--tag <name> | optional | Label the release. Tagged releases survive retention. |
--exclude <glob> | repeatable | Leave matching paths out. Matched against the path relative to the directory and against the file name. |
one9x pages deploy
Make an existing release live. Uploads nothing — this is both go-live and rollback.
| Flag | Description | |
|---|---|---|
--site <site> | required | Which site to re-point. |
--to <ref> | required | Release number (v6), tag (prod), or hash prefix. --to "" is the previous release. |
one9x pages diff <ref>
Compare a release against a baseline, file by file. See Reviewing a change.
| Flag | Description | |
|---|---|---|
--site <site> | required | Which site the release belongs to. |
--against <ref> | live | Baseline to compare against. none skips the comparison. |
--all | off | Include unchanged files in the listing. |
one9x pages releases
releases list --site <site> shows a site’s history, newest first, with each
release’s number, tag and status. releases rm <ref> --site <site> deletes one,
freeing a tag slot, after confirming — --yes skips the prompt. The live
release can’t be deleted.
one9x domains
Custom domains, top-level rather than under a product.
| Command | |
|---|---|
domains link <domain> --site <site> | Routes a name to a site and starts verification. |
domains verify <domain> --site <site> | Checks DNS and advances it. |
domains list | Every name on the account, or one site’s with --site. |
domains unlink <domain> | Stops a name routing but keeps it and its certificate. |
domains release <domain> | Gives it up entirely. Asks for confirmation; --yes skips it. |
unlink and release do not take --site — the owning site is looked up from
the name.
one9x update
Updates the one9x binary in place to the published version. It is the same
build get.one9x.com serves, so this is the upgrade path on a machine where
re-running the installer would be awkward.
| Flag | Description | |
|---|---|---|
--check | optional | Report whether an update is available; install nothing. |
--to <version> | optional | Install a specific version, e.g. v0.3.1, instead of the published one. |
one9x mcp
Speaks MCP over stdin/stdout so an AI agent can deploy as a tool call. See Deploy from an agent.
one9x completion
Generates a completion script for bash, zsh, fish or powershell. Beyond
command and flag names, values complete against your account: --site offers
your site names, --to offers that site’s releases and tags, and the domain
commands offer your domains. If you’re logged out or offline it silently offers
nothing rather than erroring into your prompt.