Skip to content

Getting started

npx @syv-ai/rulecast init

init reads your project — languages, docs, which agents you use — offers a catalog of ready-made rules that apply to your files, installs the hooks for your agent, and validates what it wrote. It shows you every file it will create or change before writing anything.

Then, in your agent, ask it to draft rules for the conventions in your own docs. init prints the prompt to paste.

npm — use this for agent hooks.

pnpm add -D @syv-ai/rulecast # or npm / yarn
npx @syv-ai/rulecast init

Standalone binary — use this for CI and one-off runs. Download it from Releases. It needs no Node installation.

Prefer the npm install for hooks. The binary extracts and loads its embedded ast-grep parser on every run, which costs about 260 ms: a rulecast run that takes ~110 ms under Node takes ~370 ms as a binary (measured on an Apple M3 Pro). That is invisible in CI and too slow for a hook that fires on every file an agent writes.

Node ≥ 20.12. Linux and macOS; Windows is not supported.

0.4. Everything above works and is tested. Before 1.0 the config format and the output of rulecast run may still change; minimum_rulecast_version exists so a rule can say what it needs.

Next: adapters for Codex, Cursor and OpenCode; Biome; an Azure OpenAI provider.