# Commands Every command of this `aircloud` build (`0.1.12`), as `aircloud help ` prints it. Exit status: 0 done, 1 refused or failed, 2 usage. The generators' own commands are in [generators.md](generators.md). ## Options every command takes | option | | |---|---| | `--verbose` | Print every API and identity-provider exchange on stderr: method, URL (query values elided), status, duration, request and correlation ids | | `--membership ` | Act as this one of your memberships, by id (sent as X-Air-Membership; default: your only one) | ## `aircloud new` Create a product directory in its conventional shape ```sh aircloud new [--name ] [--site react|static] [--api] [--css tailwind|css] [--runtime js|rust] [--skip-git|-G] [--pretend] ``` | option | | |---|---| | `--name ` | The product's human name, in any script, written as aircloud.toml `name`: the site's title (default: the slug humanized). The slug stays the product's identity | | `--site react\|static` | The site template (default: the product's [generators].site, else react) | | `--api` | An API product: no site (excludes --site and --css) | | `--css tailwind\|css` | The site's styling (default: tailwind for react, css for static) | | `--runtime js\|rust` | The runtime of the generated code (default: the product's [generators].runtime, else js) | | `-G, --skip-git` | Do not initialize a git repository, .gitignore or .gitattributes | | `--pretend` | Write nothing: print each path as create, modify or remove | ```sh aircloud new shop aircloud new loja --name 'Loja da Ana' aircloud new shop --api --runtime rust aircloud new blog --site static ``` ## `aircloud generate` Add to the product in its shape (a generator) Its subcommands are the generators: see [generators.md](generators.md). ## `aircloud destroy` Remove what a generator added Its subcommands are the generators: see [generators.md](generators.md). ## `aircloud check` Validate the product with the platform's own engine ```sh aircloud check [options] ``` | option | | |---|---| | `--json` | Print the violations as JSON | ```sh aircloud check aircloud check --json ``` ## `aircloud i18n` Translation keys a release would be refused for, keys no code uses, and the locale bundle the tests read Subcommands: `bundle`, `missing`, `unused`. ### `aircloud i18n bundle` Write the product's locale bundle, compiled by the platform's own builder, where the tests read it ```sh aircloud i18n bundle ``` ```sh aircloud i18n bundle ``` ### `aircloud i18n missing` The product keys a release would be refused for (exit 1), then the platform defaults resolved to en ```sh aircloud i18n missing ``` ```sh aircloud i18n missing ``` ### `aircloud i18n unused` The product keys no code references ```sh aircloud i18n unused ``` ```sh aircloud i18n unused ``` ## `aircloud routes` The resolved route table, and which routes require an end-user session ```sh aircloud routes ``` ```sh aircloud routes ``` ## `aircloud schedules` The functions' cron triggers (UTC) ```sh aircloud schedules ``` ```sh aircloud schedules ``` ## `aircloud signup` Create an account (then verify the address and log in) ```sh aircloud signup --email
--account [options] ``` | option | | |---|---| | `--email
` | Required. The owner's email address; a verification code is mailed to it | | `--account ` | Required. The account's unique name, the one `aircloud login --account` takes: lower-case letters, digits and inner hyphens | | `--region ` | The region whose API to use, from the directory built into this CLI (default: the last one used, else the only region) | | `--api ` | The Air-Cloud API origin, a development override of --region (default: AIRCLOUD_API) | ```sh aircloud signup --email you@example.com --account acme aircloud signup --email you@example.com --account acme --region lab1 ``` ## `aircloud login` Log in as a Builder (browser or --device) or as a product's service account ```sh aircloud login [options] ``` | option | | |---|---| | `--region ` | The region whose API to use, from the directory built into this CLI (default: the last one used, else the only region) | | `--api ` | The Air-Cloud API origin, a development override of --region (default: AIRCLOUD_API) | | `--account ` | The account to log in to, by the slug chosen at signup (default: the last one, remembered in config.json) | | `--device` | Log in on any browser with a code (the device grant), for a shell without one | | `--service-account ` | Log in as the service account whose key file this is (never copied) | | `--product ` | Also select this product now | | `--timeout ` | How long to wait for the login in the browser or with the device code; the URL or code is printed again while waiting | ```sh aircloud login --account acme aircloud login --device aircloud login --service-account key.json ``` ## `aircloud logout` Revoke the cached tokens and forget the session ```sh aircloud logout ``` ```sh aircloud logout ``` ## `aircloud accounts` The accounts logged in on this machine, and the one commands act as outside a product folder Subcommands: `list`, `use`. ### `aircloud accounts list` Each logged-in account with its region and API; the selected one is marked * ```sh aircloud accounts list ``` ```sh aircloud accounts list ``` ### `aircloud accounts use` Select the account commands act as outside a product folder naming one ```sh aircloud accounts use [options] ``` | option | | |---|---| | `--region ` | The region of the account's session (needed only when it is logged in in several) | ```sh aircloud accounts use acme aircloud accounts use acme --region lab1 ``` ## `aircloud whoami` The account (or service account) this CLI acts as ```sh aircloud whoami ``` ```sh aircloud whoami ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ## `aircloud products` Your account's products, with their tenant, status and host (from any directory) Subcommands: `show`, `authorize`, `delete`. ### `aircloud products show` One product: its tenant, status and host ```sh aircloud products show [options] ``` | option | | |---|---| | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud products show aircloud products show --product shop ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud products authorize` Authorize a product of your account now, without releasing it, and print its tenant and host ```sh aircloud products authorize ``` ```sh aircloud products authorize shop ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud products delete` Delete a product of your account and everything it holds (type its slug to confirm) ```sh aircloud products delete [options] ``` | option | | |---|---| | `--confirm ` | Confirm with the product's slug instead of typing it (default: asked on stdin) | ```sh aircloud products delete shop aircloud products delete shop --confirm shop ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ## `aircloud account` The account you are logged in to Subcommands: `delete`. ### `aircloud account delete` Close the account: every product, member and identity of it is erased (type its slug to confirm) ```sh aircloud account delete [options] ``` | option | | |---|---| | `--confirm ` | Confirm with the account's slug instead of typing it (default: asked on stdin) | | `--wait` | Wait until the account is erased, then forget this machine's session | | `--timeout ` | How long --wait waits | ```sh aircloud account delete aircloud account delete --confirm acme --wait ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ## `aircloud release` Create, inspect and move the product's releases Subcommands: `create`, `list`, `show`, `artifacts`, `activate`, `promote`, `rollback`. ### `aircloud release create` Release the working directory's product (or a git ref); creates the product when your account has none ```sh aircloud release create [options] ``` | option | | |---|---| | `--git ` | Release this repository instead of the working directory (with --ref) | | `--ref ` | The git ref to release (with --git) | | `--wait` | Wait until the release is verified, failed or superseded, printing each status and part transition (and a failed part's error code and log tail) | | `--timeout ` | How long --wait waits | | `--product ` | The product of a --git release | | `--dry-run` | Validate as the upload would (against the product's environments when logged in, else offline) and list the files it would carry, with their sizes and the compressed total; nothing is uploaded or created | ```sh aircloud release create --wait aircloud release create --dry-run aircloud release create --git https://gitlab.com/me/shop.git --ref main --product shop ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud release list` The product's releases, newest first ```sh aircloud release list [options] ``` | option | | |---|---| | `--limit ` | At most this many (default: the API's page) | | `--cursor ` | Continue from this page cursor | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud release list aircloud release list --limit 5 ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud release show` A release as the platform records it (status, parts, test runs, environments, activations) ```sh aircloud release show [options] ``` | option | | |---|---| | `--artifacts ` | Write each test run's report and artifacts under this directory | | `--json` | Print the release record as JSON, as the API returns it | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud release show 3f2a… aircloud release show 3f2a… --artifacts ./reports ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud release artifacts` A release's test-run artifacts: list them, or download them with --out ```sh aircloud release artifacts [options] ``` | option | | |---|---| | `--env ` | The test run's environment (default: every run) | | `--out ` | Download into this directory | | `--file ` | Download only this file (with --out) | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud release artifacts 3f2a… aircloud release artifacts 3f2a… --out ./artifacts ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud release activate` Activate a release in an environment ```sh aircloud release activate --env [options] ``` | option | | |---|---| | `--env ` | Required. The environment to activate it in | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud release activate 3f2a… --env ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud release promote` Activate a verified release in production ```sh aircloud release promote [options] ``` | option | | |---|---| | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud release promote 3f2a… ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud release rollback` Move an environment back to its previous release (or to --to) ```sh aircloud release rollback --env [options] ``` | option | | |---|---| | `--env ` | Required. The environment to roll back | | `--to ` | The release to roll back to (default: the previous one) | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud release rollback --env production ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ## `aircloud environments` The product's environments: production and the previews you create and destroy Subcommands: `create`, `list`, `destroy`. ### `aircloud environments create` Create a preview environment: its own data, secrets and host, empty until a release is activated in it ```sh aircloud environments create [options] ``` | option | | |---|---| | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud environments create staging aircloud release activate 3f2a… --env staging ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud environments list` The product's environments: name, kind and creation time ```sh aircloud environments list [options] ``` | option | | |---|---| | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud environments list ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud environments destroy` Destroy a preview environment and everything it holds (type its name to confirm) ```sh aircloud environments destroy [options] ``` | option | | |---|---| | `--confirm ` | Confirm with the environment's name instead of typing it (default: asked on stdin) | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud environments destroy staging aircloud environments destroy staging --confirm staging ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ## `aircloud functions` The product's deployed functions: list them, read one, invoke one Subcommands: `list`, `show`, `invoke`. ### `aircloud functions list` The product's functions and where each is deployed ```sh aircloud functions list [options] ``` | option | | |---|---| | `--all` | Also list removed functions | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud functions list aircloud functions list --all aircloud functions list --product shop ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud functions show` A function: the version each environment runs, its triggers, versions and recent lifecycle ```sh aircloud functions show [options] ``` | option | | |---|---| | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud functions show hello ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud functions invoke` Run a deployed function once: its response body on stdout, the verdict on stderr ```sh aircloud functions invoke [options] ``` | option | | |---|---| | `--env ` | The environment to run it in (default: production) | | `--method ` | The request method the function receives (default: POST) | | `--path ` | The request path and query the function receives, starting with / (default: /) | | `--header =` | A request header the function receives (repeatable) (repeatable) | | `--data \|@\|-` | The payload, a JSON value: inline, read from a file, or from stdin (default: none, and the function receives no body) | | `--at ` | The org node the invocation acts at, at or below yours (default: your node) | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud functions invoke hello --data '{"name":"Ada"}' aircloud functions invoke deals --method GET --path /deals --at /acme/sales aircloud functions invoke items --method GET --path /items --header accept=application/json aircloud functions invoke hello --data @payload.json echo '[1,2]' | aircloud functions invoke sum --data - ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ## `aircloud logs` The product's function invocations, oldest first: time, function, environment, status, duration, correlation id and logs ```sh aircloud logs [options] ``` | option | | |---|---| | `--function ` | Only this function's invocations | | `--env ` | Only invocations in this environment | | `--status ` | Only invocations whose status starts with this (ok, error, error:functions.guest_server_error) | | `--response-status ` | Only invocations the function answered with this HTTP status: a class (4xx) or a code (404); --status is the platform's verdict, where a 4xx answer is ok | | `--source ` | Only event invocations from this trigger-source domain (app, comms, flex) | | `--correlation-id ` | Only the invocation with this correlation id (the one functions invoke prints) | | `--since ` | Only invocations at or after this RFC 3339 time, or this long ago (15m, 2h) (default: the API's window) | | `--limit ` | At most this many of the newest records per read (default: the API's page) | | `--follow` | Keep reading new invocations until interrupted | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud logs --function hello --since 15m aircloud logs --status error --follow aircloud logs --correlation-id 0198a3c4-… ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ## `aircloud secrets` The product's secrets (values are read from stdin, never shown) Subcommands: `set`, `list`, `delete`. ### `aircloud secrets set` Set a secret's value, read from stdin ```sh aircloud secrets set --env [options] ``` | option | | |---|---| | `--env ` | Required. The environment (or ci) the value is for | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud secrets set STRIPE_KEY --env production < key.txt ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud secrets list` Which secrets are set (never their values) ```sh aircloud secrets list [options] ``` | option | | |---|---| | `--env ` | Only this scope | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud secrets list aircloud secrets list --env production ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud secrets delete` Delete a secret's value ```sh aircloud secrets delete --env [options] ``` | option | | |---|---| | `--env ` | Required. The environment (or ci) the value is deleted from | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud secrets delete STRIPE_KEY --env production ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ## `aircloud members` The product's end users: list, invite, change, grant, remove and block, and review a node's access Subcommands: `list`, `invite`, `update`, `grants`, `grant`, `revoke`, `memberships`, `remove`, `blocks`, `unblock`, `review`. ### `aircloud members list` The memberships at or below your node, peers at your own node included: membership, user, email, node, roles, state (invited, active) and origin (invite, self-registration, workspace) ```sh aircloud members list [options] ``` | option | | |---|---| | `--path ` | Only the memberships at or below this node | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud members list aircloud members list --path /staff ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud members invite` Invite a person by email and place a membership at a node with roles, scopes and a profile ```sh aircloud members invite --path [options] ``` | option | | |---|---| | `--path ` | Required. The node to place the membership at, at or below yours | | `--roles ,` | The membership's roles, comma-separated keys of the product's [authenticate] roles (default: none) | | `--scopes ,` | The scopes the membership may delegate, comma-separated, a subset of yours (default: none) | | `--profile ` | The profile, by its name at --profile-node | | `--profile-node ` | The node the profile is defined at | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud members invite ada@example.com --roles admin,editor --path /staff aircloud members invite ada@example.com --path /acme --scopes tenant:org --profile admin --profile-node / ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud members update` Change a membership's roles, node or scopes: each option given replaces that facet ```sh aircloud members update [options] ``` | option | | |---|---| | `--roles ,` | The membership's roles, comma-separated ("" for none) | | `--path ` | The node to move the membership to, at or below yours | | `--scopes ,` | The scopes the membership may delegate, comma-separated ("" for none) | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud members update 0198a3c4-… --roles viewer aircloud members update 0198a3c4-… --path /staff/night --scopes "" ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud members grants` A membership's grants: each profile it holds, at which node, until when ```sh aircloud members grants [options] ``` | option | | |---|---| | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud members grants 0198a3c4-… ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud members grant` Grant a membership a profile at a node, optionally until a time ```sh aircloud members grant --path --profile --profile-node [options] ``` | option | | |---|---| | `--path ` | Required. The node the grant is placed at | | `--profile ` | Required. The profile, by its name at --profile-node | | `--profile-node ` | Required. The node the profile is defined at | | `--expires-at ` | When the grant stops authorizing (default: never) | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud members grant 0198a3c4-… --path /staff --profile editor --profile-node / --expires-at 2027-01-31T00:00:00Z ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud members revoke` Revoke one of a membership's grants ```sh aircloud members revoke [options] ``` | option | | |---|---| | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud members revoke 0198a3c4-… 0198a3c5-… ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud members memberships` One person's memberships you may see, by user id ```sh aircloud members memberships [options] ``` | option | | |---|---| | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud members memberships 2891… ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud members remove` Remove a membership (type its id to confirm); --block keeps the address from registering again ```sh aircloud members remove [options] ``` | option | | |---|---| | `--block` | Also block the member's address from registering again | | `--confirm ` | Confirm with the membership id instead of typing it (default: asked on stdin) | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud members remove 0198a3c4-… aircloud members remove 0198a3c4-… --block --confirm 0198a3c4-… ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud members blocks` The blocked addresses at or below your node, peer removals at your own node included: email, node, who blocked it and when ```sh aircloud members blocks [options] ``` | option | | |---|---| | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud members blocks ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud members unblock` Lift the block on an address, so it may register again ```sh aircloud members unblock [options] ``` | option | | |---|---| | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud members unblock ada@example.com ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ### `aircloud members review` A node's access review: grants expiring within --window, profiles no grant references, groups with no member, and who holds tenant:org ```sh aircloud members review --window [options] ``` | option | | |---|---| | `--node ` | The node to review, at or below yours (default: your node) | | `--window ` | Required. How far ahead to look for expiring grants, a duration (720h) | | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud members review --window 720h aircloud members review --node /acme --window 168h ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). ## `aircloud org` The product's org tree: the nodes its members, grants and data live at Subcommands: `nodes`. ### `aircloud org nodes` The nodes below yours: list, create, rename, archive, unarchive and delete Subcommands: `list`, `create`, `rename`, `archive`, `unarchive`, `delete`. #### `aircloud org nodes list` The nodes strictly below yours: path, display name, status (active, archived), when archived, who created it and when, and a seeded node's seed (applied, or refused or failed with its reason) ```sh aircloud org nodes list [options] ``` | option | | |---|---| | `--product ` | The product to act on (default: the product of the working directory) | ```sh aircloud org nodes list ``` Calls the Air-Cloud API: it needs a login (`aircloud login`). #### `aircloud org nodes create` Create a node strictly below yours ```sh aircloud org nodes create [options] ``` | option | | |---|---| | `--name ` | The node's name for people (1 to 100 characters) | | `--seed