You usually do not need to install Tonex. Run the published package directly with npx:
npx @tonex-dev/cli@latest generate --seed "#6A9CFF" > globals.cssUse this form for one-off generation, CI scripts, and agent runs. It always resolves the npm package, runs the command, and exits without adding a project dependency.
Global install
If you use Tonex often, install it globally for the shorter command.
npm i -g @tonex-dev/cliThen run the same commands without npx @tonex-dev/cli@latest:
tonex generate --seed "#6A9CFF" > globals.css
tonex check --seed "#6A9CFF"Verify it works
Use --help for human-readable usage:
npx @tonex-dev/cli@latest --helpUse describe when an agent or script needs the machine-readable contract:
npx @tonex-dev/cli@latest describeIf you installed globally, replace npx @tonex-dev/cli@latest with tonex.
Agent skill
The CLI generates and checks color systems. The tonex skill teaches an agent how to use it: when to generate, how to map roles into another tool, and how to respond to contrast failures.
npx skills add patrick-xin/tonex --skill tonexRequirements
Tonex requires Node.js 18 or newer.