Skip to content

Run a Command on Startup

Inspectr can start a local command when it boots, run it in the background, and capture the output in a log file. This is handy when you want your API or Webhook Backend Service and Inspectr Proxy to be started together.


  • Launch a local dev server alongside Inspectr
  • Start a backend service together with Inspectr
  • Trigger setup scripts in one command for teammates

Start Inspectr and run a local dev server:

Terminal window
inspectr --command=npm --command-arg=run --command-arg=dev

Inspectr logs command output to .inspectr/.inspectr-command-process.log by default and stops the command when Inspectr exits. By default, Inspectr will exit if the managed command fails (non-zero exit). Set --command-stop-on-failure=false or commandStopOnFailure: false to keep Inspectr running.

You can also configure this in .inspectr.yaml, like in the example below:

This triggers node demo.js when Inspectr starts.

# Command
command: node
commandArgs:
- demo.js