% title = 'command line' description = 'Command line parameters for starting mountebank' %> <%- include('../_header') -%>
The basic command line structure is:
mb [command=start] [options...]
As mountebank has grown in functionality, the number of commands and options has increased significantly. The links below attempt to simplify that configuration based on the core mountebank commands.
Note that mb
is not persistent by default. Absent the datadir
or impostersRepository
options,
stopping and restarting mb
will lose all stubs and all requests. The following two
mb
commands work in tandem to allow you to save and reload test data:
mb save --savefile mb.json --formatter path/to/module
mb restart --configfile mb.json --formatter path/to/module
The configfile
sends a PUT
command
to /imposters
. View the JSON contract
to see what the contents should look like.
The formatter
is optional. If specified, it gives you total control over the format of
the test data saved to disk, which allows you to split the content in separate files or convert
to a format used by other service virtualization tools. The links below describe the default
formatter for configuration files as well as how to define a custom formatter.