Getting started
Command structure
Every command has the same three-level shape:
1 | |
- group — a broad area:
openstack,team, ormarketplace - resource — what you're acting on:
instance,customer,offering, … - verb — what to do:
list,get,create,update,delete,provision,terminate
1 2 3 | |
--help works at every level and is the authoritative reference for what a specific command
accepts — including the exact filter keys and request fields each resource supports:
1 2 3 4 | |
Authentication
The CLI needs two things: an API URL and an access token. There are three ways to provide them, checked in this order (first match wins):
--api-url/--tokenflags on the commandWALDUR_API_URL/WALDUR_ACCESS_TOKENenvironment variables- Saved credentials from
waldur-cli login
Environment variables
Best for CI, containers, and scripts:
1 2 3 4 | |
Persisted login
Best for interactive/local use — login verifies the URL + token against GET
/api/users/me/ and saves them, so you don't re-enter them every time:
1 2 3 4 5 | |
The credentials file lives in your platform config directory (e.g.
~/.config/waldur-cli/credentials.toml on Linux) with owner-only permissions (0600 on
Unix).
whoami
whoami shows who the currently-resolved credentials belong to — whichever source they came
from — without changing anything. Run it before a destructive command to confirm you're
pointed at the right instance and identity:
1 | |
Multiple deployments (--profile)
If you work with more than one Waldur instance (prod/staging, or several customer
deployments), named profiles let you keep separate saved credentials and switch between
them with --profile or the WALDUR_PROFILE environment variable:
1 2 3 4 5 6 7 | |
Omitting --profile/WALDUR_PROFILE uses the profile named default. Each profile is a
[profiles.NAME] table in the same credentials.toml.
Tip
Set WALDUR_PROFILE in a terminal's shell rc (or per-tab) to pin an environment for a
whole session, so you can't accidentally run a command against the wrong instance.
Working in a project
Most of Waldur is organized under projects — nearly every OpenStack resource, and
provisioning, is project-scoped. Rather than pass --filter project_uuid=<uuid> on every
list and paste a project URL into every order, you can set an ambient current project
(a project's UUID, like a kubectl namespace or gcloud config set project). It's resolved,
first match wins, from:
- the
--project <uuid>flag - the
WALDUR_PROJECTenvironment variable - the profile's saved default (
set-project)
Save a per-profile default once and forget it:
1 2 3 4 5 6 7 | |
When a project scope is active, it's applied only where it's meaningful — as a
project_uuid filter on resources whose list supports it, and as the project on
provision orders. Resources that aren't project-scoped (like team customer or team
role) ignore it. An explicit value always wins: --filter project_uuid=<other> on a
list, or a project field in a provision/order body, overrides the ambient scope.
Note
--profile and --project are different axes: --profile selects which deployment +
token; --project selects which project within it. whoami prints the active project
scope (to stderr, so it never pollutes --format json output) — a cheap way to confirm
it before a scoped command.
Output formats
--format controls how results are rendered. It's available on every command; the default
is table.
| Format | Best for | Notes |
|---|---|---|
table |
reading at a terminal (default) | curated columns per resource |
json |
scripts, jq, agents |
pretty-printed, the complete object |
tsv |
shell loops, cut/awk |
tab-separated, one row per line, no header, curated columns |
toon |
feeding results to an LLM | lossless like json, far fewer tokens |
ndjson |
large lists, streaming pipes |
one compact object per line, printed as pages arrive |
1 2 3 4 5 | |
table and tsv show each resource's curated columns (a useful default subset). json
and toon serialize the complete object. See Querying resources
for narrowing what's fetched with --fields, and Recipes & tips for
when each format earns its keep.
TOON, for LLMs
--format toon emits TOON (Token-Oriented Object Notation) — the
same information as JSON, but for a uniform array of objects (what every list returns) the
field names are declared once in a header instead of repeated on every row, which cuts token
usage substantially when piping results into an LLM's context:
1 2 3 4 5 | |
NDJSON, for large or streamed lists
--format ndjson prints one compact JSON object per line instead of one pretty-printed array —
and, for list, prints each page as it arrives rather than fetching the complete result set
first. See Querying resources for the streaming
details and its one caveat (--jmespath).