0.1.0 • Published 2 years ago

gitmk v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

gitmk (pronounced git make)

Create and delete repos directly in the terminal, easily.

Setup

To use github's API, an access token with the right permissions has to be generated. Go to settings > Developer settings > Personal access tokens. Generate a new token with the following scopes:

  • repo
  • read:user
  • delete_repo

This gives the token all the necessary permissions to create and delete repos.

Install the package globally.

npm i -g gitmk

Create a text file with your github access token.

ghp_3XtpPf...

This file will be used to setup environment variables, and is also a way of not having the access token sitting around in the terminal's command history.

Run the configuration command to setup the environment variables.

gitmk config

Provide the absolute path to the text file containing the access token.

? Config file path: path/to/file.txt

Adding environment variables...

GitHub Account: [user]

Configuration complete.

Feel free to delete the text file now that the configuration is done.

Usage

Creating remote repos

Create a remote repo with the following command.

gitmk add -n "repo-name"

This adds a remote repo to your github account with a readme file. By default all repos will be public, set the private flag to true to change that.

Create flags

NameAliasTypeDefaultDescription
--name-nstringn/aName.
--description-dstringn/aDescription.
--private-pbooleanfalseVisibility.
--license-lstring"MIT"License template.

Deleting remote repos

You can delete a remote repo with the following command.

gitmk rm -n "repo-name"

Delete flags

NameAliasTypeDefaultDescription
--name-nstringn/aName.
Feel free to contribute to this project.