mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 20:37:21 +00:00
public commit
This commit is contained in:
22
app/src/cli/index.ts
Normal file
22
app/src/cli/index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import { Command } from "commander";
|
||||
import * as commands from "./commands";
|
||||
import { getVersion } from "./utils/sys";
|
||||
const program = new Command();
|
||||
|
||||
export async function main() {
|
||||
program
|
||||
.name("bknd")
|
||||
.description("bknd cli")
|
||||
.version(await getVersion());
|
||||
|
||||
// register commands
|
||||
for (const command of Object.values(commands)) {
|
||||
command(program);
|
||||
}
|
||||
|
||||
program.parse();
|
||||
}
|
||||
|
||||
main().then(null).catch(console.error);
|
||||
Reference in New Issue
Block a user