-
-
Notifications
You must be signed in to change notification settings - Fork 636
Expand file tree
/
Copy pathmain.ts
More file actions
22 lines (17 loc) · 559 Bytes
/
main.ts
File metadata and controls
22 lines (17 loc) · 559 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env node
import { defineCommand, runMain } from "citty"
import { auth } from "./auth"
import { checkUsage } from "./check-usage"
import { debug } from "./debug"
import { initProxyFromEnv } from "./lib/proxy"
import { start } from "./start"
const main = defineCommand({
meta: {
name: "copilot-api",
description:
"A wrapper around GitHub Copilot API to make it OpenAI compatible, making it usable for other tools.",
},
subCommands: { auth, start, "check-usage": checkUsage, debug },
})
initProxyFromEnv()
await runMain(main)