Scripts and CI
JSON output, exit codes, paging, confirmations and the environment variables the CLI reads.
Output
Results go to stdout. Progress, confirmations and errors go to stderr, so the output can be piped safely.
With --json, results are JSON on stdout, and a failed command writes one JSON
line to stderr:
{"error":{"message":"Your session expired.","hint":"Run `nulvless login` to sign in again.","exitCode":2}}Lists print an array of items. Paged lists print only the page they loaded.
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | The command failed, was cancelled, or a value is missing |
2 | Not signed in, session expired, or not allowed |
130 | Interrupted with Ctrl+C |
Confirmations
Commands that change something ask before they run. Outside a terminal nothing
waits for input: pass --yes, or the command fails with a hint saying so.
Paging
users list, deployments list and functions deployments show 30 rows per
page, newest first. The note below the table says how many there are and which
page comes next.
--limit <count>1 to 100default 30Rows per page.
--page <number>numberdefault 1Which page to show.
--allLoad every page. Cannot be combined with --page.
--oldest-firstStart from the oldest.
Global options
Every command takes these, before or after its own arguments.
--org <slug>Organization to act on.
--project <slug>Project to act on.
--jsonResults as JSON on stdout, errors as JSON on stderr.
-y, --yesSkip confirmation prompts.
-v, --versionShow the version.
-h, --helpShow help for a command, with examples.
Environment variables
NULVLESS_TOKENAccess token used instead of the stored session.
NULVLESS_ORGDefault organization.
NULVLESS_PROJECTDefault project.
NULVLESS_EXAMPLES_URLWhere to read examples from, to test a fork of the examples repository.
NO_COLORTurn colors off.
FORCE_HYPERLINK1 or 0 to force clickable links in the terminal on or off.
A deploy job
- run: npx @nulvless/cli functions deploy --json --yes
env:
NULVLESS_TOKEN: ${{ secrets.NULVLESS_TOKEN }}Inside the repository, the workspace already names the organization and project.