Skip to content

YAML Configuration

Inspectr supports configuration via a YAML file, allowing you to store and share common setups without repeating CLI flags.

By default, Inspectr automatically loads a .inspectr.yaml file file from the current working directory. This means you can simply run inspectrand Inspectr will start using the configuration defined in that file.


  • If --config is not provided and .inspectr.yaml exists in the working directory, it is loaded automatically.
  • You can specify a different file with --config.
  • CLI flags override YAML values only when the flag differs from its default; otherwise YAML wins.

listen: ':8080'
backend: 'http://localhost:3000'
print: true
app: true
appPort: '4004'
expose: true
channel: 'hello-world'
channelCode: '87654321'
authEnabled: true
authSecret: 'letsgo'
apiSecret: 'changeme'

KeyTypeDescription
listenstringAddress/port to listen on (e.g. ":8080")
backendstringURL to forward requests to
mirrorbooleanEcho the incoming request back immediately
catchbooleanAccept and log requests without forwarding
KeyTypeDescription
mockBackendstringPath to OpenAPI spec for mocking
mockDynamicbooleanEnable dynamic mock generation
KeyTypeDescription
exposebooleanEnable public exposure/tunnel via Inspectr Ingress
channelstringPreferred subdomain on in-spectr.dev
channelCodestringSecurity code for accessing your public endpoint
KeyTypeDescription
appbooleanEnable Inspectr App UI
appPortstringPort to serve the App UI
printbooleanPrint color-coded log output
KeyTypeDescription
authEnabledbooleanEnable API key authentication on all requests
authSecretstringGuard secret used to generate API keys
authTokenTTLintegerGuard token expiration time in hours (default 24)
KeyTypeDescription
apiSecretstringSecret for securing Inspectr’s internal API
dataDirstringBase directory for Inspectr data (default .inspectr)
storePathstringPath to the operations store (default .inspectr/.inspectr.db)
storeInMemorybooleanStore operations in memory only
backendCorsbooleanAllow backend to handle CORS requests
FlagTypeDefaultDescription
rulesConfigPathstring(none)Path to a rules YAML file to load at startup
commandstring(none)Launch a command when Inspectr boots
commandArgsstringArguments to pass to the managed command; repeatable
commandLogFilestring.inspectr-command-process.logLog file for the managed command. Defaults to .inspectr/.inspectr-command-process.log
commandStopOnFailurebooleantrueExit Inspectr when the managed command exits with a non-zero status

KeyTypeDefaultDescription
exportbooleanfalseExport operations to a timestamped JSON file on shutdown
exportDirstringexportsDirectory to write export artifacts

KeyTypeDescription
logFilestringWrite logs to this file instead of .inspectr/inspectr.log
logLevelstringLog verbosity: debug, info, warn, error, etc.
httpTimeoutintegerTimeout in seconds when forwarding requests
sessionExpirationintegerSession expiration time in hours (default 24)
gracePeriodintegerGrace period for session cleanup in seconds (default 30)

  • Commit .inspectr.yaml to version control for team use
  • Avoid storing sensitive tokens (use env vars or secrets management)
  • Use different configs per environment (e.g. .inspectr.dev.yaml, .inspectr.prod.yaml)