Skip to content

CLI Options

Inspectr supports a wide range of CLI flags to control how it captures, proxies, and exposes traffic. These options allow you to customize Inspectr to match your workflow.


FlagTypeDefaultDescription
--listenstring:8080Address where Inspectr listens for HTTP requests
--backendstring(none)Forward requests to this backend service
--mock-backendstring(none)Serve mock responses from OpenAPI spec
--mock-dynamicbooleanfalseGenerate dynamic mock data instead of static examples
--catchbooleantrueAccept and log requests without forwarding

FlagTypeDefaultDescription
--appbooleantrueEnable embedded Inspectr App UI
--app-portstring4004Port to serve the UI app
--printbooleantruePrint color-coded log output to the terminal

FlagTypeDefaultDescription
--exposebooleanfalseExpose Inspectr publicly via Ingress service
--channelstringSubdomain to use on in-spectr.dev (e.g. my-api.in-spectr.dev)
--channel-codestringSecret code required for remote access to the channel

FlagTypeDefaultDescription
--apiSecretstring(none)Protect access to Inspectr’s admin API
--store-pathstring.inspectr.dbPath to store request/response history
--store-in-memorybooleanfalseUse in-memory storage instead of persistent disk file

FlagTypeDefaultDescription
--configstring.inspectr.yamlPath to YAML config file (overrides CLI flags)
--versionPrint Inspectr version and exit
FlagTypeDefaultDescription
--log-levelstringnoneSet log verbosity (debug, info, warn, etc.)
--http-timeoutinteger30HTTP timeout in seconds for backend requests

Terminal window
inspectr --backend=http://localhost:3000
Terminal window
inspectr --catch=true --expose --channel=webhook-test --channel-code=secure123
Terminal window
inspectr --mock-backend=./openapi.yaml --mock-dynamic=true