{"id":17001635,"url":"https://github.com/shresht7/gh-license","last_synced_at":"2025-04-12T06:31:14.928Z","repository":{"id":40708318,"uuid":"453638956","full_name":"Shresht7/gh-license","owner":"Shresht7","description":"A GitHub CLI extension to view and generate license files 📄","archived":false,"fork":false,"pushed_at":"2024-10-01T16:50:55.000Z","size":255,"stargazers_count":10,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T01:51:11.907Z","etag":null,"topics":["cli","gh-extension","license"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shresht7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-30T09:37:00.000Z","updated_at":"2025-03-13T15:11:43.000Z","dependencies_parsed_at":"2024-06-20T00:24:34.430Z","dependency_job_id":null,"html_url":"https://github.com/Shresht7/gh-license","commit_stats":{"total_commits":82,"total_committers":2,"mean_commits":41.0,"dds":0.04878048780487809,"last_synced_commit":"0a487b3554a1fd9c2bb4e3d22c0b76ee7b9f18d9"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fgh-license","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fgh-license/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fgh-license/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fgh-license/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shresht7","download_url":"https://codeload.github.com/Shresht7/gh-license/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248529435,"owners_count":21119508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","gh-extension","license"],"created_at":"2024-10-14T04:25:37.939Z","updated_at":"2025-04-12T06:31:09.872Z","avatar_url":"https://github.com/Shresht7.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `gh-license`\n\nA GitHub CLI extension to view and generate license files.\n\nAll license information is obtained from the GitHub API (https://docs.github.com/en/rest/licenses).\n\n\u003e **NOTE**: The only purpose the CLI serves, is to save you the effort of opening up a browser to copy-\u0026-paste the appropriate LICENSE text. It does NOT provide legal advice and you should still double-check the LICENSE yourself for any errors.\n\n---\n\n## 📦 Installation\n\n### Requirements\n\n- [GitHub CLI](https://cli.github.com/)\n\n```sh\ngh extension install Shresht7/gh-license\n```\n\n---\n\n## 💻 Usage\n\nInvoke the cli extension like so:\n\n```sh\ngh license \u003ccommand\u003e\n```\n\nFor example, to generate a license file:\n\n```sh\ngh license create mit\n```\n\n![Usage Demonstration](docs/demo.gif)\n\n\u003cdiv align=\"right\"\u003e\n\n[⬆️ Back to top][top]\n\n\u003c/div\u003e\n\n## ⌨️ Commands\n\n\n### `create`\n\nCreate a license file\n\n#### Alias\n\n`new`, `add`, `init`, `set`\n\n#### Usage\n\n```sh\ngh-license create [flags]\n```\n\n#### Flags\n\n| Flag                | Type     | Description                                 | Default          |\n| ------------------- | -------- | ------------------------------------------- | ---------------- |\n| `--author, -a`      | `string` | Author of the project                       | [AuthorName]     |\n| `--description, -d` | `string` | Project description                         |                  |\n| `--output, -o`      | `string` | Filepath                                    | LICENSE          |\n| `--project, -p`     | `string` | Project name                                | [RepositoryName] |\n| `--web, -w`         | `bool`   | Create license file using the web interface | false            |\n| `--year, -y`        | `string` | Year                                        | [CurrentYear]    |\n\n#### Examples\n\n```sh\n  gh-license create mit\n  gh-license create mit --author Shresht7 --year 2023\n  gh-license create --web\n  gh-license create mit --web\n```\n\n\u003cdiv align=\"right\"\u003e\n\n[⬆️ Back to top][top]\n\n\u003c/div\u003e\n\n\n### `list`\n\nShow a list of licenses\n\n\n\n#### Usage\n\n```sh\ngh-license list [flags]\n```\n\n#### Flags\n\n| Flag                | Type   | Description                     | Default |\n| ------------------- | ------ | ------------------------------- | ------- |\n| `--json, -j`        | `bool` | Output in JSON format           | false   |\n| `--pretty-json, -p` | `bool` | Output in pretty JSON format    | false   |\n| `--web, -w`         | `bool` | Open the license in the browser | false   |\n\n#### Examples\n\n```sh\n  gh-license list\n  gh-license list --json\n  gh-license list --pretty-json\n```\n\n\u003cdiv align=\"right\"\u003e\n\n[⬆️ Back to top][top]\n\n\u003c/div\u003e\n\n\n### `repo`\n\nView license of a repository\n\n#### Alias\n\n`r`\n\n#### Usage\n\n```sh\ngh-license repo [flags]\n```\n\n#### Flags\n\n| Flag                | Type   | Description                             | Default |\n| ------------------- | ------ | --------------------------------------- | ------- |\n| `--json, -j`        | `bool` | Print the license in JSON format        | false   |\n| `--pretty-json, -p` | `bool` | Print the license in pretty JSON format | false   |\n| `--web, -w`         | `bool` | Open the license in the browser         | false   |\n\n#### Examples\n\n```sh\n  gh license repo\n  gh license repo Shresht7/gh-license\n  gh license repo gh-license\n  gh license repo --json\n  gh license repo Shresht7/gh-license --pretty-json\n```\n\n\u003cdiv align=\"right\"\u003e\n\n[⬆️ Back to top][top]\n\n\u003c/div\u003e\n\n\n### `view`\n\nView details about a particular license\n\n#### Alias\n\n`show`, `get`\n\n#### Usage\n\n```sh\ngh-license view [flags]\n```\n\n#### Flags\n\n| Flag                | Type   | Description                                     | Default |\n| ------------------- | ------ | ----------------------------------------------- | ------- |\n| `--json, -j`        | `bool` | Print the license details in JSON format        | false   |\n| `--pretty-json, -p` | `bool` | Print the license details in pretty JSON format | false   |\n| `--web, -w`         | `bool` | Open the license in the browser                 | false   |\n\n#### Examples\n\n```sh\n  gh-license view mit\n  gh-license view mit --json\n  gh-license view mit --pretty-json\n```\n\n\u003cdiv align=\"right\"\u003e\n\n[⬆️ Back to top][top]\n\n\u003c/div\u003e\n\n\n\n---\n\n## 📜 License\n\nThis software is licensed under the [MIT License](). See the [LICENSE](./LICENSE) file for details.\n\n\n\n\n\n[top]: #gh-license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Fgh-license","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshresht7%2Fgh-license","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Fgh-license/lists"}