config
subcommand that allows you to configure the behavior of your CLI installation.
Configuration values can be retrieved using wiremock config get <key>
, set using wiremock config set <key> <value>
,
and unset using wiremock config unset <key>
.
You can clear all configured keys by executing wiremock config clear
.
Available config keys that you can set are api_token and
api_endpoint.
For comprehensive documentation of how each config command works, in the CLI, you can append a -h
or --help
to the
end of any subcommand to view the command’s help text.
For example, wiremock config set -h
.
Configuring your API token
Your API token is used to authenticate with WireMock Cloud when performing actions like recording or managing your mock APIs. Setting your API token using theconfig
subcommand is an alternative to the login command.
To set your API token, execute the following command
<API_TOKEN>
replaced with your API token, available at https://app.wiremock.cloud/account/security.
Configuring your API endpoint
Configuring your WireMock CLI installation to use a custom API endpoint is only relevant to customers using WireMock
Cloud’s on-premise edition. To learn more, contact the WireMock team today to
discuss an enterprise plan for your organisation.
<API_ENDPOINT>
replaced with your API endpoint URL. The API endpoint for your on-premise installation of WireMock
Cloud will have the format https://api.wiremock.<your_subdomain>
. Consult your system administrator if you are unsure
of the exact URL to use.
If you have set your API endpoint to a custom endpoint,
wiremock login
will no longer work. Please authenticate by
setting your API token using the config subcommand instead.