Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwodder/ghutil
Interact with GitHub from the command line
https://github.com/jwodder/ghutil
github-api github-client python
Last synced: 14 days ago
JSON representation
Interact with GitHub from the command line
- Host: GitHub
- URL: https://github.com/jwodder/ghutil
- Owner: jwodder
- License: mit
- Created: 2017-05-19T19:40:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-19T22:10:40.000Z (about 1 year ago)
- Last Synced: 2023-10-20T14:28:32.864Z (about 1 year ago)
- Topics: github-api, github-client, python
- Language: Python
- Homepage:
- Size: 793 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
.. image:: https://www.repostatus.org/badges/latest/abandoned.svg
:target: https://www.repostatus.org/#abandoned
:alt: Project Status: Abandoned – Initial development has started, but
there has not yet been a stable, usable release; the project has been
abandoned and the author(s) do not intend on continuing development... image:: https://github.com/jwodder/ghutil/workflows/Test/badge.svg?branch=master
:target: https://github.com/jwodder/ghutil/actions?workflow=Test
:alt: CI Status.. image:: https://codecov.io/gh/jwodder/ghutil/branch/master/graph/badge.svg
:target: https://codecov.io/gh/jwodder/ghutil.. image:: https://img.shields.io/github/license/jwodder/ghutil.svg?maxAge=2592000
:target: https://opensource.org/licenses/MIT
:alt: MIT License.. contents::
:backlinks: topThe ``ghutil`` package provides a command-line program for interacting with &
managing GitHub repositories, issues, gists, etc.This is a work in progress; while the program should be usable at any given
point in time, many API features are not yet present, and those features that
are present may have their interface modified at any time.Installation
============
``ghutil`` requires Python 3.7 or higher to run and `pip
`_ 19.0 or higher to install. You can install ``ghutil``
and its dependencies by running::python3 -m pip install git+https://github.com/jwodder/ghutil.git
Basic Usage
===========Authentication
--------------Create a ``~/.config/ghutil.cfg`` file and store a GitHub token in it like so::
[api.auth]
token = YOUR_GITHUB_TOKEN_HERECommands
--------Commands that allow the repository (or gist) to be unspecified will operate on
the current repository by default.Gists
^^^^^Run ``ghutil gist --help`` for details on specifying gists on the command line.
``ghutil gist clone []``
Locally clone a gist``ghutil gist delete [--force] []``
Delete a gist``ghutil gist [list]``
List your gists``ghutil gist new [-d ] [-P|--private] {-f | } ...``
Create a gist from one or more files``ghutil gist show [ ...]``
Show gist details``ghutil gist star [ ...]``
Star the given gists``ghutil gist starred [--since ]``
List gists you've starred``ghutil gist unstar [ ...]``
Unstar the given gists``ghutil gist web []``
Open the given gist in a web browserIssues
^^^^^^Run ``ghutil issue --help`` for details on specifying issues on the command line.
``ghutil issue assign [--delete|--set] ...``
Assign an issue/PR to one or more users``ghutil issue close ...``
Close one or more issues/PRs``ghutil issue comments [--since ] ``
Show comments on an issue/PR as JSON``ghutil issue edit [] ``
Edit an issue``ghutil issue label [--delete|--set] ...``
(Re)label an issue/PR``ghutil issue [list [] []]``
List issues for a repository``ghutil issue lock ...``
Lock one or more issues/PRs``ghutil issue new [] []``
Create an issue in the given repository``ghutil issue open ...``
Open one or more issues/PRs``ghutil issue read [--since ] ``
Read an issue/PR and its comments``ghutil issue reply []``
Comment on an issue or pull request``ghutil issue search [--limit ] [--sort comments|created|updated] [--asc|--desc] ...``
Search for issues and/or pull requests``ghutil issue show ...``
Show details on the given issues``ghutil issue unlock ...``
Unlock one or more issues/PRs``ghutil issue web ``
Open the given issue/PR in a web browserLabels
^^^^^^``ghutil label delete [-R|--repo ] [--force] ``
Delete a label``ghutil label edit [-R|--repo ] [--name ] [--color ] [-d ] ``
Edit a label``ghutil label [list [-R|--repo ] [--verbose]]``
List issue/PR labels available in a repository``ghutil label new [-R|--repo ] [-d ] ``
Create a new labelMilestones
^^^^^^^^^^``ghutil milestone close [-R|--repo ] ``
Close a milestone``ghutil milestone delete [-R|--repo ] [--force] ``
Delete a milestone``ghutil milestone edit [-R|--repo ] [] ``
Edit a milestone``ghutil milestone [list [-R|--repo ] [--state open|closed|all] [--sort completeness|due_on] [--asc|--desc]]``
List issue/PR milestones available in a repository``ghutil milestone new [-R|--repo ] [-d ] [--due-on ] [--open|--closed] ``
Create a new milestone``ghutil milestone open [-R|--repo ] ``
Open a milestone``ghutil milestone show [-R|--repo ] ...``
Show details on the given milestones``ghutil milestone web [-R|--repo ] ``
Open the given milestone in a web browserPull Requests
^^^^^^^^^^^^^Run ``ghutil pr --help`` for details on specifying pull requests on the command
line.``ghutil pr assign [--delete|--set] ...``
Assign an issue/PR to one or more users``ghutil pr close ...``
Close one or more issues/PRs``ghutil pr comments [--since ] ``
Show comments on an issue/PR as JSON``ghutil pr edit [] ``
Edit a pull request``ghutil pr label [--delete|--set] ...``
(Re)label an issue/PR``ghutil pr [list [] []]``
List pull requests for a repository``ghutil pr lock ...``
Lock one or more issues/PRs``ghutil pr merge [-T ] [-m ] [--merge|--squash|--rebase] [--sha HASH] ``
Merge a pull request``ghutil pr new [-T ] [--body ] [--maintainer-can-modify] ``
Create a pull request``ghutil pr open ...``
Open one or more issues/PRs``ghutil pr read [--since ] ``
Read an issue/PR and its comments``ghutil pr reply []``
Comment on an issue or pull request``ghutil pr show ...``
Show details on the given pull requests``ghutil pr unlock ...``
Unlock one or more issues/PRs``ghutil pr web ``
Open the given pull request in a web browserReleases
^^^^^^^^Run ``ghutil release --help`` for details on specifying releases on the command
line. Commands that allow the release to be unspecified will operate on the
latest release by default.``ghutil release attach [--content-type ] [--label ] [--name ] [:] ``
Upload a release asset``ghutil release delete [--force] [[:]]``
Delete a release``ghutil release edit [] [[:]]``
Edit a release``ghutil release [list []]``
List releases for a repository``ghutil release new [] []``
Create a release for the given tag (default: the most recent reachable tag)``ghutil release show [[:] ...]``
Show details on the given releases``ghutil release unattach [--force] [:] ``
Delete a release asset``ghutil release web [[:]]``
Open the given release in a web browserRepositories
^^^^^^^^^^^^Run ``ghutil repo --help`` for details on specifying repositories on the command
line.``ghutil repo clone []``
Locally clone a GitHub repository``ghutil repo delete [--force] []``
Delete a GitHub repository``ghutil repo edit [] []``
Edit a GitHub repository's details``ghutil repo fans []``
List users that have forked, starred, or watched the given repository``ghutil repo fork ``
Fork the given repository``ghutil repo [list [] []]``
List a user's repositories``ghutil repo list-forks []``
List a repository's forks``ghutil repo network [ ...]``
Show a repository's network of forks as a tree``ghutil repo new [] ``
Create a new repository``ghutil repo search [--limit ] [--sort stars|forks|updated] [--asc|--desc] ...``
Search for repositories on GitHub``ghutil repo set-topics ...``
Set a repository's topics``ghutil repo show [ ...]``
Show details on the given repositories``ghutil repo star [ ...]``
Star the given repositories``ghutil repo starred [--sort created|updated] [--asc|--desc]``
List repositories you've starred``ghutil repo unstar [ ...]``
Unstar the given repositories``ghutil repo web []``
Open the given repository in a web browserOther
^^^^^``ghutil plus1 | ...``
Give a thumbs-up to an issue, pull request, or comment thereon``ghutil request [--data ] [-H ] [--paginate] [-X ] ``
Make an arbitrary GitHub API request to ````Related Prior Art
=================
- https://github.com/github/hub
- https://github.com/stephencelis/ghi
- https://github.com/whiteinge/ok.sh