All Projects → hipstersmoothie → octokit-cli

hipstersmoothie / octokit-cli

Licence: MIT License
A CLI for @octokit/rest

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to octokit-cli

korefile
File System API for Local/GitHub.
Stars: ✭ 29 (+38.1%)
Mutual labels:  octokit
fixtures
Fixtures for all the octokittens
Stars: ✭ 82 (+290.48%)
Mutual labels:  octokit
octokit-plugin-rename-branch
Octokit plugin to rename a branch in a github repository
Stars: ✭ 18 (-14.29%)
Mutual labels:  octokit
Monkey
Monkey is an unofficial GitHub client for iOS,to show the rank of coders and repositories.
Stars: ✭ 1,765 (+8304.76%)
Mutual labels:  octokit
Octokit.rb
Ruby toolkit for the GitHub API
Stars: ✭ 3,522 (+16671.43%)
Mutual labels:  octokit
octokit.js
The all-batteries-included GitHub SDK for Browsers, Node.js, and Deno.
Stars: ✭ 5,279 (+25038.1%)
Mutual labels:  octokit
labman-cli
👨🏼‍🔬 github label manager cli
Stars: ✭ 15 (-28.57%)
Mutual labels:  octokit

octokit-cli

A cli for @octokit/rest.

NOTE: This a WIP side-project. If you want to see this project do something it doesn't feel free to contribute! Currently the descriptions could use some work.

Features:

🚀 Run any octokit endpoint from the CLI

🚀 Automatically detect certain args in CI (owner, repo, issue_number)

Example showing fuzzy searching for an emoji

Installation

You can either install octokit-cli to your project:

npm i --save-dev octokit-cli
# or
yarn add -D octokit-cli

Or globally on your computer:

npm i -g octokit-cli

Usage

Most commands require authentication to work. To authenticate create a personal-access-token then set GH_TOKEN to the token.

Locally you can add your GH_TOKEN to a file at the root of your project named .env.

GH_TOKEN=YOUR_PERSONAL_ACCESS_TOKEN

Now when you run octokit-cli you do not have to include your GH_TOKEN.

Commands

octokit-cli is a thin wrapper around @octokit/rest so it has a very similar API.

To get help for every command just add the --help flag.

Examples

Create a status on a PR:

octokit repos create-status --owner hipstersmoothie --repo octokit-cli --state error --sha b3859f9e787145c904aee28668e20960b8407e2 --context "My Status"

Create a comment on a PR:

octokit issues create-comment --body "My Comment" --owner hipstersmoothie --repo octokit-cli --issue_number 26

Fuzzy find an emoji:

Using fzf

octokit emojis get | fzf

Commands in CI

When run from a continuos integration (CI) environment, octokit-cli will detect the owner, repo, and issue_number and set these as defaults when running a command.

For example, if you ran the following command from a PR in your CI it would automatically include owner, repo, and issue_number. If ran locally these arguments would be required.

octokit issues create-comment --body "My Comment"

Contributing

If you want a feature or can fix a bug, submit a PR!

If you think a particular endpoint can be formatted better for the CLI, add a formatter in src/formatters.

Developing

First install the dependencies:

yarn

Scripts

  • yarn start - Build the CLI and watch for changes
  • yarn build - Create a build of the CLI
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].