plan, apply, destroy, test) read the active profile to know where each service lives and how to authenticate.
Where profiles live
Profiles live in~/.wxctl/profiles.yaml. This is a YAML file, distinct from the resource config.yaml you pass to -f. It is written with 0600 permissions (owner read/write only); keep it out of git.
wxctl init scaffolds this file for you, then you fill in the credentials by hand:
-f, --filenamenarrows the scaffold to the services a configuration references, instead of every supported service.-p, --profilenames the profile being written. Omit it to write thedefaultprofile.--editopens$VISUALor$EDITORon the file and, after you save and exit, runs the same live checks aswxctl profile validate.--forcere-scaffolds an existing profile to placeholders; other profiles and preferences in the file are preserved.
~/.wxctl/profiles.yaml, pass --profile-path <path>.
What the scaffold looks like
wxctl init writes two profiles: an active default profile in SaaS shape, and a commented default-software alternative in Cloud Pak for Data / Software Hub shape. Each service block carries a format-hint url, its auth_type, and for every credential field both a commented ${env:...} line and an active PASTE_YOUR_<FIELD>_HERE placeholder. Here is the scaffold for a config that uses object storage and watsonx Orchestrate:
~/.wxctl/profiles.yaml
<REGION>, <CLUSTER_DOMAIN>) with your real host. wxctl profile validate catches a wrong host immediately.
Fill in credentials
Fill each service block one of two ways:- Inline: replace
"PASTE_YOUR_<FIELD>_HERE"with the real value. - From the environment: delete the
PASTEline and uncomment the# <field>: ${env:WXCTL_...}line above it. wxctl resolves the variable at run time, so nothing sensitive is written to disk. This also makes one profile portable across environments: pointdevandprodat the same${env:APIKEY}and set the value per shell.
~/.wxctl/profiles.yaml
-software profile: watsonx services share one https://cpd-cpd.apps.<CLUSTER_DOMAIN> host and authenticate with zenapikey (username + API key) or cp4d (username + password); object storage still uses hmac.
profiles.yaml holds as many profiles as you need. Keep a SaaS dev profile and an on-prem prod profile side by side and select one per command with -p dev / -p prod (see Choosing the active profile).
Validate
After you fill in credentials, verify the profile against the live services:wxctl init --edit runs the same checks automatically when your editor exits.
Choosing the active profile
When a command needs credentials, wxctl resolves the active profile in this order; the first match wins:- The
-p, --profile <name>flag - The
WXCTL_PROFILEenvironment variable - The name stored in
~/.wxctl/active_profile default
Authentication types
Each service in a profile declares anauth_type that selects how wxctl obtains a token. The table lists the type and the fields it uses; wxctl init scaffolds the right auth_type per service.
| Type | auth_type | Config fields |
|---|---|---|
| IBM Cloud API key | apikey | apikey |
| ZenApiKey (Software Hub) | zenapikey | username, apikey |
| Cloud Pak for Data | cp4d / icp4d | username, password |
| HMAC (object storage) | hmac | access_key, secret_key |
| Concert API key | c_api_key | apikey |
| Instana API token | api_token | apikey |
| Planning Analytics session | pa_session | apikey |
| Basic | basic | username, password |
| Bearer token | bearer | apikey |
| None (local) | none | (none) |
apikey; Software (Cloud Pak for Data / Software Hub) services use zenapikey or cp4d. apikey is rejected on Software and zenapikey on SaaS. hmac covers object-storage (S3 / COS) services.
Credentials live only in
~/.wxctl/profiles.yaml and in the environment variables your YAML references with ${env:VAR}. Never commit credentials into a configuration file; keep them in your profile or the environment.Next steps
Declarative model
Resources, references, and
${env:VAR} interpolation.Pipeline
The stages every command runs.

