Skip to main content
GitHub CLI
$ cat ./github-cli.md

GitHub CLI

GitHub CLI is an official command-line interface that brings GitHub functionality directly to your terminal, enabling seamless interaction with GitHub repositories without leaving your development environment. The tool provides comprehensive repository management capabilities including creating, cloning, and forking repositories, managing pull requests and issues, and handling GitHub Actions workflows. Key features include authentication management, repository browsing, release creation, and collaboration tools for code review and project management. Developers can streamline their Git workflows by performing complex GitHub operations through intuitive commands, reducing context switching between terminal and browser. GitHub CLI supports scripting and automation, making it ideal for CI/CD pipelines, bulk operations, and integrating GitHub functionality into custom development workflows.

47,242 stars 9,461 forks Go MIT License
cli 1613 Dec 23, 2025
Login with GitHub to like and favorite this CLI tool
$ git release --latest

Latest Releases

All releases

Security Seven security vulnerabilities have been identified and fixed in this release. Users are advised to update gh to version v2.106.0 as soon as possible. 1. The terminal escape-sequence check used by gh repo read-file, gh api, and other commands did not recognize C1 control characters, allowing untrusted output to reach a terminal without neutralization. See https://github.com/cli/cli/security/advisories/GHSA-45h6-2fh4-pr93 for more information. 2. Verbose and API-debug HTTP logging could print untrusted terminal control characters from request and response data. See https://github.com/cli/cli/security/advisories/GHSA-4946-22jg-pg7m for more information. 3. gh codespace ports could print untrusted terminal control characters from port labels. See https://github.com/cli/cli/security/advisories/GHSA-5v78-vjjq-j2fj for more information. 4. gh agent-task view --log could print untrusted terminal control characters from tool-call names and arguments. See https://github.com/cli/cli/security/advisories/GHSA-3j6c-526c-w465 for more information. 5. gh skill update could install a skill from a different repository that reused the installed skill's name. See https://github.com/cli/cli/security/advisories/GHSA-q2rq-2r2v-2jm5 for more information. 6. gh skill install and gh skill search could print untrusted terminal control characters from remote skill text. See https://github.com/cli/cli/security/advisories/GHSA-mjfw-qpmw-c8p9 for more information. 7. gh codespace jupyter could expose localhost cookies and local development services when connecting to a malicious Codespace. See https://github.com/cli/cli/security/advisories/GHSA-mrhx-xw2w-4289 for more information. Improved authentication security on logout gh auth logout now revokes the selected account's GitHub CLI OAuth token before removing local credentials. Use --no-revoke to preserve the legacy local-only logout, leaving the token valid. gh now also removes saved HTTPS credentials for the host from Git credential helpers. Make expiring tokens more reliable On GitHub Enterprise Server before 3.23, requests for expiring credentials now fall back to a non-expiring token with a warning instead of failing with invalidscope. This applies to gh auth login, gh auth refresh, and the expiringcredentials setting. What's Changed โœจ Features
  • Revoke GitHub CLI OAuth tokens during gh auth logout by @BagToad in [#15100](https://github.com/cli/cli/pull/15100)
๐Ÿ› Fixes
  • fix(run view): preserve log output after lines longer than 64 KiB by @babakks in [#15065](https://github.com/cli/cli/pull/15065)
  • fix(auth): fall back to non-expiring tokens on GitHub Enterprise Server before 3.23 by @BagToad in [#15109](https://github.com/cli/cli/pull/15109)
  • fix(auth): clear saved HTTPS Git helper credentials during logout by @BagToad and @babakks in [#15152](https://github.com/cli/cli/pull/15152)
  • fix(auth): keep a valid credential refreshed by another process after refresh rejection by @babakks in [#15159](https://github.com/cli/cli/pull/15159)
๐Ÿ“š Docs & Chores
  • Document that GitHub Event Streams may deliver events more than once by @babakks in [#15094](https://github.com/cli/cli/pull/15094)
  • Patch vulnerable cli-exercise runtime dependencies by @babakks in [#15068](https://github.com/cli/cli/pull/15068)
  • Add a bug readiness assessment skill by @tidy-dev in [#15149](https://github.com/cli/cli/pull/15149)
:dependabot: Dependencies
  • chore(deps): bump charm.land/lipgloss/v2 from 2.1.0 to 2.1.1 by @dependabot in [#15095](https://github.com/cli/cli/pull/15095)
  • chore(deps): bump actions/setup-go from 7.0.0 to 7.1.0 by @dependabot in [#15117](https://github.com/cli/cli/pull/15117)
  • chore(deps): bump github.com/klauspost/compress from 1.20.4 to 1.20.5 by @dependabot in [#15140](https://github.com/cli/cli/pull/15140)
  • chore(deps): bump the codeql-actions group from 4.39.3 to 4.39.4 by @dependabot in [#15142](https://github.com/cli/cli/pull/15142)
  • chore(deps): bump actions/create-github-app-token from 3.3.0 to 3.4.0 by @dependabot in [#15143](https://github.com/cli/cli/pull/15143)
  • chore(deps): bump charm.land/bubbles/v2 from 2.2.1 to 2.2.2 by @dependabot in [#15144](https://github.com/cli/cli/pull/15144)
  • chore(deps): bump charm.land/bubbletea/v2 from 2.1.1 to 2.1.2 by @dependabot in [#15141](https://github.com/cli/cli/pull/15141)
  • chore(deps): bump github.com/charmbracelet/x/ansi from 0.11.9 to 0.11.10 by @dependabot in [#15145](https://github.com/cli/cli/pull/15145)
  • chore(deps): bump github.com/gorilla/websocket from 1.5.3 to 1.5.4-0.20240701034025-d67f41855da4 by @BagToad in [#15157](https://github.com/cli/cli/pull/15157)
Full Changelog: https://github.com/cli/cli/compare/v2.105.0...v2.106.0

What's Changed Subscribe to GitHub Event Streams with gh event (preview) The new gh event command set lets agents, integrations, and scripts wait for pull request changes instead of polling GitHub: ``shell Wait for a review event gh event listen --resource https://github.com/OWNER/REPO/pull/NUMBER --event com.github.pull_request.review.submitted.v1 --timeout 30m Wait for a check suite completion event gh event listen --resource https://github.com/OWNER/REPO/pull/NUMBER --event com.github.pullrequest.checksuite.status.changed.v1 --jq .data.conclusion List active event subscriptions gh event subscription list ` By default, gh event listen exits after the first event. Use --count to wait for several events or --follow to keep listening. Events are printed as CloudEvent JSON objects, with data.api_url pointing to the resource that changed. Supported events include submitted reviews, pull request state and head changes, merge conflicts, and completed check suites. The subscription create, list, view, and delete commands manage subscriptions directly. > [!NOTE] > GitHub Event Streams is in preview. [Join the wait list](https://gh.io/event-streams-signup), read the [announcement](https://github.blog/changelog/2026-11-17-github-event-streams-is-now-in-preview), or see the [Event Streams documentation](https://docs.github.com/en/integrations/how-tos/using-github-event-streams). What's Changed โœจ Features
  • Add a server-sent events reader and Event Subscriptions API client by @babakks in [#15071](https://github.com/cli/cli/pull/15071)
  • Add gh event listen to wait for pull request events without polling by @babakks in [#15072](https://github.com/cli/cli/pull/15072)
  • Add gh event subscription list by @babakks in [#15073](https://github.com/cli/cli/pull/15073)
  • Add gh event subscription create by @babakks in [#15074](https://github.com/cli/cli/pull/15074)
  • Add gh event subscription view by @babakks in [#15075](https://github.com/cli/cli/pull/15075)
  • Add gh event subscription delete by @babakks in [#15076](https://github.com/cli/cli/pull/15076)
  • Suggest gh event listen to agents using gh pr and gh api by @babakks in [#15077](https://github.com/cli/cli/pull/15077)
  • Support check suite events and suggest them from gh run view and gh run watch by @babakks in [#15081](https://github.com/cli/cli/pull/15081)
๐Ÿ› Fixes
  • fix(event listen): print each event without waiting for the next heartbeat by @babakks and @iancanderson in [#15079](https://github.com/cli/cli/pull/15079)
  • fix(event listen): report deleted subscriptions clearly by @babakks in [#15080](https://github.com/cli/cli/pull/15080)
  • fix(event): improve stream framing, Retry-After handling, evals, and regression coverage by @babakks in [#15083](https://github.com/cli/cli/pull/15083)
๐Ÿ“š Docs & Chores
  • Make issue-triage formatting checks nonblocking by @BagToad in [#15052](https://github.com/cli/cli/pull/15052)
  • Add event-driven agent evals, gh skill guidance, and preview documentation by @babakks in [#15078](https://github.com/cli/cli/pull/15078)
:dependabot: Dependencies
  • chore(deps): bump golang.org/x/text from 0.43.0 to 0.44.0 by @dependabot in [#15049](https://github.com/cli/cli/pull/15049)
  • chore(deps): bump golang.org/x/term from 0.47.0 to 0.48.0 by @dependabot in [#15048](https://github.com/cli/cli/pull/15048)
  • chore(deps): bump golang.org/x/crypto from 0.58.0 to 0.59.0 by @dependabot in [#15064](https://github.com/cli/cli/pull/15064)
  • chore(deps): bump zod from 4.3.6 to 4.6.6 in evals by @dependabot in [#15086](https://github.com/cli/cli/pull/15086)
  • chore(deps): bump @hono/node-server from 2.1.5 to 2.1.9 in evals by @dependabot in [#15085](https://github.com/cli/cli/pull/15085)
  • chore(deps): bump hono from 4.13.13 to 4.13.19 in evals` by @dependabot in [#15084](https://github.com/cli/cli/pull/15084)
Full Changelog: https://github.com/cli/cli/compare/v2.104.0...v2.105.0

Protect private forks when deleting repositories gh repo delete now warns when deleting a private or internal repository will also delete its forks. The additional confirmation is required even with --yes. Non-interactive workflows and agents must explicitly accept the cascading deletion: ``shell gh repo delete OWNER/REPO --yes --accept-cascading-deletion-of-private-forks ` What's Changed โœจ Features
  • Require confirmation before gh repo delete deletes private forks by @BagToad in [#14858](https://github.com/cli/cli/pull/14858)
๐Ÿ› Fixes
  • fix(auth status): surface underlying rate-limit, server, and network errors in terminal output by @babakks and @Copilot in [#15009](https://github.com/cli/cli/pull/15009)
  • fix(auth): skip token refresh when gh's state directory is not writable by @babakks in [#14845](https://github.com/cli/cli/pull/14845)
๐Ÿ“š Docs & Chores
  • Use REST to apply issue triage labels by @BagToad in [#15041](https://github.com/cli/cli/pull/15041)
  • Prevent repeated Dependabot triage assessments by @BagToad in [#15002](https://github.com/cli/cli/pull/15002)
  • Apply issue triage labels directly by @BagToad in [#15001](https://github.com/cli/cli/pull/15001)
  • Provide verified build versions to issue triage by @BagToad in [#15000](https://github.com/cli/cli/pull/15000)
  • Use a synthetic namespace for triage fixtures by @BagToad in [#14976](https://github.com/cli/cli/pull/14976)
  • Remove the accidental issue-triage model pin by @BagToad in [#14972](https://github.com/cli/cli/pull/14972)
  • Add a fake GitHub API runner for reproductions by @BagToad in [#14951](https://github.com/cli/cli/pull/14951)
  • Clarify which hosts use GHENTERPRISETOKEN by @BagToad in [#14918](https://github.com/cli/cli/pull/14918)
  • Regenerate triage workflows with gh-aw v1.0.1 by @tidy-dev in [#14910](https://github.com/cli/cli/pull/14910)
  • Test the ShowRefs option separator by @BagToad in [#14879](https://github.com/cli/cli/pull/14879)
  • Fix local extension-install test path normalization by @bobrik in [#14854](https://github.com/cli/cli/pull/14854)
  • Save Go caches only from trunk by @williammartin in [#14840](https://github.com/cli/cli/pull/14840)
  • Add a private vulnerability report form by @BagToad in [#14825](https://github.com/cli/cli/pull/14825)
  • Replace msgpack with a minimal node ID encoder by @tj-smith47 in [#14801](https://github.com/cli/cli/pull/14801)
  • Test the Git client with real repositories by @williammartin in [#14348](https://github.com/cli/cli/pull/14348)
:dependabot: Dependencies
  • chore(deps): bump github.com/klauspost/compress from 1.20.3 to 1.20.4 by @dependabot in [#15040](https://github.com/cli/cli/pull/15040)
  • chore(deps): bump charm.land/lipgloss/v2 from 2.0.6 to 2.1.0 by @dependabot in [#15039](https://github.com/cli/cli/pull/15039)
  • chore(deps): bump Go toolchain from 1.27.3 to 1.27.4 by @github-actions[bot] in [#15028](https://github.com/cli/cli/pull/15028)
  • chore(deps): bump golang.org/x/sys from 0.49.0 to 0.50.0 by @dependabot in [#15010](https://github.com/cli/cli/pull/15010)
  • chore(deps): bump golang.org/x/sync from 0.24.0 to 0.25.0 by @dependabot in [#14998](https://github.com/cli/cli/pull/14998)
  • chore(deps): bump the codeql-actions group across 1 directory with 3 updates by @dependabot in [#14964](https://github.com/cli/cli/pull/14964)
  • chore(deps): bump github.com/spf13/pflag from 1.0.10 to 1.1.0 by @dependabot in [#14963](https://github.com/cli/cli/pull/14963)
  • chore(deps): bump github.com/yuin/goldmark from 1.8.6 to 1.8.7 by @dependabot in [#14907](https://github.com/cli/cli/pull/14907)
  • chore(deps): bump charm.land/bubbletea/v2 from 2.1.0 to 2.1.1 by @dependabot in [#14906](https://github.com/cli/cli/pull/14906)
  • chore(deps): bump github.com/sigstore/sigstore-go from 1.3.0 to 1.4.0 by @dependabot in [#14905](https://github.com/cli/cli/pull/14905)
  • chore(deps): bump google.golang.org/grpc from 1.84.0 to 1.85.0 by @dependabot in [#14878](https://github.com/cli/cli/pull/14878)
  • chore(deps): bump the codeql-actions` group with 3 updates by @dependabot in [#14824](https://github.com/cli/cli/pull/14824)
New Contributors
  • @tj-smith47 made their first contribution in https://github.com/cli/cli/pull/14801
  • @bobrik made their first contribution in https://github.com/cli/cli/pull/14854
Full Changelog: https://github.com/cli/cli/compare/v2.103.3...v2.104.0

What's Changed ๐Ÿ› Fixes
  • fix(gh auth status): explain expired expiring tokens with --no-refresh by @babakks in [#14815](https://github.com/cli/cli/pull/14815)
Full Changelog: https://github.com/cli/cli/compare/v2.103.2...v2.103.3

๐Ÿ› Fixes
  • Allow server to arbitrate which GitHub App installation tokens can attach files by @martinajir in [#14804](https://github.com/cli/cli/pull/14804)
  • Defer --attach credential checks to the upload endpoint by @BagToad in [#14805](https://github.com/cli/cli/pull/14805)
New Contributors
  • @martinajir made their first contribution in https://github.com/cli/cli/pull/14804
Full Changelog: https://github.com/cli/cli/compare/v2.103.1...v2.103.2

Installation

brew install gh
$ tail ./comments.log

Comments (0)

Login with GitHub to post a comment
No comments yet. Be the first to comment!