tomvalid is a small CLI for validating TOML files and returning readable parse errors.
It is managed with pnpm, built with esbuild, and is designed to work through npx.
It is packaged as a small public npm CLI with a conservative publish setup: the published tarball is limited through files, the package ships with an MIT license, and publish-time defaults live in package.json instead of a repo-local .npmrc.
- Validates a TOML file with
@iarna/toml - Prints a compact, human-readable code frame on parse errors
- Supports machine-readable JSON output
- Supports stdin for shell pipelines
npx tomvalid ./config.tomlcat ./config.toml | npx tomvalid --stdin --filename config.tomlnpx tomvalid ./config.toml --format jsonInstall dependencies:
pnpm installRun the CLI directly from source:
pnpm run dev ./test/fixtures/valid.tomlRun checks:
pnpm run checkBuild the publishable CLI:
pnpm run buildAfter building, verify the Node-compatible output:
node ./dist/cli.cjs ./test/fixtures/valid.tomlThe package is set up for npm publishing.
npm whoami
npm pack --dry-run
pnpm run prepublishOnly
pnpm publishprepublishOnly runs typecheck, lint, tests, and the Node-based build step before publishing.
publishConfig.access = "public" is set in package.json so the publish intent stays with the package manifest.
Repository metadata now points at laststance/tomvalid on GitHub.
See CONTRIBUTING.md for the maintainer workflow.