Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcrqr/gh
Module to use GitHub CLI in Deno.
https://github.com/jcrqr/gh
deno gh-cli gh-extension
Last synced: 3 months ago
JSON representation
Module to use GitHub CLI in Deno.
- Host: GitHub
- URL: https://github.com/jcrqr/gh
- Owner: jcrqr
- License: mit
- Created: 2021-09-11T09:07:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-11T09:07:50.000Z (about 3 years ago)
- Last Synced: 2024-07-05T03:21:02.249Z (4 months ago)
- Topics: deno, gh-cli, gh-extension
- Language: TypeScript
- Homepage:
- Size: 1.95 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# :octocat: gh
> Module to use GitHub CLI (aka `gh`) in Deno. Useful to create [extensions](https://cli.github.com/manual/gh_extension) using Deno.
## Installation
```ts
import { gh } from "https://deno.land/x/[email protected]/mod.ts";
```## Usage
```ts
import { gh } from "https://deno.land/x/[email protected]/mod.ts";async function gh(cmd: string, options: Options): Promise
```## Options
```ts
interface Options {
debug?: boolean;
flags?: Record>;
json?: boolean;
}
```## Example
```ts
import { gh } from "./mod.ts";const repos = await gh("api users/octocat/repos", {
json: true,
flags: { paginate: true },
}) as Array;console.log(`@octocat has ${repos.length} repos`);
```## Permissions
This module requires the `--allow-run` permission.
## Contributing
Please, see [CONTRIBUTING.md](CONTRIBUTING.md) to learn how you can contribute to this repository.
## License
This project is released under the [MIT License](LICENSE).