Global flags
Available on every command:Environment variables
Priority: explicit flag > env var >.westyx/config > global config > default
Auth
westyx login
Authenticate and store credentials.
On success, the CLI auto-selects the first tenant and project.
westyx logout
Clear stored credentials. Active tenant and project context is preserved.
westyx version
Print the CLI version.
Upgrade
westyx upgrade
Fetch and install a newer release manifest, or check availability without installing.
An exact
--version older than the running binary shows a downgrade confirmation (default N; non-interactive stdin exits 2 without --force). A background update check runs once per invocation and prints a one-line notice on stderr when a newer stable version is available, without blocking the command.
Context
westyx tenant list
List tenants you belong to.
westyx tenant set <id|name>
Set the active tenant.
westyx project list
List projects in the active tenant.
westyx project set <id|name>
Set the active project.
westyx environment list
Show the active project’s tier and its allowed environment names.
ACTIVE marks whichever environment is currently active for this invocation, from any resolution tier below - including a transient WESTYX_ENV override.
westyx environment set <name|all>
Persist a default environment, validated against the tier’s allowed set.
--env (secret/config/flag get|set|list, snapshot list|create, service list|get):
--envflagWESTYX_ENVenvironment variable.westyx/configworkspaceenvironmentfield- Global config’s persisted default (set via
environment set) - Empty - the server resolves your personal environment, or (for a list-shaped command) shows every environment
--env or WESTYX_ENV, which you already see in what you typed - the CLI prints a one-line notice on stderr before running, suppressed by --quiet:
Analyze
.env file, classifies each entry, and writes a .wx file for review.
Classification rules (applied in order):
Matching is word-boundary based, not substring:
AUTH_TOKEN matches (auth and token are whole segments) but AUTHOR_NAME does not.
westyx analyze prints no summary on success - it writes the .wx file silently (exit 0) and adds *.wx / !.westyx/example.wx to the nearest .gitignore on first write. Review the generated file, then run westyx dev push.
Developer workflow (westyx dev)
westyx dev push
Push a .wx file to your personal Nexus dev environment.
--overwrite and --ask are mutually exclusive (exit 2 if both are set). In non-interactive mode (no TTY on stdin), --ask has no effect and silently falls back to keep, printing a warning first.
Conflict behaviour per entry:
Output:
service block has an empty id, the service is created in Nexus and the assigned UUID
is written back into the .wx file.
westyx dev pull
Download the entire project’s current state to a .wx file.
westyx dev setup
Configure Developer WIF credentials for a service. After setup, the Nexus SDK detects the
credentials automatically - no api_key needed in your local config.
--ttl defaults to the server default of 8h when omitted.
Credentials are stored at ~/.config/westyx/dev-credentials.json (0600).
Scope by tier (production-type environments - prod, prod-blue, prod-green - are never accessible via Developer WIF, regardless of tier):
westyx dev run
Start a process with Nexus values injected as environment variables.
.westyx/config:
.westyx/.wx as a fallback.
Key name transformation on injection: uppercased, dots and hyphens replaced with underscores.
(max.retries becomes MAX_RETRIES)
westyx dev status
Show Developer WIF credential state.
westyx dev teardown
Remove Developer WIF credentials.
--service and --all are mutually exclusive; exactly one is required. --yes / -y skips the confirmation prompt (only asked for --all).
Services
ID, NAME, KIND, ENV, ENDPOINT, UMBRELLA (✓ / -). get renders through the same row type as list, just with one row.
<id|name> resolves the same way every --service flag does: a UUID resolves directly; a name is matched by listing, and --env disambiguates a same-named service across environments.
create requires --name and --env - a service belongs to exactly one environment. --kind defaults to backend, --auth-mode defaults to api_key. Tier limits, WIF prerequisites (auth-mode=wif needs the project’s Security add-on and at least one trust policy) and name collisions are reported by the server.
delete requires project owner or manager, prompts for confirmation unless --yes, and deletes the service and everything scoped to it (secrets, configs, flags, keys). Refused with an error if the target is an umbrella that still has services linked to it - unlink them first.
Snapshots
list: ID, NAME (- if unnamed), ENV, CREATED, AUTO-DELETE (in N days / keep), SERVICES (count).
create defaults to a 7-day auto-delete; --auto-delete-days=never pins the snapshot. 409 snapshot_cap_exceeded from the API is surfaced as-is.
diff shows secrets as changed/unchanged only (values are never printed), configs with their actual before/after values, and flags with their enabled state. Services deleted since the snapshot show STATUS: deleted_since; services added since show STATUS: added_since.
restore is atomic - the backend applies every targeted service in one transaction, so a failure leaves nothing changed. Without --yes it prints the diff summary and prompts before restoring. --save-before takes a backup snapshot first and aborts the restore if that backup fails. --service-ids (comma-separated UUIDs, from snapshot list/diff output - names are not accepted) selects a subset for restore.
delete requires manager+ role and prompts for confirmation unless --yes.
Secrets
getwithout--servicesearches all non-umbrella services; exits 2 if the key exists in more than one service.setalways creates a new version - secrets are versioned and cannot be overwritten.getandlistboth mask values intableoutput (***). Use--format=jsonor--format=plainto retrieve the actual value.
Configs
set is an upsert - creates or updates the key.
Feature flags
set value must be true, false, 1, or 0.
Output formats
plain on tenant list / project list prints the primary identifier (name) one per line.
plain on secret/config/flag list prints KEY=VALUE one per line.
plain on single-value commands (get) prints the bare value.
Exit codes
The .wx file format
.wx files are the local representation of your Nexus resources. They are gitignored
(contain real secret values) and human-editable. westyx analyze and westyx dev pull both
generate them.
on_conflict field on individual blocks overrides the defaults block.
Commit
.westyx/example.wx as a structure template for new team members. Never commit .wx
files with real values. westyx analyze adds *.wx to .gitignore automatically.The .westyx/config file
Committed to git. Contains workspace context and westyx dev run script definitions.
profile points to a named .wx file in .westyx/ (without the .wx extension). Defaults to
.wx (the dot-prefixed default file).