gh-utils


Namegh-utils JSON
Version 0.6.9 PyPI version JSON
download
home_pagehttps://github.com/tddschn/gh-utils
SummaryGitHub CLI Utilities
upload_time2024-05-16 14:33:42
maintainerNone
docs_urlNone
authorXinyuan Chen
requires_python<4.0,>=3.10
licenseMIT
keywords gh github utils
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GH Utilities

A collection of useful utilities that work with GitHub CLI `gh`.

- [GH Utilities](#gh-utilities)
  - [Installation](#installation)
    - [pipx](#pipx)
    - [pip](#pip)
  - [Utilities](#utilities)
    - [ghcrar](#ghcrar)
      - [Features](#features)
      - [Usage](#usage)
      - [Screenshots](#screenshots)
    - [ghshs](#ghshs)
      - [Usage](#usage-1)
      - [Screenshot](#screenshot)
  - [Develop](#develop)

## Installation

### pipx

This is the recommended installation method.

```
$ pipx install gh-utils
```

### [pip](https://pypi.org/project/gh-utils/)

```
$ 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](images/ghcrar-public.png)

![](images/ghcrar-dupe-url-and-set-default.png)


### ghshs

<!-- cSpell:disable -->
**gh** **s**witch between **h**ttps and **s**sh
<!-- cSpell:enable -->

#### 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

![](./images/ghshs.png)

## Develop

```
$ git clone https://github.com/tddschn/gh-utils.git
$ cd gh-utils
$ poetry install
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tddschn/gh-utils",
    "name": "gh-utils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "gh, github, utils",
    "author": "Xinyuan Chen",
    "author_email": "45612704+tddschn@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/39/2e/4a890e8c292ddc186276e877de000ef84a9e932b95b9d00c160205556eaa/gh_utils-0.6.9.tar.gz",
    "platform": null,
    "description": "# GH Utilities\n\nA collection of useful utilities that work with GitHub CLI `gh`.\n\n- [GH Utilities](#gh-utilities)\n  - [Installation](#installation)\n    - [pipx](#pipx)\n    - [pip](#pip)\n  - [Utilities](#utilities)\n    - [ghcrar](#ghcrar)\n      - [Features](#features)\n      - [Usage](#usage)\n      - [Screenshots](#screenshots)\n    - [ghshs](#ghshs)\n      - [Usage](#usage-1)\n      - [Screenshot](#screenshot)\n  - [Develop](#develop)\n\n## Installation\n\n### pipx\n\nThis is the recommended installation method.\n\n```\n$ pipx install gh-utils\n```\n\n### [pip](https://pypi.org/project/gh-utils/)\n\n```\n$ pip install gh-utils\n```\n\n## Utilities\n\n### ghcrar\n\nShort for `gh_create_repo_and_add_to_remote`\n\n#### Features\n- Custom GitHub instance hostname support with `--hostname`\n- Supports both `ssh` and `https` protocols\n\n#### Usage\n\n```\n$ ghcrar --help\n\nusage: ghcrar [-h] [-a SUFFIX] [-n GITHUB REPO NAME] [--public] [--overwrite-remote-origin] [-H {ssh,https}] [-p PROTOCOL] [-S] [-V]\n\nCreate a GitHub repo with gh and add it as a remote\n\noptions:\n  -h, --help            show this help message and exit\n  -a SUFFIX, --append SUFFIX\n                        String to append to the repo name (default: None)\n  -n GITHUB REPO NAME, --name GITHUB REPO NAME\n                        The string to use as GitHub repo name, or <user|org>/<repo-name> with a slash (default: None)\n  --public              Create a public repository (default: False)\n  --overwrite-remote-origin, --force\n                        Overwrites remote origin if exists (default: False)\n  -H {ssh,https}, --hostname {ssh,https}\n                        GitHub hostname, default to use the first entry in hosts.yml (default: github.com)\n  -p PROTOCOL, --protocol PROTOCOL\n                        git protocol (default: ssh)\n  -S, --no-set-default  Do not run `gh repo set-default` (default: False)\n  -V, --version         show program's version number and exit\n```\n\n#### Screenshots\n\n![ghcrar-public](images/ghcrar-public.png)\n\n![](images/ghcrar-dupe-url-and-set-default.png)\n\n\n### ghshs\n\n<!-- cSpell:disable -->\n**gh** **s**witch between **h**ttps and **s**sh\n<!-- cSpell:enable -->\n\n#### Usage\n\n```\n$ ghshs --help\n\nusage: ghshs [-h] [-r REMOTE] [-V]\n\nSwitch between HTTPS and SSH types of GitHub remotes\n\noptions:\n  -h, --help            show this help message and exit\n  -r REMOTE, --remote REMOTE\n                        Name of the remote to switch (default: origin)\n  -V, --version         show program's version number and exit\n\n```\n\n#### Screenshot\n\n![](./images/ghshs.png)\n\n## Develop\n\n```\n$ git clone https://github.com/tddschn/gh-utils.git\n$ cd gh-utils\n$ poetry install\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "GitHub CLI Utilities",
    "version": "0.6.9",
    "project_urls": {
        "Bug Tracker": "https://github.com/tddschn/gh-utils/issues",
        "Homepage": "https://github.com/tddschn/gh-utils",
        "Repository": "https://github.com/tddschn/gh-utils"
    },
    "split_keywords": [
        "gh",
        " github",
        " utils"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f4d2c6c371587229471e8c2e071a02edc1f4c987739ba2f2006fca3f521f7fac",
                "md5": "ea4cb86f79209092d79a121858246bf7",
                "sha256": "bb9fa859704e7106072de49229ac297c81a46d8e5bebe65c5381717d1e11e430"
            },
            "downloads": -1,
            "filename": "gh_utils-0.6.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ea4cb86f79209092d79a121858246bf7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 7987,
            "upload_time": "2024-05-16T14:33:40",
            "upload_time_iso_8601": "2024-05-16T14:33:40.347577Z",
            "url": "https://files.pythonhosted.org/packages/f4/d2/c6c371587229471e8c2e071a02edc1f4c987739ba2f2006fca3f521f7fac/gh_utils-0.6.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "392e4a890e8c292ddc186276e877de000ef84a9e932b95b9d00c160205556eaa",
                "md5": "683b84bad470d6e975be320632b10f66",
                "sha256": "45b6a4ef2c07f77a60d681f32d40c2578f2884314f9f87c497c078fb45f982ac"
            },
            "downloads": -1,
            "filename": "gh_utils-0.6.9.tar.gz",
            "has_sig": false,
            "md5_digest": "683b84bad470d6e975be320632b10f66",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 5491,
            "upload_time": "2024-05-16T14:33:42",
            "upload_time_iso_8601": "2024-05-16T14:33:42.273487Z",
            "url": "https://files.pythonhosted.org/packages/39/2e/4a890e8c292ddc186276e877de000ef84a9e932b95b9d00c160205556eaa/gh_utils-0.6.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-16 14:33:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tddschn",
    "github_project": "gh-utils",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "gh-utils"
}
        
Elapsed time: 0.29063s