LinuxCommandLibrary

gh-status

Display your personal GitHub status

TLDR

Print information about all repositories you're subscribed to (issues, pull requests, reviews, mentions, activity, etc.)

$ gh status
copy

Exclude certain repositories
$ gh status [[-e|--exclude]] [repositories]
copy

Print status of repositories belonging to an organization
$ gh status [[-o|--org]] [organization]
copy

SYNOPSIS

gh status [options]
Specifically:
gh status [--jq EXPRESSION] [--json FIELDS] [-e|--exclude {prs|issues|reviews|mentions|notifications}]

PARAMETERS

-e , --exclude
    Excludes specific activity types from the status output. Multiple types can be specified by repeating the option. Accepted types include prs (pull requests), issues, reviews, mentions, and notifications.

--jq
    Filters and formats the command's JSON output using a jq expression for advanced parsing and customization.

--json
    Outputs the status in JSON format, allowing the user to specify a comma-separated list of FIELDS to include in the output.

DESCRIPTION

The gh status command provides a concise overview of your active GitHub engagements. It helps users quickly assess pending actions and important updates by displaying open pull requests where you're a reviewer or assignee, issues assigned to you, and unread notifications. Furthermore, it highlights pull requests awaiting your review and mentions across issues and pull requests. This command is an essential tool for developers to stay on top of their GitHub workflow directly from the command line, reducing the need to constantly check the web interface for updates.

CAVEATS

The gh status command requires the GitHub CLI (gh) to be installed and authenticated to a GitHub account via gh auth login. The displayed status is always based on the authenticated user's permissions and activity on GitHub. The --exclude option can be repeated multiple times to filter out various activity types.

AUTHENTICATION

Users must be logged in to a GitHub account via the gh auth login command for gh status to successfully retrieve and display personal activity data.

OUTPUT FORMATTING

Beyond the default human-readable output, gh status supports advanced output formatting options like --jq and --json. These are valuable for scripting and integrating the command's results into automated workflows, offering flexibility for parsing and displaying specific data points.

HISTORY

The gh status command is an integral part of the GitHub CLI, gh, which was officially released by GitHub in September 2020. Developed to bring GitHub's functionality to the command line, gh status emerged as a core utility to provide users with a quick summary of their pending work and notifications. Its design reflects the CLI's goal of streamlining developer workflows, allowing for efficient task management without context switching from the terminal. It has been consistently maintained and updated alongside the gh tool, evolving with new features and improvements.

SEE ALSO

gh pr status(1), gh issue status(1), gh notifications(1), gh(1)

Copied to clipboard