UNPKG

creatrip-agent-rules-builder

Version:

Unified converter for AI coding agent rules across Cursor, Windsurf, and Claude

37 lines (29 loc) 1.05 kB
#!/usr/bin/env node import { Command } from "commander"; import { buildRules } from "./build"; import { createVerifyCommand } from "./commands/verify"; import { createCICommand } from "./commands/ci"; import { readFileSync } from "fs"; import { join } from "path"; const packageJson = JSON.parse( readFileSync(join(__dirname, "../package.json"), "utf8"), ); const program = new Command(); program .name("agent-rules") .description("AI 코딩 에이전트용 규칙 파일 변환 도구") .version(packageJson.version, "-v, --version", "버전 정보 출력"); program .command("build") .description("AGENTS.md 파일을 각 에이전트 포맷으로 변환") .option("-f, --file <file>", "변환할 파일 경로 (기본값: AGENTS.md)") .option( "-r, --recursive", "하위 디렉토리를 재귀적으로 탐색하여 모든 AGENTS.md 파일 처리", ) .action(async (options) => { await buildRules(options); }); program.addCommand(createVerifyCommand()); program.addCommand(createCICommand()); program.parse();