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.
Install the compiler
Install the core package as a development dependency. Its binary is exposed as coordiation-css.
npm install -D @coordiation/cssCreate the CSS input
Add the framework marker and split repeatable design decisions into local imports when useful.
@import "./theme.css";
@coordiation;@co-theme {
--co-color-brand-500: oklch(62.3% 0.214 259.815);
--co-radius-card: 1rem;
}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.
coordiation-css \
--input src/coordiation.css \
--output dist/coordiation.css \
--content src \
--minify \
--target chrome=111 \
--target safari=15.4Import or link the generated dist/coordiation.css from your application. The result contains static CSS only.
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.
coordiation-css \
--input src/coordiation.css \
--output dist/coordiation.css \
--content src \
--watchRebuilds 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.
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.
coordiation-css -i src/coordiation.css -o dist/coordiation.css -c src --watch --poll 500The 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.
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.
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.
- 01
-i / --input: CSS entry containing
@coordiation. - 02
-o / --output: generated static stylesheet path.
- 03
-c / --content: repeatable or comma-separated files and directories.
- 04
--include / --exclude / --safelist: literal scanner controls.
- 05
--cache-dir / --no-cache: relocate persistent state or run deliberately cold.
- 06
--sourcemap / --sourcemap-inline / --no-sources-content: choose map delivery and source-text policy.
- 07
--no-imports / --no-nesting / --no-prefixing: preserve a stage for another build tool.
- 08
--minify / --target: optimize output and declare repeatable browser targets.
- 09
--prefix / --no-diagnostics / --no-preflight: compiler syntax and diagnostics controls.
- 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
--minifyfor production and--watchonly 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.
