bb6a1321fb
Multi-line tmux strip (context, quota, tools, todos, git), theme sync with Grok UI, full/essential/minimal presets, one-shot installer, EN+ZH docs, and 40 unit tests.
27 lines
781 B
JavaScript
Executable File
27 lines
781 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
/**
|
|
* CLI entry — works from repo, npm link, or global install.
|
|
*/
|
|
import { pathToFileURL } from "node:url";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { existsSync } from "node:fs";
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
const candidates = [
|
|
path.join(__dirname, "..", "dist", "src", "index.js"),
|
|
path.join(__dirname, "..", "dist", "index.js"),
|
|
];
|
|
|
|
const entry = candidates.find((p) => existsSync(p));
|
|
if (!entry) {
|
|
console.error(
|
|
"grok-build-hud: build missing. Run: npm install && npm run build",
|
|
);
|
|
process.exit(1);
|
|
}
|
|
|
|
const mod = await import(pathToFileURL(entry).href);
|
|
const code = await mod.runCli(process.argv.slice(2));
|
|
process.exit(typeof code === "number" ? code : 0);
|