A tool for creating remote GIT repositories
With git-repo-creator you can create a remote repository directly from your terminal! It is compatible with GitHub, Gitlab, and Bitbucket. It also allows to use HTTPS or SSH repositories.
$ npm install -g git-repo-creator
When a repository is sucessfully created, two things might happen:
- If the command is executed inside a folder containing a local git repository, a new remote will be updated/added with the new one.
- If the command is executed outside of a local git repository, a new folder (named after the repository) will be created, containing the new repo.
As a test, I am going to show you how to setup a GitHub account inside the tool, and how to create a remote repository:
First of all, we have to setup our credentials:
git-repo-creator config:github
This will launch a simple assistant that will ask you about your username and personal access token (for more info about this please refer to the bottom section)
Setup is done! Now, let's create our repository.
git-repo-creator create:github simple-test
When this command is entered, the tool will ask you if you want to add a description as well as whether you want your repository to be cloned as an SSH or HTTPS.
git-repo-creator config:bitbucket
git-repo-creator config:github
git-repo-creator config:gitlab
git-repo-creator create:bitbucket REPONAME
git-repo-creator create:github REPONAME
git-repo-creator create:gitlab REPONAME
git-repo-creator help [COMMAND]
Setup a Bitbucket account
USAGE
$ git-repo-creator config:bitbucket
OPTIONS
-h, --help show CLI help
-k, --apiKey=apiKey
-u, --username=username
--read
--reset
See code: src/commands/config/bitbucket.ts
Setup a github account
USAGE
$ git-repo-creator config:github
OPTIONS
-h, --help show CLI help
-k, --apiKey=apiKey
-u, --username=username
--read
--reset
See code: src/commands/config/github.ts
Setup a Gitlab account
USAGE
$ git-repo-creator config:gitlab
OPTIONS
-h, --help show CLI help
-k, --apiKey=apiKey
-u, --username=username
--read
--reset
See code: src/commands/config/gitlab.ts
Create a new Bitbucket remote repository
USAGE
$ git-repo-creator create:bitbucket REPONAME
OPTIONS
-h, --help show CLI help
-p, --public Change the visibility of the repository to 'public'
--http Clone using http
--noClone Do not clone/add remote of the new repository
--ssh Clone using ssh
See code: src/commands/create/bitbucket.ts
Create a new Github remote repository
USAGE
$ git-repo-creator create:github REPONAME
OPTIONS
-h, --help show CLI help
-p, --public Change the visibility of the repository to 'public'
--http Clone using http
--noClone Do not clone/add remote of the new repository
--ssh Clone using ssh
See code: src/commands/create/github.ts
Create a new Gitlab remote repository
USAGE
$ git-repo-creator create:gitlab REPONAME
OPTIONS
-h, --help show CLI help
-p, --public Change the visibility of the repository to 'public'
--http Clone using http
--noClone Do not clone/add remote of the new repository
--ssh Clone using ssh
See code: src/commands/create/gitlab.ts
display help for git-repo-creator
USAGE
$ git-repo-creator help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
--ssh
to clone the repo using ssh--http
to clone the repo using http (default)--noClone
to not clone nor add the origin of the new created repository-p
,--public
to create a public repository (defaults to private)