mkrepo is a simple CLI tool that enhances the functionality of the GitHub CLI to streamline the creation of repositories. By handling setup tasks such as initializing the repository and setting up remotes, mkrepo allows developers to start coding immediately without worrying about initial setup chores.
- Automates the creation and setup of GitHub repositories.
- Configures remote origin for immediate push capability.
- Optional creation of public or private repositories.
- Go 1.15 or higher
- GitHub CLI
Install mkrepo using Go:
go install github.com/sanurb/mkrepo@latest
mkrepo
offers various functionalities to streamline working with GitHub repositories directly from your command line. Below are the commands available:
- Create Repository
Create a new repository based on specified options. Refer to the Options section for more details.
mkrepo <repoName> [options]
-
List Organizations
mkrepo list-orgs [--limit <int>]
List the GitHub organizations associated with the authenticated user. By default, it lists 30 organizations but you can specify more with the
--limit
option.- List the first 30 organizations:
mkrepo list-orgs
- List up to 100 organizations:
mkrepo list-orgs --limit 100
- List the first 30 organizations:
Here ares the available options for the mkrepo
command:
Option | Description | Default | Required |
---|---|---|---|
<repoName> |
The name of the new repository to create. | None | Yes |
[templateName] |
The name of the template repository to use. | 'bare-minimum' |
No |
[description] |
A brief description of the repository. | 'Short Sweet Headline 🎇🎉' |
No |
--public |
Include this flag to make the repository public. Omit it for a private repository. | Private | No |
--org |
Specify the organization under which the repository will be created. | None | No |
--limit |
Used with list-orgs to specify the maximum number of organizations to list. |
30 | No |
The inspiration for mkrepo came from the need to simplify repetitive tasks faced by developers when setting up new projects on GitHub.
- Key learnings include mastering Go's CLI framework, Cobra
⭐ hit the star button if you found this useful ⭐