import fs from "node:fs"; import { downloadTemplate } from "@bluwy/giget-core"; import * as $p from "@clack/prompts"; import type { CliCommand } from "cli/types"; import { typewriter, wait } from "cli/utils/cli"; import { exec, getVersion } from "cli/utils/sys"; import { Option } from "commander"; import color from "picocolors"; import { overridePackageJson, updateBkndPackages } from "./npm"; import { type Template, templates } from "./templates"; const config = { types: { runtime: "Runtime", framework: "Framework" }, runtime: { node: "Node.js", bun: "Bun", cloudflare: "Cloudflare" }, framework: { nextjs: "Next.js", remix: "Remix", astro: "Astro" } } as const; export const create: CliCommand = (program) => { program .command("create") .addOption(new Option("-i, --integration ", "integration to use")) .addOption(new Option("-t, --template