GH Utilities
A collection of useful utilities that work with GitHub CLI gh.
Installation
pipx
This is the recommended installation method.
$ pipx install gh-utils
pip
$ pip install gh-utils
Utilities
ghcrar
Short for gh_create_repo_and_add_to_remote
Features
- Custom GitHub instance hostname support with
--hostname - Supports both
sshandhttpsprotocols
Usage
$ ghcrar --help
usage: ghcrar [-h] [-a SUFFIX] [-n GITHUB REPO NAME] [--public] [--overwrite-remote-origin] [-H {ssh,https}] [-p PROTOCOL] [-S] [-V]
Create a GitHub repo with gh and add it as a remote
options:
-h, --help show this help message and exit
-a SUFFIX, --append SUFFIX
String to append to the repo name (default: None)
-n GITHUB REPO NAME, --name GITHUB REPO NAME
The string to use as GitHub repo name, or <user|org>/<repo-name> with a slash (default: None)
--public Create a public repository (default: False)
--overwrite-remote-origin, --force
Overwrites remote origin if exists (default: False)
-H {ssh,https}, --hostname {ssh,https}
GitHub hostname, default to use the first entry in hosts.yml (default: github.com)
-p PROTOCOL, --protocol PROTOCOL
git protocol (default: ssh)
-S, --no-set-default Do not run `gh repo set-default` (default: False)
-V, --version show program's version number and exit
Screenshots
ghshs
gh switch between https and ssh
Usage
$ ghshs --help
usage: ghshs [-h] [-r REMOTE] [-V]
Switch between HTTPS and SSH types of GitHub remotes
options:
-h, --help show this help message and exit
-r REMOTE, --remote REMOTE
Name of the remote to switch (default: origin)
-V, --version show program's version number and exit
Screenshot
Develop
$ git clone https://github.com/tddschn/gh-utils.git
$ cd gh-utils
$ poetry install
Metadata
Release files for gh-utils 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gh_utils-1.1.0.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gh_utils-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.6 kB
Release files / gh_utils-1.1.0.tar.gz
| Download URL | gh_utils-1.1.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8470b7b72e7a5c70ce6166bbf8d5ccbb02aa99e8f4580547ef63bacce7d27e5c
|
|
BLAKE2b-256 checksum How to use checksums |
e14e5ee3719b61ffd3e8445dcdf72cd61222dd15f665f5f8882b18bd65b7e9ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.8.20 Darwin/25.1.0
|
Release files / gh_utils-1.1.0-py3-none-any.whl
| Download URL | gh_utils-1.1.0-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
793134acdfd61459533a195af36b8be38f64806b64d40fe43bc997de975f2400
|
|
BLAKE2b-256 checksum How to use checksums |
acaa9cf8a60772a9c41f154d91955e2770d3d2c02799e028753b07fb9f192c03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.8.20 Darwin/25.1.0
|