Global options
These options are available for all commands:-V, —version
Show the version and exit.-h, —help
Show help message and exit. Can be used with any command or subcommand.Authentication commands
login
Login to WireMock Cloud. This command must have been executed at least once before executing most other commands.If you have set your API endpoint to a custom endpoint,
wiremock login will no longer work. Use config set to set your API token directly.logout
Remove all WireMock Cloud user information from the CLI configuration.whoami
View information on the currently logged in user.config
Commands to manage your local WireMock CLI configuration. See Configuring the CLI for detailed documentation.config get
View a config value.<key>- Configuration key to retrieve. Valid options:api_token- The API token to use when calling the WireMock Cloud APIapi_endpoint- The API endpoint to the WireMock Cloud API
config set
Set a config value.<key>- Configuration key to set. Valid options:api_token- The API token to use when calling the WireMock Cloud APIapi_endpoint- The API endpoint to the WireMock Cloud API
<value>- The value to set (optional). Omit this argument to enter the value interactively (recommended for confidential config values)
config unset
Clear a single config value.<key>- Configuration key to clear. Valid options:api_token- The API token to use when calling the WireMock Cloud APIapi_endpoint- The API endpoint to the WireMock Cloud API
config clear
Clear all config values.mock-apis
Commands to interact with your mock APIs. See Managing Mock APIs with the CLI for detailed documentation.mock-apis list
List your mock APIs.--limit=<int>- The maximum number of mock APIs to return (default: 20)--page=<int>- The page of mock APIs to return (default: 1)--query=<text>- The query with which to filter mock APIs-o, --output=(text|json)- The output format to use (default: text)
mock-apis create
Create a new mock API.<name>- The name of the mock API to create (required)
-o, --hostname=<text>- Optional hostname for the mock API-t, --type=(REST|Unstructured|gRPC|GraphQL)- Type of the mock API (default: REST)
mock-apis delete
Delete a mock API by ID.<mock_api_id>- The ID of the mock API to delete (required)
-f, --force- Force delete the mock API without confirmation
record
Record requests to a proxied API and import the converted stubs into a mock API. See Recording using the WireMock CLI for detailed documentation.<from>- The URL of the target API to record from (required)
Recording behavior
--to=<cloud:mock_api_id>- The ID of the mock API to import recorded stubs into. You will be prompted to choose a mock API if omitted.-p, --reverse-proxy-port=<int>- The local port to proxy requests through. Set to ‘0’, ‘-1’, or ‘random’ to assign a random port (default: 8000)
Logging
--request-log-level=(off|summary|full)- How recorded requests are displayed in the console during recording (default: summary for interactive sessions, off for non-interactive sessions)-q- Equivalent of--request-log-level=off-v- Equivalent of--request-log-level=full
Import configuration
--import-config-file=<path>- Path to a file containing custom configuration for handling how recorded requests are converted into stubs--max-batch-requests, --batch-size=<int>- The maximum amount of requests to import to the mock API in a single batch while recording. Given a max batch of N requests, an import to the mock API will occur for every N requests recorded. If omitted, all requests will be imported at the end of the session in a single batch.--max-batch-bytes=<binary_size>- The maximum amount of bytes to import to the mock API in a single batch while recording. Given a max batch of N bytes, an import to the mock API will occur for every N bytes recorded. Note, if a single recorded request exceeds the maximum number of bytes, this request will still be sent (in a batch of one). If omitted, all requests will be imported at the end of the session in a single batch. (examples: 5120, 5kB, 5kiB, 10 MB)
TLS/Client certificates
-c, --client-certificate=<path>- Path to a PEM-encoded RSA private key and X509 certificate needed to authenticate against the target API using mutual TLS. Alternative to--client-certificate-store.--client-certificate-store=<path>- Path to a keystore (pkcs12, jks etc.) containing the private key and certificate needed to authenticate against the target API using mutual TLS. Alternative to--client-certificate.--client-certificate-store-password=<value>- Password to unlock the client certificate store if provided.
record-many
Record requests to multiple proxied APIs and import the converted stubs into a mock API for each target API. See Multi-domain recording using the WireMock CLI for detailed documentation.Recording configuration
--wiremock-dir=<path>- The path to the wiremock directory, containing services to record (default: .wiremock)-p, --profile=<text>- Profile name to use for this environment eg dev or staging--include-services=<text>- Comma separated list of service keys from the recording configuration file which should be recorded. All services will still proxy. If omitted, all services will be recorded.
Logging
--request-log-level=(off|summary|full)- How recorded requests are displayed in the console during recording (default: summary for interactive sessions, off for non-interactive sessions)-q- Equivalent of--request-log-level=off-v- Equivalent of--request-log-level=full
Import configuration
--import-config-file=<path>- Path to a file containing custom configuration for handling how recorded requests are converted into stubs--max-batch-requests, --batch-size=<int>- The maximum amount of requests to import to the mock API in a single batch while recording. Given a max batch of N requests, an import to the mock API will occur for every N requests recorded. If omitted, all requests will be imported at the end of the session in a single batch.--max-batch-bytes=<binary_size>- The maximum amount of bytes to import to the mock API in a single batch while recording. Given a max batch of N bytes, an import to the mock API will occur for every N bytes recorded. Note, if a single recorded request exceeds the maximum number of bytes, this request will still be sent (in a batch of one). If omitted, all requests will be imported at the end of the session in a single batch. (examples: 5120, 5kB, 5kiB, 10 MB)
TLS/Client certificates
-c, --client-certificate=<path>- Path to a PEM-encoded RSA private key and X509 certificate needed to authenticate against the target API using mutual TLS. Alternative to--client-certificate-store.--client-certificate-store=<path>- Path to a keystore (pkcs12, jks etc.) containing the private key and certificate needed to authenticate against the target API using mutual TLS. Alternative to--client-certificate.--client-certificate-store-password=<value>- Password to unlock the client certificate store if provided.
import
Import files or directories into WireMock Cloud. See Importing using the CLI for detailed documentation.<file_or_directory>- The file or directory to import (required)
--to=<value>- The ID of the mock API to import into (required)--import-config-file=<path>- YAML file containing import configuration
push
Commands to push resources to WireMock Cloud. See Push and Pull for detailed documentation.push open-api
Push an OpenAPI document to a mock API.<mock_api_id>- The ID of the mock API to push the OpenAPI document to (required)
-f, --file=<path>- The filename to read the OpenAPI document from (if not specified, reads from stdin)-w, --watch- Watch the file for changes and push on each change
push graphql
Push a GraphQL schema to a mock API.<mock_api_id>- The ID of the mock API to push the GraphQL schema to (required)
-f, --file=<path>- The filename to read the GraphQL schema from (if not specified, reads from stdin)-w, --watch- Watch the file for changes and push on each change
push mock-api
Push a local mock API configuration to WireMock Cloud. See Push and Pull Mock APIs for detailed documentation.<local_service_ids>- The service IDs defined in your WireMock environment file to push (optional)
--all- Push all mock APIs in your local WireMock environment file. To be used instead of specifying a mock API service ID--wiremock-dir=<path>- The path to the wiremock directory, containing mock APIs to push (default: .wiremock)-p, --profile=<text>- Profile name to use for this environment eg dev or staging--to=<value>- The ID of the destination mock API in the cloud. Use ‘cloud:new’ to force creation of a new mock API even if cloud_id is present. If not specified, uses the cloud_id from wiremock.yaml or creates a new mock API
pull
Commands to pull resources from WireMock Cloud. See Push and Pull for detailed documentation.pull open-api
Pull the OpenAPI document from a mock API and save it locally.<mock_api_id>- The ID of the mock API to pull the OpenAPI document from (required)
-f, --file=<path>- The filename to save the OpenAPI document to
pull graphql
Pull the GraphQL schema document from a mock API and save it locally.<mock_api_id>- The ID of the mock API to pull the GraphQL schema document from (required)
-f, --file=<path>- The filename to save the GraphQL schema document to
pull mock-api
Pull a mock API’s stub mappings and create a local configuration. See Push and Pull Mock APIs for detailed documentation.<mock_api_ids or local service_names>- The IDs of the mock APIs to pull or the names of the services defined in your WireMock environment file to pull (optional)
--wiremock-dir=<path>- The path to the wiremock directory, to which all pulled mock APIs will be written (default: .wiremock)-p, --profile=<text>- Profile name to use for this environment eg dev or staging--all- Pull all mock APIs in your local WireMock environment file. To be used instead of specifying a mock API ID or service name--into=<text>- The name of an existing service in wiremock.yaml to pull data into. Only stub mappings and API documents will be updated; service settings in wiremock.yaml will remain unchanged.
run
Start the local host runner. See Running Mock APIs Locally for detailed documentation.--wiremock-dir=<path>- The path to the wiremock directory, containing mock APIs to run (default: .wiremock)-p, --profile=<text>- Profile name to use for this environment eg dev or staging
environments
Commands to manage WireMock Cloud environments. See Managing Environments for detailed documentation.environments create
Create a new WireMock Cloud environment.-p, --profile=<text>- Profile name to use for this environment eg dev or staging (required)--wiremock-dir=<path>- The path to the wiremock directory, this is where your environment file will be created (default: .wiremock)