GH-REPO-LICENSE-VIEW(1) GitHub CLI manual GH-REPO-LICENSE-VIEW(1)

# [NAME](#NAME)

gh-repo-license-view - View a specific repository license

# [SYNOPSIS](#SYNOPSIS)

**gh repo license view {&lt;license-key&gt; | &lt;spdx-id&gt;} \[flags]**

# [DESCRIPTION](#DESCRIPTION)

View a specific repository license by license key or SPDX ID.

Run **gh repo license list** to see available commonly used licenses. For even more licenses, visit ⟨https://choosealicense.com/appendix⟩.

# [OPTIONS](#OPTIONS)

[**-w**, **--web**](#w)

Open https://choosealicense.com/ in the browser

# [EXIT CODES](#EXIT_CODES)

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.

# [EXAMPLE](#EXAMPLE)

```
# View the MIT license from SPDX ID
$ gh repo license view MIT
# View the MIT license from license key
$ gh repo license view mit
# View the GNU AGPL-3.0 license from SPDX ID
$ gh repo license view AGPL-3.0
# View the GNU AGPL-3.0 license from license key
$ gh repo license view agpl-3.0
# Create a LICENSE.md with the MIT license
$ gh repo license view MIT > LICENSE.md
```

# [SEE ALSO](#SEE_ALSO)

[**gh-repo-license(1)**](/man/os/gh/gh-repo-license.1)

Oct 2026

---

Document: gh-repo-license-view(1) from gh 2.103.0-r0 (Chainguard OS)
Source: https://github.com/cli/cli
