CLI
Package name: argot-css. Binary name: argot.
npm install argot-css
npx argot <command>
# or via package.json scripts after install
Requires Node.js 22.18+. The package is native ESM.
Usage:
argot <input.css> <output.css> [options] Process CSS
argot process <input.css> <output.css> Process CSS
argot scaffold [--directory=path/to/dir] Scaffold stylesheets for new project
argot semantics [path] [--extended] Write semantic CSS template
argot palette <definition.json> [out.css] Write primitive palette CSS
argot help Show help
Dispatch rules:
process,scaffold,semantics,palette, andhelp/--help/-hare subcommands.- If the first argument ends with
.css, the CLI runs the processor (equivalent toprocesssubcommand).
Deep dives: Processor, Semantic tokens, Palette generator, Scaffold.
argot <input.css> <output.css> #
Assemble local @imports, lint, minify, write output.
argot styles/index.css dist/styles.css
argot styles/index.css dist/styles.css --lint-config=./stylelint.config.js
argot styles/index.css dist/styles.css -c ./stylelint.config.js
| Argument / flag | Meaning |
|---|---|
input.css |
Entry stylesheet (required) |
output.css |
Destination (required). Parent directories are created. |
--lint-config / -c |
Stylelint config file. When omitted, built-in default (recommended + argot/color-contrast). |
Paths resolve against the current working directory. Does not run palette, semantics, or scaffold generation.
argot scaffold [--directory="output/path"] #
Write a starter layered CSS tree (entrypoint, reset, base, token hooks, modules).
argot scaffold
argot scaffold --directory="./path/to/project"
argot scaffold --overwrite
Refuses overwrite of existing consumer-owned files unless forced with
--overwrite flag. File map:
Architecture.
argot semantics [path] [--extended] #
Write a semantic custom-property template (:root declarations).
argot semantics
argot semantics ./styles/semantics.css
argot semantics --extended
argot semantics ./styles/semantics-extended.css --extended
| Argument / flag | Meaning |
|---|---|
path |
Output file (default ./vars-semantic.css) |
--extended |
Include extended-tier tokens (default: core only) |
Creates parent directories as needed. Overwrites an existing file at the output path. Refuses if the path is a directory.
argot palette [output.css] #
Generate primitive palette CSS from a versioned JSON definition.
argot palette
argot palette ./styles/primitives.css
argot palette ./styles/primitives.css --dry-run
argot palette ./styles/primitives.css --force
argot palette --help
| Argument / flag | Meaning |
|---|---|
definition.json |
Palette definition (required) |
output.css |
Destination (default ./vars-primitive.css) |
--force |
Allow replacing an existing output file |
--dry-run |
Validate and render without writing (still requires --force if the path exists) |
--help / -h |
Palette-specific usage |
Input and output paths must differ. Existing files are refused without
--force. See Palette
generator for the definition
schema (seedColors, curves, format, gamut).
argot help #
argot help
argot --help
argot -h
Prints top-level usage to stdout.
Exit status and errors #
Failures (unknown command, invalid args, missing files, validation errors) print
to stderr and exit nonzero. Successful writes may print a short confirmation
(e.g. palette Wrote …, semantics Wrote …, processor destination message).
Library vs CLI #
Most generation and palette logic is also available as package subpath imports
(no subprocess). See Installation and
Technical details. There is no
root argot-css JS entrypoint—import named subpaths only.
Full typed API notes ship in the package as
docs/api.md.