Skip to content

A small and simple command line tool to clone GitHub repositories and use them as template.

License

Notifications You must be signed in to change notification settings

kevinmarquesp/use-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create-new-template

A small and simple command line tool to clone GitHub repositories and use them as template. When you choose a repo, you can choose which branch you want to use as a template. So you can create a single repository for all of your projects template and import these with this app.

The script will clone the chosen repo with your new project name, delete the .git/ directory (run a custom command if you want to) and run git init again to generate your new project.

Powerful Node packages used to build this app

  • 📦 shelljs to run shell commands;
  • 📦 gar to manipulate command arguments more easily.

DEMO


Instalation

sudo npm i -g create-new-template           # with npm
sudo yarn global add create-new-template    # Or, if you want to use yarn

Usage

You don't need to give any arguments to the command, but, if you don't, it will ask where is the templates repo, which branch you want to use and the project's name (the custom command option will not be asked).

Usage: create-new-template [PROJECT NAME] -r [USER/REPO] -b [BRANCH] -c [COMMAND]
or: create-new-template

A small and simple tool to clone GitHub repositories and use them as template.

    --repo -r       Github repository, you need to specify. Like that: exampleuser/examplerepo
    --branch -b     Branch of the repository that have all of your templates.
                    (e.g. main, master, dev...)
    --command -c    Command to run after cloning the repo and before initialize that.
    --help -h       Show this message

Usage example:

use-template [PROJECT NAME] --repo [USER/REPO] --branch [BRANCH] --command [COMMAND]

You don't have to follow any pattern.

Todo

  • Improve my english in README...
  • Publish on NPM
  • Add --help | -h option


JavaScript NodeJs GPLv3

Thanks for reading the project description!

👆 Back to top

About

A small and simple command line tool to clone GitHub repositories and use them as template.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published