Preflight Cli
Path:
loom-builder/src/preflight-cli.tsRelative: src/preflight-cli.tsSubproject: loom-builderCategory: dispatch-systemLines: 42Bytes: 1,436Imports: 3Exports: 0
Content Preview
- /**
- * Pre-flight CLI: estimate tokens for a spec and exit non-zero if too large.
- * Usage: bun run src/preflight-cli.ts <spec.json>
- */
- import { readFileSync, writeFileSync } from "node:fs";
- import { resolve } from "node:path";
- import { preflightCheck, type PreFlightError } from "./preflight.js";
- const specPath = process.argv[2];
- if (!specPath) {
- console.error("usage: bun run src/preflight-cli.ts <spec.json>");
- process.exit(1);
- }
- const specPathResolved = resolve(specPath as string);
- async