gh-browse(1)

gh-browse1

Open repositories, issues, pull requests, and more in the browser

Usage

gh browse [{<number> | <path> | <commit-sha>}] [flags]

Overview

Transition from the terminal to the web browser to view and interact with:

•

Issues

•

Pull requests

•

Repository content

•

Repository home page

•

Repository settings

Options

-a, --actions

Open repository actions

--blame

Open blame view for a file

-b, --branch <string>

Select another branch by passing in the branch name

-c, --commit <string>

Select another commit by passing in the commit SHA, default is the last commit

-n, --no-browser

Print destination URL instead of opening the browser

-p, --projects

Open repository projects

-r, --releases

Open repository releases

-R, --repo <[HOST/]OWNER/REPO>

Select another repository using the [HOST/]OWNER/REPO format

-s, --settings

Open repository settings

-w, --wiki

Open repository wiki

Exit status

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

Examples

# Open the home page of the current repository
$ gh browse
# Open the script directory of the current repository
$ gh browse script/
# Open issue or pull request 217
$ gh browse 217
# Open commit page
$ gh browse 77507cd94ccafcf568f8560cfecde965fcfa63
# Open repository settings
$ gh browse --settings
# Open main.go at line 312
$ gh browse main.go:312
# Open blame view for main.go at line 312
$ gh browse main.go:312 --blame
# Open main.go with the repository at head of bug-fix branch
$ gh browse main.go --branch bug-fix
# Open main.go with the repository at commit 775007cd
$ gh browse main.go --commit=77507cd94ccafcf568f8560cfecde965fcfa63

Releases

3 releases since Debian 12 (Bookworm); the text changed 2 times.

  1. 12
  2. 13
  3. Arch

--actions since Arch Linux 2026-11-01; --blame since Arch Linux 2026-11-01; --releases since Debian 13 (Trixie); -a since Arch Linux 2026-11-01; -r since Debian 13 (Trixie).

From github-cli 2.102.1-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.