Skip to content

okirmio-create/config-validate-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

config-validate-cli

Validate JSON/YAML config files against JSON Schema.

Installation

npm install -g config-validate-cli

Usage

# Validate with a custom schema
config-validate -c config.json -s schema.json

# Validate common configs (built-in schemas for package.json, tsconfig.json)
config-validate -c package.json

# Strict mode — disallow additional properties
config-validate -c config.yaml -s schema.json --strict

# JSON output for CI pipelines
config-validate -c config.json -s schema.json --json

# Verbose — list all checked fields
config-validate -c package.json --verbose

Options

Flag Description
-c, --config <path> Path to the config file (JSON or YAML)
-s, --schema <path> Path to the JSON Schema file
--strict Disallow additional properties
--json Output results as JSON
--verbose Show all validated fields
-V, --version Show version
-h, --help Show help

Built-in Schemas

When no -s flag is provided, the tool uses built-in schemas for:

  • package.json — validates name, version, scripts, dependencies
  • tsconfig.json — validates compilerOptions, include, exclude

Exit Codes

  • 0 — config is valid
  • 1 — config is invalid or an error occurred

License

MIT

About

# config-validate-cli

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors