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 πŸŽ€


πŸ’€ 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 🌈


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