gh-license

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 1 Imported by: 0

README

gh-license

A GitHub CLI extension to view and generate license files.

All license information is obtained from the GitHub API (https://docs.github.com/en/rest/licenses).

NOTE: The only purpose the CLI serves, is to save you the effort of opening up a browser to copy-&-paste the appropriate LICENSE text. It does NOT provide legal advice and you should still double-check the LICENSE yourself for any errors.


📦 Installation

Requirements
gh extension install Shresht7/gh-license

💻 Usage

Invoke the cli extension like so:

gh license <command>

For example, to generate a license file:

gh license create mit

Usage Demonstration

⌨️ Commands

create

Create a license file

Alias

new, add, init, set

Usage
gh-license create [flags]
Flags
Flag Type Description Default
--author, -a string Author of the project [AuthorName]
--description, -d string Project description
--output, -o string Filepath LICENSE
--project, -p string Project name [RepositoryName]
--web, -w bool Create license file using the web interface false
--year, -y string Year [CurrentYear]
Examples
  gh-license create mit
  gh-license create mit --author Shresht7 --year 2023
  gh-license create --web
  gh-license create mit --web
list

Show a list of licenses

Usage
gh-license list [flags]
Flags
Flag Type Description Default
--json, -j bool Output in JSON format false
--pretty-json, -p bool Output in pretty JSON format false
--web, -w bool Open the license in the browser false
Examples
  gh-license list
  gh-license list --json
  gh-license list --pretty-json
repo

View license of a repository

Alias

r

Usage
gh-license repo [flags]
Flags
Flag Type Description Default
--json, -j bool Print the license in JSON format false
--pretty-json, -p bool Print the license in pretty JSON format false
--web, -w bool Open the license in the browser false
Examples
  gh license repo
  gh license repo Shresht7/gh-license
  gh license repo gh-license
  gh license repo --json
  gh license repo Shresht7/gh-license --pretty-json
view

View details about a particular license

Alias

show, get

Usage
gh-license view [flags]
Flags
Flag Type Description Default
--json, -j bool Print the license details in JSON format false
--pretty-json, -p bool Print the license details in pretty JSON format false
--web, -w bool Open the license in the browser false
Examples
  gh-license view mit
  gh-license view mit --json
  gh-license view mit --pretty-json

📜 License

This software is licensed under the MIT License. See the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
docs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL