-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
30 lines (23 loc) · 646 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /usr/bin/env node
import { config } from "dotenv";
config({ path: ".env.gateweaver" });
import { program } from "commander";
import {
startServerCommand,
validateConfigCommand,
generateApiKeyCommand,
} from "./commands";
const setupCLI = async () => {
const packageJson = await import("../package.json", {
assert: { type: "json" },
});
program
.name("gateweaver")
.description("A CLI tool for managing gateweaver")
.version(packageJson.default.version);
startServerCommand(program);
validateConfigCommand(program);
generateApiKeyCommand(program);
program.parse();
};
setupCLI().catch(console.error);