-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
27 lines (23 loc) · 770 Bytes
/
Copy pathindex.ts
File metadata and controls
27 lines (23 loc) · 770 Bytes
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
/**
* GitHub example entry point. Wires the typed API + the
* friendly commands; the `import.meta.main` guard lets you run
* this file directly as a script:
*
* GITHUB_TOKEN=$(gh auth token) bun examples/github/ lookup torvalds
* GITHUB_TOKEN=$(gh auth token) bun examples/github/ top "language:rust stars:>10000"
*/
import { createCli } from "../../src"
import { githubApi, GithubError } from "./schema"
import { lookup, top } from "./commands"
export { githubApi, GithubError } from "./schema"
export * from "./commands"
export const githubCli = createCli({
name: "gh-tiny",
description: "Tiny GitHub CLI built with clipi",
api: githubApi,
commands: [lookup, top],
errorClass: GithubError,
})
if (import.meta.main) {
await githubCli.run()
}