validate

Validates a Dev Proxy configuration file without starting the proxy. This command is a top-level shortcut for config validate and shares its implementation.

Synopsis

devproxy validate [options]

Options:
  -c, --config-file <config-file>  The path to the configuration file to validate
  --output <format>                Output format: text|json (default: text)
  -?, -h, --help                   Show help and usage information

Usage

devproxy validate

Arguments

None

Options

Name Description Allowed values Default
-c, --config-file <config-file> The path to the configuration file to validate Local file path devproxyrc.json
--output <format> Output format text, json text
-?, -h, --help Show help and usage information n/a n/a

Examples

Validate the default configuration file

devproxy validate

Validate a specific configuration file

devproxy validate -c myconfig.json

Validate and get structured JSON output

devproxy validate -c myconfig.json --output json

With --output json, Dev Proxy emits the validation result as a result record. The data property contains the result object:

{"type":"result","data":{"valid":true,"configFile":"/Users/user/project/myconfig.json","plugins":["LatencyPlugin"],"urlsToWatch":["https://api.contoso.com/*"],"errors":[],"warnings":[{"path":"plugins[0].configSection","message":"Config section 'latencyPlugin' for plugin 'LatencyPlugin' not found. The plugin will use its default configuration"}]},"timestamp":"2026-11-30T10:15:42.0000000Z"}

The result object contains the following properties:

Property Description
valid true when the configuration has no errors, otherwise false
configFile Full path to the validated configuration file
plugins Names of the enabled plugins
urlsToWatch Global URL patterns to watch
errors List of errors. Each error has a path that points to the invalid setting and a message
warnings List of warnings. Each warning has a path and a message

Exit codes

Code Meaning
0 Configuration is valid. The configuration might still contain warnings
2 Configuration is invalid or file not found

Remarks

The validate command checks the configuration file without starting the proxy. Because it doesn't need a working configuration to run, you can use it to check configuration files that would prevent Dev Proxy from starting. For the full list of checks, see config validate.

Use this command in CI/CD pipelines or coding agents to catch configuration errors before you start Dev Proxy.

See also