Skip to content
/ gh-do Public

:octocat: gh-do is a tool to do anything using GitHub credentials

License

Notifications You must be signed in to change notification settings

k1LoW/gh-do

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8828b7f · Mar 22, 2025
Nov 14, 2024
May 23, 2024
May 15, 2023
Mar 22, 2025
May 15, 2023
May 15, 2023
Nov 14, 2024
Jan 25, 2024
Mar 22, 2025
May 15, 2023
May 15, 2023
May 15, 2023
May 15, 2023
Oct 9, 2023
May 15, 2023
Mar 21, 2025
Mar 21, 2025

Repository files navigation

gh-do

:octocat: gh-do (or gh do) is a tool to do anything using GitHub credentials.

Key features of gh-do are:

  • Use only credentials stored in secure storage by default
  • Set various environment variables for using GitHub API at once

As a GitHub CLI extension

Usage

$ gh do
export GH_HOST=github.com
export GH_TOKEN=gho_xxxxxXXXXXXXXxxxxxxxXXXXXXXXXxxXXxxx
export GH_ENTERPRISE_TOKEN=
export GITHUB_ENTERPRISE_TOKEN=
export GITHUB_TOKEN=gho_xxxxxXXXXXXXXxxxxxxxXXXXXXXXXxxXXxxx
export GITHUB_API_URL=https://api.github.com
export GITHUB_GRAPHQL_URL=https://api.github.com/graphql
$ gh do -- any-command # Set environment variables for github.com

Install

$ gh extension install k1LoW/gh-do

As a Standalone CLI

Usage

Run gh-do instead of gh setup.

$ gh-do --hostname enterprise.internal
export GH_HOST=enterprise.internal
export GH_TOKEN=gho_yyyyyYYYYYYYYyyyyyyyYYYYYYYYYyyYYyyy
export GH_ENTERPRISE_TOKEN=gho_yyyyyYYYYYYYYyyyyyyyYYYYYYYYYyyYYyyy
export GITHUB_ENTERPRISE_TOKEN=gho_yyyyyYYYYYYYYyyyyyyyYYYYYYYYYyyYYyyy
export GITHUB_TOKEN=gho_yyyyyYYYYYYYYyyyyyyyYYYYYYYYYyyYYyyy
export GITHUB_API_URL=https://enterprise.internal/api/v3
export GITHUB_GRAPHQL_URL=https://enterprise.internal/api/graphql
$ gh-do --hostname enterprise.internal -- any-command # Set environment variables for enterprise.internal

Install

deb:

$ export GH_DO_VERSION=X.X.X
$ curl -o gh-do.deb -L https://github.com/k1LoW/gh-do/releases/download/v$GH_DO_VERSION/gh-do_$GH_DO_VERSION-1_amd64.deb
$ dpkg -i gh-do.deb

RPM:

$ export GH_DO_VERSION=X.X.X
$ yum install https://github.com/k1LoW/gh-do/releases/download/v$GH_DO_VERSION/gh-do_$GH_DO_VERSION-1_amd64.rpm

apk:

$ export GH_DO_VERSION=X.X.X
$ curl -o gh-do.apk -L https://github.com/k1LoW/gh-do/releases/download/v$GH_DO_VERSION/gh-do_$GH_DO_VERSION-1_amd64.apk
$ apk add gh-do.apk

homebrew tap:

$ brew install k1LoW/tap/gh-do

aqua:

$ aqua g -i k1LoW/gh-do

manually:

Download binary from releases page

go install:

$ go install github.com/k1LoW/gh-do/cmd/gh-do@latest

docker:

$ docker pull ghcr.io/k1low/gh-do:latest

Use insecure credentials

If using credentials (environment variables, config files) that are not stored in secure storage, the --insecure option must be given.

$ gh do --insecure