tomvalid
v0.1.0
Published
Human-readable TOML validation CLI powered by Node.js and @iarna/toml.
Downloads
102
Maintainers
Readme
tomvalid
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.
Features
- 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
Usage
npx tomvalid ./config.tomlcat ./config.toml | npx tomvalid --stdin --filename config.tomlnpx tomvalid ./config.toml --format jsonLocal Development
Install 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.tomlPublish Flow
The 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.
This directory is not currently attached to a git remote, so repository, bugs, and homepage metadata are intentionally left out until there is a canonical URL to point at.
See CONTRIBUTING.md for the maintainer workflow.
