Usage
Arguments
Path to the directory containing service definition YAML files. The simulator will load all service configurations from this location.
Options
Force stop any existing simulator instance before starting a new one. Use this when you need to restart the simulator with updated configurations.
Install and use a template from the marketplace before starting. Provide the template ID to automatically download and configure a pre-built service.
Path to the configuration file (global option).
Execution mode override:
ci, development, or debug (global option).Show what would be executed without actually starting the simulator (global option).
Enable verbose output for detailed logging (global option).
Path to the SQLite database for simulator storage (global option).
Examples
Start simulator with services directory
The simulator will continue running until you press Ctrl+C. All active services will be displayed with their URLs.
Force restart the simulator
Install template and start
ecommerce-api template from the marketplace and starts the simulator with it.
Dry run mode
How it works
When you runsimulator start:
- If a template is specified, itβs downloaded and installed to the services directory
- The simulator loads all YAML service definitions from the specified directory
- Each service is started on its configured port with the defined endpoints
- The simulator runs in the foreground, logging all incoming requests
- Press Ctrl+C to gracefully stop all services
Related commands
simulator stop- Stop the running simulatorsimulator status- Check simulator statussimulator validate- Validate service definitionssimulator logs- View request logs
Troubleshooting
Simulator fails to start
If you see errors when starting:- Check that the services directory exists and contains valid YAML files
- Verify that ports are not already in use:
lsof -i :PORT - Use
--forceto stop any existing simulator instance - Run
simulator validateto check your service definitions
Configuration not found
If you see βAPI simulator is not enabled or configuredβ:- Ensure your
apicentric.jsonhas simulator configuration enabled - Check that the config file path is correct using
--config