Skip to content

Git Hub CLI

Work with GitHub from the command line: issues, PRs, and releases.

Self-hostedNot yet verified
Report issue
MIT★ 38000Source project only — not browser-runnable

External Tool

This open-source tool is maintained externally. View the source on GitHub to learn more or run it yourself.

Browse developer tools →

What's next with Git Hub CLI?

Choose how you want to get started.

Use it free

Open the official tool or demo — no account needed.

Free

Self-host it

Run the open-source version on your own infrastructure.

Open

What is Git Hub CLI?

GitHub CLI is an open-source command-line interface (CLI) tool developed by GitHub to streamline interactions with GitHub repositories and services. Its primary purpose is to enable developers to manage GitHub workflows through terminal commands, reducing reliance on the web interface. Target users include software developers, DevOps engineers, and open-source contributors who need efficient, scriptable access to GitHub features. The tool solves common pain points such as repetitive tasks in web-based workflows, version control management, and integration with development tools like GitHub Copilot. By providing a CLI, it enhances productivity for users who prefer terminal environments or need automation capabilities for CI/CD pipelines and repository management.

How it works

GitHub CLI is a tool that integrates GitHub's API with terminal environments, allowing users to perform actions like managing repositories, pull requests, and issues via command-line commands. It is designed for developers who want to automate tasks or work in environments where a graphical interface is unavailable. The tool is part of GitHub's ecosystem, offering integration with other GitHub services such as GitHub Copilot and GitHub Actions. Its open-source nature under the MIT license encourages community contributions and customization. GitHub CLI supports commands for creating and managing pull requests (e.g., `gh pr create`), viewing repository issues (`gh issue list`), and checking pull request statuses (`gh pr status`). It also enables users to interact with GitHub Copilot, view repository metadata, and create releases. Aliases can be set for customizing command shortcuts.

How to use it

  1. 1Install GitHub CLI via package managers (Homebrew for macOS, WinGet for Windows, or apt/dnf/zypper for Linux). 2. Authenticate with GitHub using `gh auth login` to link the CLI to a GitHub account. 3. Use commands like `gh repo view` to inspect repository details or `gh pr checkout` to work on pull requests locally. 4. Run `gh copilot` to integrate GitHub Copilot for AI-assisted coding. Practical tips: Use `gh alias set` to create custom shortcuts for frequently used commands. Always verify network connectivity, as the CLI relies on GitHub's API. For advanced workflows, combine CLI commands with scripts or CI/CD tools.

What it can do

  • github automation

Use cases

Assumptions and limitations

Assumptions

  • source: https://github.com/cli/cli
  • license: MIT — free to use
  • privacy: Self-hosted — you control your data

Limitations

  • Requires a stable internet connection to interact with GitHub's API.
  • Limited GUI-like features compared to the web-based GitHub interface.
  • Authentication issues may arise if session tokens expire or are revoked.
  • Dependent on GitHub's API rate limits, which could throttle heavy usage.
  • Learning curve for users unfamiliar with command-line workflows.

Understanding the result

Work with GitHub from the command line: issues, PRs, and releases.

Tool details

  • Clearly flagged when a network request is needed.
  • No account, no sign-up, and no tracking of your content.
  • Powered by (MIT).
Built with
(cli/cli)
License
MIT
Runs locally
No — requires a network request
Verification
Not yet verified
Input
Query
Output
Text
Open-source source & license

Built with cli/cli. OpenToolVault provides the discovery and browser interface while crediting the original project maintainers.

Built with
License
MIT
View source on GitHub

Open-source project

OpenToolVault is an independent directory. We are not affiliated with or endorsed by this project.

References

Frequently asked

How do I install GitHub CLI on my system?

Install GitHub CLI using package managers: Homebrew (macOS: `brew install gh`), WinGet (Windows: `winget install gh`), or apt/dnf/zypper for Linux. Alternatively, download binaries or installers from the GitHub CLI website. After installation, run `gh auth login` to authenticate with your GitHub account.

How does GitHub CLI interact with GitHub's API?

GitHub CLI uses GitHub's REST API and GraphQL endpoints to perform actions like creating pull requests or listing issues. It authenticates via OAuth tokens, which are generated during the `gh auth login` process. Commands send HTTP requests to GitHub's servers, handling authentication and data parsing automatically.

How can I create a new pull request using GitHub CLI?

Run `gh pr create` to initiate a pull request. Specify the base branch (e.g., `main`) and head branch (e.g., `feature-branch`). You can also add a title, description, and assignees. For example: `gh pr create -b main -h feature-branch -t 'Fix bug in login flow'`.

How does GitHub CLI compare to GitHub's web interface?

GitHub CLI is ideal for automation and terminal workflows, while the web interface offers visual tools for collaboration and code review. CLI excels in scripting and batch tasks, whereas the web interface provides interactive features like drag-and-drop file management and real-time chat. Both are complementary for different use cases.

What should I do if I encounter an authentication error?

Authentication errors typically occur if the session token is invalid or expired. Run `gh auth login` again to regenerate the token. Ensure you're using a valid GitHub account and that your internet connection is stable. If the issue persists, check GitHub's status page for API outages or contact support.

Spotted something wrong with Git Hub CLI, or want to maintain it? See how to help.