Skip to main content

GitHub CLI Utilities

Project description

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 ssh and https protocols

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

ghcrar-public

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gh_utils-1.0.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gh_utils-1.0.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file gh_utils-1.0.1.tar.gz.

File metadata

  • Download URL: gh_utils-1.0.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.8.20 Darwin/25.1.0

File hashes

Hashes for gh_utils-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8fbc0b9a1924d77abad367ea81fc9eb308a09ef5c6ef2dee2062d80ca1a1a86e
MD5 398852e677002fe0ec03fabd60980417
BLAKE2b-256 f96d01a9de793052cb027853522788ecc3dfdd0a03c793c1bf981a1495707f75

See more details on using hashes here.

File details

Details for the file gh_utils-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: gh_utils-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.8.20 Darwin/25.1.0

File hashes

Hashes for gh_utils-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ead84beda205d9b92a434856da7468a320373553d5f37944823505646db170f3
MD5 6fbe4fdb438d3d0ddc2757a7bf086e1e
BLAKE2b-256 78c3f5a84acfd3e2428cde4f2f96847fdd978181e5c8f9d1ef406f980bdbbe34

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page