{"id":20880803,"url":"https://github.com/curtisalexander/create-gh-repo","last_synced_at":"2026-05-18T06:37:31.670Z","repository":{"id":80175072,"uuid":"201043420","full_name":"curtisalexander/create-gh-repo","owner":"curtisalexander","description":"Create Github repo via command line","archived":false,"fork":false,"pushed_at":"2019-08-21T08:00:05.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T17:14:25.594Z","etag":null,"topics":["bash","github-api"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/curtisalexander.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,"zenodo":null}},"created_at":"2019-08-07T12:12:40.000Z","updated_at":"2019-08-21T08:00:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"bec2bfb1-0e99-48ae-ba5a-25f9c362180a","html_url":"https://github.com/curtisalexander/create-gh-repo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/curtisalexander/create-gh-repo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curtisalexander%2Fcreate-gh-repo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curtisalexander%2Fcreate-gh-repo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curtisalexander%2Fcreate-gh-repo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curtisalexander%2Fcreate-gh-repo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/curtisalexander","download_url":"https://codeload.github.com/curtisalexander/create-gh-repo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curtisalexander%2Fcreate-gh-repo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259934745,"owners_count":22934329,"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":["bash","github-api"],"created_at":"2024-11-18T07:22:11.471Z","updated_at":"2026-05-18T06:37:26.650Z","avatar_url":"https://github.com/curtisalexander.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# create-gh-repo\n\nBash script to interact with the [Github API](https://developer.github.com/v3/) to create a [repo](https://developer.github.com/v3/repos/).\n\n## Parameter Descriptions\n\n### Personal access token\n\nA [personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) must be created to interact with the Github API.\n\n**Any OS:**\nThe personal access token can be passed in on the command line via the `--pat` switch.\n\n**macOS Only:**\nThe personal access token may be fetched from the [macOS keychain](https://support.apple.com/en-gb/guide/keychain-access/kyca1083/mac). Note that this is accomplished with the command below.\n\n```\nsudo security find-internet-password -gws github.com\n```\n\n### Licenses\n\nLicenses are represented by an abbreviation [utilized by Github](https://help.github.com/en/articles/licensing-a-repository#searching-github-by-license-type).\n\nFor convenience, the licenses available are listed below.\n\n| License Abbreviation | License Text                                    |\n| -------------------- | ----------------------------------------------- |\n| afl-3.0              | Academic Free License v3.0                      |\n| apache-2.0           | Apache license 2.0                              |\n| artistic-2.0         | Artistic license 2.0                            |\n| bsl-1.0              | Boost Software License 1.0                      |\n| bsd-2-clause         | BSD 2-clause 'Simplified' license               |\n| bsd-3-clause         | BSD 3-clause 'New' or 'Revised' license         |\n| bsd-3-clause-clear   | BSD 3-clause Clear license                      |\n| cc                   | Creative Commons license family                 |\n| cc0-1.0              | Creative Commons Zero v1.0 Universal            |\n| cc-by-4.0            | Creative Commons Attribution 4.0                |\n| cc-by-sa-4.0         | Creative Commons Attribution Share Alike 4.0    |\n| wtfpl                | Do What The F\\*ck You Want To Public License    |\n| ecl-2.0              | Educational Community License v2.0              |\n| epl-1.0              | Eclipse Public License 1.0                      |\n| eupl-1.1             | European Union Public License 1.1               |\n| agpl-3.0             | GNU Affero General Public License v3.0          |\n| gpl                  | GNU General Public License family               |\n| gpl-2.0              | GNU General Public License v2.0                 |\n| gpl-3.0              | GNU General Public License v3.0                 |\n| lgpl                 | GNU Lesser General Public License family        |\n| lgpl-2.1             | GNU Lesser General Public License v2.1          |\n| lgpl-3.0             | GNU Lesser General Public License v3.0          |\n| isc                  | ISC                                             |\n| lppl-1.3c            | LaTeX Project Public License v1.3c              |\n| ms-pl                | Microsoft Public License                        |\n| mit                  | MIT                                             |\n| mpl-2.0              | Mozilla Public License 2.0                      |\n| osl-3.0              | Open Software License 3.0                       |\n| postgresql           | PostgreSQL License                              |\n| ofl-1.1              | SIL Open Font License 1.1                       |\n| ncsa                 | University of Illinois/NCSA Open Source License |\n| unlicense            | The Unlicense                                   |\n| zlib                 | zLib License                                    |\n\n## Use\n\nTo display the help text.\n\n```\ncreate-gh-repo --help\n```\n\n\u003cbr/\u003e\n\nThe resulting help text (and usage) is below.\n\n```\ncreate-gh-repo: Create a Github repo\n\nUsage: ./create-gh-repo [option...]\n\n  -h, --help          display help\n  -r, --repo          name of repository\n  -p, --private       private repository\n  -l, --license       license\n  -t, --pat           personal access token\n\n  Defaults\n    - private: false (set to public)\n    - license: mit\n    - pat: accessed via macOS keychain\n\n  Personal access token\n    Personal access token may be passed in on the command line or it may be fetched from macOS keychain (default).\n\n  Licenses\n    License abbreviations may be found at https://help.github.com/en/articles/licensing-a-repository#searching-github-by-license-type\n\nExamples:\n  ./create-gh-repo --repo test                                   # create a repository named 'test', set it to be public (default), with mit license (default)\n  ./create-gh-repo --repo test --private --license bsd-2-clause  # create a repository named 'test', set it to be private, with bsd license\n  ./create-gh-repo --repo test --private --pat 123abc            # create a repository named 'test', set it to be private, and pass the personal access token on the command line\n```\n\n## Other\n\nThe repo also includes a script, [`process-gh-license-table.py`](https://github.com/curtisalexander/create-gh-repo/blob/master/utility/process-gh-license-table.py) which simply transforms the [Github license table](https://help.github.com/en/articles/licensing-a-repository#searching-github-by-license-type) into a few different forms to include in the script. This was done in lieu of hand writing everything.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurtisalexander%2Fcreate-gh-repo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcurtisalexander%2Fcreate-gh-repo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurtisalexander%2Fcreate-gh-repo/lists"}