CLIInstallation

Installation

Run Tonex with npx, install it globally, or add the agent skill.

You usually do not need to install Tonex. Run the published package directly with npx:

npx @tonex-dev/cli@latest generate --seed "#6A9CFF" > globals.css

Use 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/cli

Then 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 --help

Use describe when an agent or script needs the machine-readable contract:

npx @tonex-dev/cli@latest describe

If 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 tonex

Requirements

Tonex requires Node.js 18 or newer.