GitHub CLI 2.0 introduces extensions

GitHub CLI extensions allow developers to customize the functionality of the command line tool and share custom commands with other users.

GitHub CLI 2.0 introduces extensions


GitHub has launched GitHub CLI 2.0, a new version of its command line tool that allows developers to create extensions, or custom commands that build on CLI functionality.

The open source tool, which brings GitHub to a terminal, can be installed from

With GitHub CLI 2.0, unveiled August 24, extensions are just repositories prefixed with gh- that contain an executable file such as a Bash script. GitHub has built tools into GitHub CLI such as gh extension create, which provides a scaffolded repository with pre-written Bash.

To help developers get started, the GitHub team built a few extensions ranging from GitHub-focused utilities like gh contribute, for working on an open source project, to terminal-focused tools like gh screensaver. Other GitHub CLI extensions include:

  • gh user-status, to quickly set GitHub user status from the terminal to let others know of availability or if the user is in focus mode.
  • gh branch, a fuzzy finder branch switcher that orders branches by recency and displays information about associated pull requests.
  • gh triage, which takes GitHub’s process to triage issues in its open source repo and makes it more broadly usable.

Developers can discuss the extensions they build via a GitHub discussion thread. GitHub CLI 1.0 was released last September. The tool is intended to provide a seamless developer experience, leveraging features such as GitHub Actions to automate workflows.

Paul Krill is an editor at large at InfoWorld, whose coverage focuses on application development.

Copyright © 2021 IDG Communications, Inc.