GH-REPO-LICENSE-VIEW(1)
π GH-REPO-LICENSE-VIEW(1) π
ok so real talk β this is a page from the GitHub CLI manual, aka gh, and it's literally about peeking at a repo license. bestie, it's giving "I just need to know if I can copy this code" energy and honestly? iconic. let's get into it π«Ά
β¨ NAME β¨
gh-repo-license-view β view a specific repository license π
πΈ SYNOPSIS πΈ
gh repo license view {<license-key> | <spdx-id>} [flags]
so you're handing it either a license key or an SPDX ID β pick one, not both, no cap. and you can tack flags on the end π
π¦ DESCRIPTION π¦
View a specific repository license by license key or SPDX ID. that's it, that's the whole vibe. β¨
Quick note though: run gh repo license list to see the available commonly used licenses β that's your starting menu, bestie. and if you want even more licenses (like, an unhinged amount), go visit https://choosealicense.com/appendix. there are so many. it's a whole thing. π
π OPTIONS π
-w,--webβ openshttps://choosealicense.com/in your browser. yes, it browser-ifies it. slay π»β¨
π EXIT CODES π
these are the numbers it bounces back at you so you know what went down:
0: successful execution β we ate, no crumbs π1: error β something went wrong, rip π2: command canceled β you (or the universe) hit the brakes π4: authentication required β you gotta log in first, bestie π
NOTE: specific commands may have additional exit codes. refer to the command's help for more information β like, some of them have extra lore, iykyk.
π₯ EXAMPLE π₯
the examples are genuinely so clean, look:
# 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
notice how MIT and mit both work?? uppercase, lowercase, doesn't matter β it's not picky, it's chill, it's main character energy for real. and that last one? redirecting into LICENSE.md? that's the move. that's the whole move. β
π SEE ALSO π
gh-repo-license(1)β the parent page, go check it out π§
okay that's the page!! mwah π this was GitHub CLI v2.102.0, dated Oct 2026 β catch you on the next manpage, bestie, stay licensed and stay hydrated ππ
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms