feat(regime)

This commit is contained in:
Dan Finch 2026-04-29 00:55:53 +02:00
commit 655175f273
36 changed files with 1066 additions and 0 deletions

25
bin/regime Executable file
View file

@ -0,0 +1,25 @@
#!/usr/bin/env bun
import { resolve } from "path"
import { check } from "../src/check"
import { sync } from "../src/sync"
import { promote } from "../src/promote"
const [command, ...rawArgs] = process.argv.slice(2)
const hasYes = rawArgs.includes("--yes")
const args = rawArgs.filter(a => a !== "--yes")
const targetDir = resolve(args[0] ?? process.cwd())
switch (command) {
case "check":
await check(targetDir)
break
case "sync":
await sync(targetDir)
break
case "promote":
await promote(targetDir, hasYes)
break
default:
console.error("Usage: regime <check|sync|promote> [path] [--yes]")
process.exit(1)
}