gh repo license view

gh repo license view {<license-key> | <SPDX-ID>} [flags]

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

-w, --web
Open https://choosealicense.com/ in the browser

Examples

# 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