Commands
Every xo command on one page, the settings it reads, and where to go for the lower-level API commands.
xo --help lists every command, and --help after any of them shows its
flags. The options go before or after the command.
Log in
| Command | Does |
|---|---|
xo login | signs you in to XO in your browser, links the quirq hub's client when the xo server keeps a hub, and connects gh to GitHub |
xo login --key | asks for an XO API key instead of opening the browser |
xo login xo / xo login github | only the XO key / only GitHub |
xo status | each service, its address, and whether you are logged in; never a key |
xo logout | deletes your XO key and the hub's address; asks before logging gh out |
xo me | your profile: name, image, email, public and private metadata |
Spaces
| Command | Does |
|---|---|
xo create space NAME KIND | creates a space on XO Cloud and records it as NAME (kinds) |
xo create space [NAME] | makes a folder a space on the quirq hub (the one you are in, named after it, or ./NAME, made if it is not there): one branch per git repository in it, pushed to the hub after you say yes, or to GitHub with --github; a folder that is already a git repository keeps its own branches; nothing on XO Cloud (how) |
xo spaces (or xo list spaces) | your spaces, with their projects and refs |
xo spaces --space-id ID | XO Cloud's view of a space you own, with its connection URLs |
xo connect P S --ref REF | puts project P in space S at a branch, tag or commit (default main); adds P to your projects first if it is not there yet (how) |
xo connect S / xo connect S --id ID | a new space entry / one for an XO Cloud space you already have |
xo install space:S | clones or fetches each project into ./S/REPO at its ref |
xo update space:S | pushes each branch with new commits under ./S (to the quirq hub once xo login found one), then records the refs |
xo sync space:S | rebases each branch on its upstream (or the hub's branch) and pushes it, merges the space's changes with yours, records them |
Projects
| Command | Does |
|---|---|
xo create project URL / xo create project NAME | adds a project: a clone at ./REPO, or an empty repository at ./NAME |
xo projects (or xo list projects) | your projects |
xo projects add NAME | adds a name to your projects list |
xo connect P --repo URL | gives a plain project its GitHub repo |
xo install, update, sync project:P | clone or fast-forward, push, or rebase and push one project |
xo list | your projects and your spaces together |
Sharing
| Command | Does |
|---|---|
xo share space:S USER / xo share project:P USER | invites USER to a copy (GitHub projects only) |
xo list shared | the invites waiting on you |
xo accept ID | shows the invite, asks, then adds it (--as NAME, --space S, --ref REF, --yes) |
xo reject ID | takes the invite off |
Other tools
| Command | Does |
|---|---|
xo gh ARGS | runs GitHub's gh with these arguments (xo gh pr list) |
xo sh ARGS | runs the quirq hub's client, spacehub, with these arguments, on the hub xo login found (xo sh project list; the hub) |
The arguments go to the tool as they are, and its input, output and exit
code are its own. Neither tool gets your XO key; spacehub gets no GitHub
token either. Put the word first: xo gh pr list, not xo --json gh pr list
(xo's own options do not apply to it). sh is a word inside xo only: the
hub's client is installed as spacehub, never as sh, the system shell.
Settings
| Setting | Variable | Flag | Default |
|---|---|---|---|
| XO API key | XO_API_KEY | --api-key - (asks without showing it) | the key xo login saved |
| Address | XO_URL | --url URL | the one xo login saved, then https://xo.quirq.dev |
A saved key is only ever sent to the address it was saved with, so a one-off
--url needs --api-key - or XO_API_KEY. Avoid --api-key KEY itself: the
key would land in your shell history and the process list.
Responses print as JSON on stdout. Any problem exits 1 with one line on
stderr, starting xo:, that says why.
Lower level and self-hosting
xo ops, xo call and xo api reach XO Cloud's API operation by operation
(through the xo server, only the creates and xo spaces --space-id pass);
the xo README covers them. To
run your own xo server, see
deploy-vercel.md
in the xo repo.