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.
backend : ' http://localhost:3000 '
Key Type Description listenstring Address/port to listen on (e.g. ":8080") backendstring URL to forward requests to mirrorboolean Echo the incoming request back immediately catchboolean Accept and log requests without forwarding
Key Type Description mockBackendstring Path to OpenAPI spec for mocking mockDynamicboolean Enable dynamic mock generation
Key Type Description exposeboolean Enable public exposure/tunnel via Inspectr Ingress channelstring Preferred subdomain on in-spectr.dev channelCodestring Security code for accessing your public endpoint
Key Type Description appboolean Enable Inspectr App UI appPortstring Port to serve the App UI printboolean Print color-coded log output
Key Type Description authEnabledboolean Enable API key authentication on all requests authSecretstring Guard secret used to generate API keys authTokenTTLinteger Guard token expiration time in hours (default 24)
Key Type Description apiSecretstring Secret for securing Inspectr’s internal API dataDirstring Base directory for Inspectr data (default .inspectr) storePathstring Path to the operations store (default .inspectr/.inspectr.db) storeInMemoryboolean Store operations in memory only backendCorsboolean Allow backend to handle CORS requests
Flag Type Default Description rulesConfigPathstring (none) Path to a rules YAML file to load at startup commandstring (none) Launch a command when Inspectr boots commandArgsstring Arguments to pass to the managed command; repeatable commandLogFilestring .inspectr-command-process.logLog file for the managed command. Defaults to .inspectr/.inspectr-command-process.log commandStopOnFailureboolean trueExit Inspectr when the managed command exits with a non-zero status
Key Type Default Description exportboolean false Export operations to a timestamped JSON file on shutdown exportDirstring exportsDirectory to write export artifacts
Key Type Description logFilestring Write logs to this file instead of .inspectr/inspectr.log logLevelstring Log verbosity: debug, info, warn, error, etc. httpTimeoutinteger Timeout in seconds when forwarding requests sessionExpirationinteger Session expiration time in hours (default 24) gracePeriodinteger Grace 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)