Command line interface
Use the Hoverfly Cloud command-line interface (CLI) to manage your API simulations and virtual services from the terminal.
Last updated
Use the Hoverfly Cloud command-line interface (CLI) to manage your API simulations and virtual services from the terminal.
Last updated
hcc
is a multi-purpose command line interface for Hoverfly Cloud. It provides a convenient way to manage your Hoverfly Cloud virtual services and automate their management. Either for ad-hoc actions via the command line or integrated into scripts that are used by Continuous Integration and DevOps tools such as Jenkins.
You can capture traffic within your network and publish the simulation to your account with hcc
.
See the for a full list of commands.
Download the correct version using the links above. Unpack the zip file and you are good to go.
You may copy the unpacked binary to /usr/local/bin
(for Mac and Linux), so that you can run hcc
without specifying the full path.
Verifying the installation by running
It should print out the version, such as v2.0.0
Run the following command to configure hcc
to authenticate with your account:
The API token is stored in ~/.hcc/config.yaml
for future use.
Launch a virtual service from the command line:
Using a local simulation file.
Or using a simulation created on Hoverfly Cloud.
Update the simulation data on a service:
Using a local simulation file.
Or using a simulation created on Hoverfly Cloud.
You can wipe the simulation data, journal and states by reseting the service:
Delete a service from the command line:
Launch a Hoverfly Cloud service to capture a remote API from the command line:
You should pass the base URL of the API to the --target-url
flag.
If you have started a service with proxy enabled by setting the --target-url
and --mode
. You can switch the mode using the following command:
Export the simulation data from a service to a new simulation resource on your Hoverfly Cloud account:
Your service must be running, and the SIMULATION_NAME must not conflict with an existing name.
After you download and install the CLI, on the Account page.
If your service contains simulation data that is not saved, it will be lost. You may want to first.
for a list of available proxy modes.