CLI

hotcfg validate

Check a JSON file, and with --bin against the bin's JSON Schema, without publishing anything.

usage
hotcfg validate <file.json> [--bin <bin_id>]

Checks a file without publishing it, so you can catch a mistake before it reaches a bin: in a pull request, a pre-commit hook or your editor's task runner.

  • Without --bin, it checks that the file is one valid JSON value. It needs no key and makes no network request.
  • With --bin, it also downloads the bin's JSON Schema and checks the file against it, on your machine. This needs a secret key that can access the bin.

Nothing is written either way. push checks the schema again when you publish, so it is always the final check.

terminal
$ hotcfg validate flags.json --bin mobile-flags
✓ flags.json matches the schema of mobile-flags

The file can be - to read standard input.

Flags

FlagDefaultDescription
--binnoneAlso check against this bin's schema: an id, or org-slug/id.

A schema belongs to the bin, not to an environment, so there's no --env.

When the file doesn't match

The command exits with 1 and prints each problem with the line in your file, the schema rule and what's wrong, the same way push does:

terminal
$ hotcfg validate flags.json --bin mobile-flags
error: flags.json does not match the schema of bin mobile-flags (1 error)

  flags.json:3  /limits/max_upload_mb
    rule:    /properties/limits/properties/max_upload_mb/type
    message: must be an integer, not a string

A file that isn't valid JSON fails with its line and column, before anything is downloaded:

terminal
$ hotcfg validate bad.json
error: bad.json:4:3: invalid JSON: invalid character '}' looking for beginning of object key string

A bin without a schema accepts any valid JSON:

terminal
$ hotcfg validate flags.json --bin legacy-flags
✓ flags.json is valid JSON (legacy-flags has no schema)

In CI

On GitHub Actions, errors are also printed as annotations, so they show on the line of the file in the pull request. The hotcfg GitHub Action runs validate for you; in other CI systems, run it before push:

terminal
hotcfg validate config/flags.json --bin acme/mobile-flags

Pass --no-annotations to turn annotations off.

Last updated 16 November 2026