add templates subcommand

This commit is contained in:
Dan Finch 2026-05-03 12:00:34 +02:00
parent 56524450dc
commit 2602b67938
3 changed files with 66 additions and 2 deletions

View file

@ -3,6 +3,7 @@ import { resolve } from "path"
import { check } from "../src/check"
import { sync } from "../src/sync"
import { promote } from "../src/promote"
import { templates } from "../src/templates"
const [command, ...rawArgs] = process.argv.slice(2)
const hasYes = rawArgs.includes("--yes")
@ -19,7 +20,10 @@ switch (command) {
case "promote":
await promote(targetDir, hasYes)
break
case "templates":
templates(rawArgs.includes("--full"))
break
default:
console.error("Usage: regime <check|sync|promote> [path] [--yes]")
console.error("Usage: regime <check|sync|promote|templates> [path] [--yes] [--full]")
process.exit(1)
}