CoordiationCSS
Menu
Docs/Installation/Using the CLI

INSTALLATION · COMPLETE CLI

Using the CLI

Generate static Coordiation CSS without a bundler plugin, then use the same command as a durable development watcher across local filesystems and container mounts.

Watch mode performs an initial build, detects the CSS entry, imported CSS, and source edits, additions, and deletions, and keeps running after temporary filesystem errors. A persistent incremental cache reuses unchanged extraction and compilation work by default.

01

Install the compiler

Install the core package as a development dependency. Its binary is exposed as coordiation-css.

Terminal
npm install -D @coordiation/css
02

Create the CSS input

Add the framework marker and split repeatable design decisions into local imports when useful.

src/coordiation.css
@import "./theme.css";
@coordiation;
src/theme.css
@co-theme {
  --co-color-brand-500: oklch(62.3% 0.214 259.815);
  --co-radius-card: 1rem;
}
03

Build once

Use one-shot mode in production builds and CI. Add --minify and explicit targets when the distributed CSS should be compact and its browser contract pinned.

Terminal
coordiation-css \
  --input src/coordiation.css \
  --output dist/coordiation.css \
  --content src \
  --minify \
  --target chrome=111 \
  --target safari=15.4

Import or link the generated dist/coordiation.css from your application. The result contains static CSS only.

04

Watch during development

Add --watch to build immediately and then rescan after content changes. Portable content polling avoids relying on filesystem-specific recursive watch behavior.

Terminal
coordiation-css \
  --input src/coordiation.css \
  --output dist/coordiation.css \
  --content src \
  --watch
Safe output lifecycle

Rebuilds never overlap. Each completed stylesheet is written to a sibling temporary file and renamed into place, so downstream servers do not read a partially written result.

05

Tune polling only when needed

The default interval is 250ms. Slower intervals reduce metadata checks in very large projects or on network and container-mounted filesystems.

Terminal
coordiation-css -i src/coordiation.css -o dist/coordiation.css -c src --watch --poll 500

The minimum is 25ms. Unchanged files become scanner hits, unchanged compilation becomes a compiler hit, and no output write occurs when the final fingerprint is unchanged.

06

Recover and stop cleanly

A missing input or temporarily unavailable source root is reported once while the watcher remains active. Restore the file and the next successful poll rebuilds automatically. Press Ctrl+C, or send SIGTERM, to finish the active build and stop with a successful exit.

Watch output
Coordiation CSS: watching 1 source root every 250ms.
Coordiation CSS: build 1 complete — 14 files, 82 candidates, 0 rejected, 0 scan hits, 14 misses, compile miss in 18ms.
Coordiation CSS: build failed — ENOENT: no such file or directory, open 'src/coordiation.css'
Coordiation CSS: build 2 complete — 14 files, 82 candidates, 0 rejected, 14 scan hits, 0 misses, compile hit in 4ms.
Coordiation CSS: watch stopped.

OPTIONS

Use one scanner contract

Build and watch mode share the same source-selection and compiler controls.

  1. 01

    -i / --input: CSS entry containing @coordiation.

  2. 02

    -o / --output: generated static stylesheet path.

  3. 03

    -c / --content: repeatable or comma-separated files and directories.

  4. 04

    --include / --exclude / --safelist: literal scanner controls.

  5. 05

    --cache-dir / --no-cache: relocate persistent state or run deliberately cold.

  6. 06

    --sourcemap / --sourcemap-inline / --no-sources-content: choose map delivery and source-text policy.

  7. 07

    --no-imports / --no-nesting / --no-prefixing: preserve a stage for another build tool.

  8. 08

    --minify / --target: optimize output and declare repeatable browser targets.

  9. 09

    --prefix / --no-diagnostics / --no-preflight: compiler syntax and diagnostics controls.

  10. 10

    -w / --watch and --poll: enable durable watching and optionally tune its interval.

AI GENERATION CONTRACT

Keep commands inspectable

Agents can query the complete CLI capability and generate deterministic commands without guessing at project boundaries.

  • Use literal input, output, content, import, filter, safelist, and target values.
  • Use one-shot plus --minify for production and --watch only for an active development process.
  • Do not wrap CLI watch mode in a second filesystem watcher.
  • Keep complete class strings in scanned sources and report dynamic-class or toolchain diagnostics.
  • Treat a recoverable watch error as a source-state problem, not as a reason to start duplicate watchers.