@mgvdev/ai
v0.6.0
Published
CLI to generate AI rule documentation and wire it into AGENTS.md or CLAUDE.md
Readme
@mgvdev/ai
A Bun CLI to generate project AI rules and automatically wire them into AGENTS.md or CLAUDE.md.
Demo

What The CLI Does
When you run init, the CLI:
- Detects the target instructions file:
AGENTS.mdfirst, thenCLAUDE.md, otherwise createsAGENTS.md. - Opens an interactive wizard for categories/rules/options.
- Lets you skip questions (
Enterwith no selection). - Supports keyboard shortcuts:
a(select/deselect all),i(invert selection). - Lets you add free text per rule (for example, specifying "tRPC" for API style).
- Generates
.ai_rules/*.mdfiles and.ai_rules/config.json. - Updates a managed block in
AGENTS.md/CLAUDE.mdwith links to generated rule files.
Local Installation (Development)
bun installLocal Usage
bun run index.ts initNon-interactive mode:
bun run index.ts init --non-interactive --preset webUsage With bunx (Published Package)
bunx --bun @mgvdev/ai initGenerated Output
After init, you get:
.ai_rules/config.json(source of truth for selections).ai_rules/<category>.md(1 file per selected category)- a managed block between:
<!-- AI-INIT:RULES:BEGIN -->and<!-- AI-INIT:RULES:END -->inAGENTS.mdorCLAUDE.md
