Running Imposter with the CLI
There are many ways to run Imposter. This section describes using the command line interface (CLI) tool.
Other ways to run Imposter
Standalone mock server
- As a Docker container - see Imposter Docker container
- As a Lambda function in AWS - see Imposter AWS Lambda
- As a JAR file on the JVM - see Imposter JAR file
Embedded in tests
- Start mocks (
- Generate mock configuration from OpenAPI files (
- Supports all plugins
- Supports JVM and Docker engine types
- Supports both 'core' and 'all' distributions
See the full Installation instructions for your system.
You must have Docker or a JVM installed.
If you have Homebrew installed:
brew tap gatehill/imposter brew install imposter
Or, use this one liner (macOS and Linux only):
curl -L https://raw.githubusercontent.com/gatehill/imposter-cli/main/install/install_imposter.sh | bash -
$ cd /path/to/config $ imposter up Starting server on port 8080... Parsing configuration file: someapi-config.yaml ... Mock server is up and running
The previous command starts Imposter using the 'core' distribution, which includes common plugins only. To use the 'all' distribution, which includes all plugins, use the
-t (engine type) flag:
$ imposter up -t docker-all
See full usage instructions on Imposter CLI.
- Learn how to use Imposter with the Configuration guide.