Files
userbase/app/src/cli/index.ts
T
2025-02-14 13:55:46 +01:00

25 lines
601 B
JavaScript

#!/usr/bin/env node
import { Command } from "commander";
import color from "picocolors";
import * as commands from "./commands";
import { getVersion } from "./utils/sys";
const program = new Command();
export async function main() {
const version = await getVersion();
program
.name("bknd")
.description(color.yellowBright("⚡") + " bknd cli " + color.bold(color.cyan(`v${version}`)))
.version(version);
// register commands
for (const command of Object.values(commands)) {
command(program);
}
program.parse();
}
main().then(null).catch(console.error);