Mockoon's official CLI. Deploy your mock APIs anywhere.
This release adds support for Mockoon v1.18.0.
The CLI is now compatible with OpenAPI specification files v2.0.0 and 3.0.0 (both JSON and YAML). To directly mock an OpenAPI specification file, simply run the start
command by providing the URL or a local path to a specification file:
$ mockoon-cli start --data ~/path/to/your-opeanapi-file.yaml
(Issue #18)
Running multiple mocks at once is now possible by providing multiple paths or URLs to the --data
flag. This is compatible with both managed processes and foreground processes. --data
, --pname
, --port
and --hostname
flags can receive multiple values to run and configure multiple mocks:
mockoon-cli start --data ./mock1.json ./mock2.json --port 3000 3001 --pname mock1 mock2 --hostname 127.0.0.1 192.168.1.1
The dockerize
command now also supports copying multiple mocks and exposing multiple ports.
(Issue #57)
Since legacy Mockoon's export format was removed in the application's latest version, --all
, --index
and --name
flags were removed from the CLI. Though, the CLI is still able to run mocks from an old export file.
Running multiple mocks can now be achieved thanks to the above method.
dockerize
command with --output filename
(no path). (Issue #53)--log-transaction
flag is available to log the full HTTP transaction. If enabled, the logs will contain the same information that can be found in the application. (Issue #34)--daemon-off
flag. In this case, logs are both directed to stdout (console) and the usual files. (Issue #43)--repair
flag can be used to automate running mocks with old file versions (CLI won't prompt about migrating/repairing the file anymore). (Issue #50)This release adds support for Mockoon v1.17.0.
list
command output (Issue #45): Name Id Status Cpu Memory Hostname Port API prefix
───────────── ──── ───────── ────── ───────── ────────────── ────── ────────────────────────
mockoon-test 0 online 0 54.7 MB 0.0.0.0 3000 salut
A big thank you to the following people that helped to make Mockoon CLI better:
list
command details. (Issue #45)This release adds support for Mockoon v1.16.0.
Following Mockoon's changes in version 1.16.0 the CLI is now directly compatible with Mockoon's environment files, without the need to use the export method. You can read more about this in our blog post. (Issue #38)
Like the main application, the CLI now resolves body files relatively to the environment or export file location. (Issue #37)
This release adds support for Mockoon v1.15.0.
hostname
flag that allows users to specify the hostname on which to listen at runtime (Issue #30). Also add support for localhost only hostname. (Issue mockoon/mockoon#469)This release adds support for Mockoon v1.14.1 fixes.
Mockoon CLI is out of beta! 🎉 Thanks to all the members of our community who helped improve it.
This release adds support for Mockoon v1.14.0 new features and improvements.