A simple CLI for scaffolding projects.(currently support gitlab repo)
$ npm install -g za-cli
$ za -h hostname
For example: za -h gitlab.com
$ za -o owner
For example: za -o mygroup
$ za -t token
Notice setting token is required for gitlab api invokaction. it is only necessary if you need to list repos under configured owner, which will be metioned below.
$ za -h hostname -o owner -t token
$ za list
List repos under the configured owner
$ za init <template-name> <project-name>
The above command pulls the template from the owner's repo, prompts for some information, and generates the project at ./my-project/
.
za init username/repo my-project
Where username/repo
is the gitlab repo shorthand for your fork.
If you would like to download from a private repository use the --clone
flag and the cli will use git clone
so your SSH keys are used.
As this repo itself is generally trimmed from vue-cli, rules for writing templates are exactly the same.