cli

Configure wx

wx signs in with an API user's access key and secret, saved in a profile or passed in environment variables. See Authentication for API users.

Save a profile

wx init

It asks for the host, the access key and the secret. The host is https://app.wxrks.com unless your workspace is in another region, such as https://eu.wxrks.com. wx saves them as the default profile in a file only your user can read:

OSConfig file
macOS~/Library/Application Support/wxrks/wx/config.json
Linux~/.config/wxrks/wx/config.json
Windows%AppData%\wxrks\wx\config.json

Set WX_CONFIG to keep the file somewhere else.

Several workspaces

Add a profile per workspace to the config file. Running wx init again replaces only the default profile.

{
  "profiles": {
    "default": { "host": "https://app.wxrks.com", "accessKey": "<access key>", "secret": "<secret>" },
    "eu": { "host": "https://eu.wxrks.com", "accessKey": "<access key>", "secret": "<secret>" }
  }
}

Pick one per command with --profile eu, or for a whole shell session with export BW_PROFILE=eu.

Environment variables

They take precedence over the profile, which suits pipelines and containers: with BW_ACCESS_KEY and BW_SECRET set, wx needs no config file.

VariableWhat it sets
BW_HOSTThe host, such as https://eu.wxrks.com.
BW_ACCESS_KEYThe access key.
BW_SECRETThe secret.
BW_TOKENA token from Auth API Token, sent instead of signing in.
BW_PROFILEThe profile to use when --profile is not given.
WX_CONFIGThe path of the config file.

--host <url> overrides the host for one command.

Check it

Run any command your API user may call, for example:

wx project list --size 1

A BWX-403 error means the credentials work but the API user lacks that permission (see Errors).