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-0.6.9.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

gh_utils-0.6.9-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gh_utils-0.6.9.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.3 Darwin/23.4.0

File hashes

Hashes for gh_utils-0.6.9.tar.gz
Algorithm Hash digest
SHA256 45b6a4ef2c07f77a60d681f32d40c2578f2884314f9f87c497c078fb45f982ac
MD5 683b84bad470d6e975be320632b10f66
BLAKE2b-256 392e4a890e8c292ddc186276e877de000ef84a9e932b95b9d00c160205556eaa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gh_utils-0.6.9-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.3 Darwin/23.4.0

File hashes

Hashes for gh_utils-0.6.9-py3-none-any.whl
Algorithm Hash digest
SHA256 bb9fa859704e7106072de49229ac297c81a46d8e5bebe65c5381717d1e11e430
MD5 ea4cb86f79209092d79a121858246bf7
BLAKE2b-256 f4d2c6c371587229471e8c2e071a02edc1f4c987739ba2f2006fca3f521f7fac

See more details on using hashes here.

Supported by

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