Skip to content

laststance/tomvalid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.toml
cat ./config.toml | npx tomvalid --stdin --filename config.toml
npx tomvalid ./config.toml --format json

Local Development

Install dependencies:

pnpm install

Run the CLI directly from source:

pnpm run dev ./test/fixtures/valid.toml

Run checks:

pnpm run check

Build the publishable CLI:

pnpm run build

After building, verify the Node-compatible output:

node ./dist/cli.cjs ./test/fixtures/valid.toml

Publish Flow

The package is set up for npm publishing.

npm whoami
npm pack --dry-run
pnpm run prepublishOnly
pnpm publish

prepublishOnly 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.

About

Human-readable TOML validation CLI powered by Node.js and @iarna/toml.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors