gh project
is a GitHub CLI extension for listing projects and linking/unlinking projects to/from issues/PRs interactively.
$ gh extension install micnncim/gh-project
This extension depends on fzf as a fuzzy finder. To install using Homebrew:
$ brew install fzf
$ # Lists all projects in a current repository.
$ gh project list
$ # Lists all projects in a given organization.
$ gh project list --org=acme-org
# # Links a project in a current repository to the issue or PR #123 interactively.
$ gh project add 123
# # Links a project in a given organization to the issue or PR #123 interactively.
$ gh project add 123 --org=acme-org
# # Unlinks a project a current repository from the issue or PR #123 interactively.
$ gh project remove 123
# # Unlinks a project in a given organization from the issue or PR #123 interactively.
$ gh project remove 123 --org=acme-org
GH_PROJECT_ORGANIZATION
(optional): If this environment variable is set, projects in the organization are listed rather than a current repository even without the flag--org
.