usage

GitHub CLI 2.98.0

Tools and page contents
On this page

New 17

01

gh pr checkout adds --worktree to check out PRs into parallel copies

While coding mid-task, a teammate asks you to test someone's PR (pull request). ⟦It is like photocopying a reference book in a library to read at another table without clearing your existing desk notes.⟧ That is the moment to run gh pr checkout 123 --worktree. Passing the --worktree flag creates an independent worktree, Git's feature for parallel working copies. You can inspect and test the changes in a separate folder while your current branch and files stay undisturbed.

Original changelog

Add --worktree flag to gh pr checkout by @tidy-dev in https://github.com/cli/cli/pull/13946

02

gh search issues adds --search-type for semantic and hybrid search

When searching for issues in a repository, you used to rely strictly on exact keyword matches. ⟦It is like finding a song from a rough hummed melody, then giving the song finder both that melody and a remembered lyric fragment when you have one.⟧ gh search issues now introduces the --search-type flag, supporting both semantic and hybrid search modes. If you cannot remember the exact error text, pass --search-type semantic with a natural concept description to find relevant issues by meaning; using --search-type hybrid combines traditional keyword matching with semantic understanding.

Original changelog

Add --search-type flag for semantic and hybrid issue search by @michaeljacholke in https://github.com/cli/cli/pull/14006

@michaeljacholke made their first contribution in https://github.com/cli/cli/pull/14006

03

gh sets GH_EXTENSION=1 when executing extensions

When writing or running a GitHub CLI extension (an add-on tool that introduces custom commands to gh), the program often needs to know how it was started. ⟦It is like an employee wearing a company badge into the building so security immediately recognizes they were dispatched by the internal system rather than entering unannounced.⟧ When gh invokes any extension, it now automatically sets the environment variable GH_EXTENSION=1. Extensions can check this variable to confirm they are running under gh and adjust their output formatting or behavior accordingly.

Original changelog

Set GH_EXTENSION=1 when gh invokes an extension by @williammartin in https://github.com/cli/cli/pull/14072

04

gh release create trims whitespace while parsing permission scopes

When creating a release, gh release create reads permission scopes from the X-Oauth-Scopes header. Its parser now strips extra surrounding whitespace so that whitespace is not treated as part of a scope name. ⟦It is like erasing stray spaces beside names on a roster so one person is not mistaken for another.⟧

Original changelog

Trim spaces when parsing X-Oauth-Scopes in gh release create by @williammartin in https://github.com/cli/cli/pull/14065

05

Seven API request flows routed through unified api.Client

Your existing GitHub CLI commands remain the same despite an internal API architecture refactor. ⟦It is like a building replacing separate external phone lines in every office with a centralized switchboard, keeping wiring tidy and maintainable.⟧ The team routed HTTP requests for seven operations through the unified api.Client (the shared client module managing connections and authentication). This covers deploy keys, ssh keys, gpg keys, autolinks, extensions, release creation, and release deletions. Routing these calls through a single client keeps network logic clean and consistent across the codebase.

Original changelog

Route deploy key requests through api.Client by @williammartin in https://github.com/cli/cli/pull/13989

Route ssh key requests through api.Client by @williammartin in https://github.com/cli/cli/pull/13994

Route gpg key requests through api.Client by @williammartin in https://github.com/cli/cli/pull/13997

Route autolink requests through api.Client by @williammartin in https://github.com/cli/cli/pull/14013

Route extension requests through api.Client by @williammartin in https://github.com/cli/cli/pull/14059

Route release creation through api.Client by @williammartin in https://github.com/cli/cli/pull/14062

Route release deletions through api.Client by @williammartin in https://github.com/cli/cli/pull/14077

06

Spam triage moved into the agentic workflow with automatic closure restored

The project folded spam-issue triage into the agentic issue-triage workflow and restored automatic closure of spam issues. Compatibility for the Action that runs triage is fixed too. ⟦It is like placing a junk-mail filter inside the existing mail flow: identified flyers go straight to filing instead of being handed to an incompatible second sorter.⟧

Original changelog

Collapse spam triage into the agentic issue-triage workflow by @williammartin in https://github.com/cli/cli/pull/14027

Restore automatic spam issue closure by @williammartin in https://github.com/cli/cli/pull/14088

Fix issue triage action compatibility [skip changelog] by @tidy-dev in https://github.com/cli/cli/pull/14207

07

PR reviews now require explicit ownership

After a PR (pull request) is submitted, review work now requires an explicitly named owner. Every pending change should have a person responsible for taking it up. ⟦It is like attaching a specific owner's name tag to a task card on the board so work does not sit unassigned in the queue.⟧

Original changelog

Require explicit PR review ownership by @williammartin in https://github.com/cli/cli/pull/14028

08

Dependabot triage runs hourly and checks code reachability

Dependabot (the bot that checks dependency updates) triage now runs every hour. Its comments are shorter, its decisions are cheaper and more decisive, and it now performs a real code-reachability check: whether a code path can actually reach a vulnerability. ⟦Rather than merely spotting a broken door on a building plan, it follows the corridor to see whether that door can really be reached.⟧

Original changelog

Slim down dependabot triage comments by @williammartin in https://github.com/cli/cli/pull/14019

Run Dependabot triage every hour by @sergiou87 in https://github.com/cli/cli/pull/14030

Make Dependabot triage cheaper and more decisive by @williammartin in https://github.com/cli/cli/pull/14079

Give Dependabot triage a real reachability check by @williammartin in https://github.com/cli/cli/pull/14087

@sergiou87 made their first contribution in https://github.com/cli/cli/pull/14030

09

AI agents instructed to use PR template and clarified testing section requirements

When an AI agent prepares to submit a PR (pull request), AGENTS.md now directs it to follow the standard pull request template. The guidelines also clarify what belongs in the PR template's testing section, defining which verification details must be recorded. ⟦It is like filling out a standardized handover report with clear instructions on which checklist items to log in the verification section.⟧ These updates give agents clear rules for submitting changes so reviewers can quickly assess test coverage.

Original changelog

Tell agents to use the PR template in AGENTS.md by @williammartin in https://github.com/cli/cli/pull/14074

Clarify what belongs in the PR template's testing section by @williammartin in https://github.com/cli/cli/pull/14103

10

Added scheduled tech debt burndown skill for periodic maintenance

As a repository grows, it often accumulates lingering TODOs, outdated configurations, or disorganized code structures that developers rarely have dedicated time to clean up. The project now introduces a scheduled tech debt burndown skill for AI agents. Once configured with a schedule, the agent automatically triggers on a recurring interval to inspect the codebase and clean up technical debt. ⟦It is like putting a regular deep-cleaning schedule on the building calendar to clear out accumulated clutter from the storage room before it piles up.⟧ Standardizing and scheduling these cleanups helps teams keep the repository tidy and maintainable over time.

Original changelog

Add a scheduled tech debt burndown skill by @williammartin in https://github.com/cli/cli/pull/14095

11

Renamed cli-code-reviewer skill to code-review

The repository renamed the cli-code-reviewer skill to the simpler and more concise code-review. Dropping the verbose prefix makes the skill name more intuitive and easier to recognize when invoking agent capabilities. ⟦It is like replacing a wordy "Internal Document Reviewer Room" sign on an office door with a clean, straightforward "Review Room" plaque.⟧ This update changes only the identifier, leaving the underlying review functionality unchanged.

Original changelog

Rename cli-code-reviewer skill to code-review by @BagToad in https://github.com/cli/cli/pull/14116

12

Linux APT repository now uses dual-key signing

The Linux APT repository is now signed with both keys simultaneously. In CI (continuous integration, an automated checking process), the team briefly added a temporary step to verify the repository signing keys, then promptly reverted that check after confirming the setup. The update focuses strictly on the dual-key signing and cleaning up the temporary verification step. ⟦It is like stamping an official document with two separate seals for dual verification, while an inspection checkpoint is briefly set up to verify the stamps before being removed.⟧

Original changelog

ci: add temporary step to verify Linux repo signing keys by @babakks in https://github.com/cli/cli/pull/14202

Revert "ci: add temporary step to verify Linux repo signing keys" by @babakks in https://github.com/cli/cli/pull/14203

chore: sign APT repository with both keys by @babakks in https://github.com/cli/cli/pull/13271

13

Tests no longer read local authentication or Git configuration

When you run tests on your own machine, its authentication and Git configuration can differ from someone else's and leak personal-environment details into the run. This change isolates tests from both kinds of local data, so they no longer read local authentication or Git configuration. ⟦It is like placing samples on a dedicated clean workbench, allowing in only the materials for the experiment rather than anything in the researcher's pockets.⟧ Your credentials and Git settings are not being replaced; the tests simply no longer depend on them.

Original changelog

Isolate tests from local machine's auth and git configuration by @BagToad in https://github.com/cli/cli/pull/14128

14

Deployment validation accepts pre-release tags

When a deployment flow validates a version tag, it now accepts a pre-release tag, a tag for a version before formal release. Deployment validation therefore treats that tag type as acceptable input. ⟦It is like an event entrance validating tickets for a trial-run session as well as tickets for the formal opening, letting both through the gate.⟧ The change is limited to which tags deployment validation accepts, so a deployment using a pre-release tag is not stopped at that check.

Original changelog

Accept pre-release tags in deployment validation by @BagToad in https://github.com/cli/cli/pull/14193

15

Replaced deprecated reflect.Ptr with reflect.Pointer

Code now replaces deprecated reflect.Ptr with reflect.Pointer, completing an API (application programming interface, a fixed way for programs to call a capability) substitution. This does not add a second way to make the call; it changes the outdated name that the code used to the current one. ⟦It is like swapping an old-standard adapter for one that meets the current standard while using the same connection point.⟧ When reading the relevant code, reflect.Pointer is the API used after this replacement.

Original changelog

Use reflect.Pointer instead of deprecated reflect.Ptr by @williammartin in https://github.com/cli/cli/pull/14098

16

Feature detection no longer requests cleanup comments when unneeded

When feature detection (checking whether a capability is available) needs no cleanup, it no longer requests a cleanup comment. Whether cleanup is needed now forms the boundary for asking for that comment: a corresponding comment can be left where cleanup is needed, but an item needing none is not asked for one. ⟦It is like attaching a reminder to a work order only when follow-up work really remains; an item with nothing to finish gets no extra reminder slip.⟧ The change removes an unneeded request so that the request for a comment matches the actual need for cleanup.

Original changelog

Don't ask for feature detection cleanup comments when not needed by @babakks in https://github.com/cli/cli/pull/14139

17

Build tools and dependencies upgraded; Dependabot gains an aw-actions group

Dependabot configuration now includes an aw-actions group, while aw-actions, codeql-actions, sigstore-go, gRPC, go-containerregistry, actions/attest, azure/login, goldmark, protobuf, testify, x/crypto, lipgloss, and a compression library were updated. Go moved through 1.26.6 to 1.26.7, CI's golangci-lint reached v2.12.2, gh-aw workflows reached v0.85.4, and gh-aw-actions reached v0.87.1 with agentic workflows recompiled. ⟦It is like replacing parts from a maintenance list while updating the automatic replenishment rule and already assembled work orders too.⟧

Original changelog

Add aw-actions group to dependabot configuration by @babakks in https://github.com/cli/cli/pull/14123

chore(deps): bump github.com/sigstore/sigstore-go from 1.2.2 to 1.3.0 by @dependabot[bot] in https://github.com/cli/cli/pull/14047

chore(deps): bump the codeql-actions group across 1 directory with 3 updates by @dependabot[bot] in https://github.com/cli/cli/pull/14049

chore(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.0 by @dependabot[bot] in https://github.com/cli/cli/pull/14048

chore(deps): bump github.com/google/go-containerregistry from 0.21.7 to 0.21.8 by @dependabot[bot] in https://github.com/cli/cli/pull/14066

chore(deps): bump actions/attest from 4.2.1 to 4.2.2 by @dependabot[bot] in https://github.com/cli/cli/pull/14100

chore(deps): bump azure/login from 3.0.0 to 3.0.1 by @dependabot[bot] in https://github.com/cli/cli/pull/14101

chore(deps): bump the codeql-actions group across 1 directory with 3 updates by @dependabot[bot] in https://github.com/cli/cli/pull/14091

chore(deps): bump github/gh-aw-actions/setup-cli from 0.83.4 to 0.85.4 by @dependabot[bot] in https://github.com/cli/cli/pull/14068

chore(deps): bump github.com/google/go-containerregistry from 0.21.8 to 0.21.9 by @dependabot[bot] in https://github.com/cli/cli/pull/14119

chore(deps): bump github.com/klauspost/compress from 1.19.1 to 1.19.2 by @dependabot[bot] in https://github.com/cli/cli/pull/14120

chore(deps): bump the aw-actions group with 2 updates by @dependabot[bot] in https://github.com/cli/cli/pull/14147

chore(deps): bump github.com/yuin/goldmark from 1.8.4 to 1.8.5 by @dependabot[bot] in https://github.com/cli/cli/pull/14029

chore(deps): bump actions/attest from 4.2.0 to 4.2.1 by @dependabot[bot] in https://github.com/cli/cli/pull/14050

Bump golangci-lint in CI to v2.12.2 by @williammartin in https://github.com/cli/cli/pull/14102

chore(deps): bump the aw-actions group with 2 updates by @dependabot[bot] in https://github.com/cli/cli/pull/14124

chore(deps): bump google.golang.org/protobuf from 1.36.11 to 1.36.12 by @dependabot[bot] in https://github.com/cli/cli/pull/14140

Upgrade gh-aw workflows to v0.85.4 by @tidy-dev in https://github.com/cli/cli/pull/14141

Bump Go to 1.26.6 by @github-actions[bot] in https://github.com/cli/cli/pull/14143

chore: bump go to 1.26.7 by @babakks in https://github.com/cli/cli/pull/14205

chore(deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.1 by @dependabot[bot] in https://github.com/cli/cli/pull/14204

chore(deps): bump the codeql-actions group across 1 directory with 3 updates by @dependabot[bot] in https://github.com/cli/cli/pull/14169

chore(deps): bump golang.org/x/crypto from 0.54.0 to 0.55.0 by @dependabot[bot] in https://github.com/cli/cli/pull/14164

chore(deps): bump charm.land/lipgloss/v2 from 2.0.5 to 2.0.6 by @dependabot[bot] in https://github.com/cli/cli/pull/14166

Bump gh-aw-actions to v0.87.1 and recompile agentic workflows by @BagToad in https://github.com/cli/cli/pull/14210

Fixed 2

18

Fixed RESTWithNext error type to restore gh status and attestation retries

When gh status hits a retryable failure, the RESTWithNext error-type handling had prevented retries. That is fixed: both gh status and attestations (digital signatures that verify a software artifact's origin and build process) can retry again. ⟦It is like a filing desk returning a form with a faulty receipt to the processing queue instead of rejecting the whole submission.⟧

Original changelog

Fix RESTWithNext error type, repairing gh status and attestation retries by @williammartin in https://github.com/cli/cli/pull/13988

19

Fixed gh project item-add output outside a TTY

When gh project item-add runs in a script or pipeline, it has no interactive terminal, meaning it is outside a TTY (a terminal screen that accepts interaction). Its output in that case is fixed, so the command emits the correct output in non-interactive environments. ⟦It is like a shipping form that skips the service-desk screen and enters an automated sorting line while still printing the correct machine-readable label.⟧

Original changelog

Fix project item-add output for non-TTY by @zwick in https://github.com/cli/cli/pull/14056