🔧 Generate boilerplates from CLI
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
media
scripts
tests
DOCUMENTATION.md
LICENSE
README.md
bash-completion.sh
tp

README.md

Template Generator

Conventional Commits

A simple bash script used to manage boilerplates.

example usage of template-generator

Install

  1. Put the file tp in an executable path.
  2. Create a directory named boilerplates in your home folder and fill it with boilerplates.

Furthermore, if you want bash-autocompletion:

  1. Install boilerplates-completion.
  2. Source bash-completion.sh from ~/.bash_completion.

Usage

template-generator - Template generator CLI

Usage: tp [command] [arguments]

Options:
  -h, --help              Print this help.
  -v, --version           Print script version.
  -L, --level             Max display depth of the directory tree.

Commands:
  list|ls|l [subdirectory]                List boilerplates.
  generate|g [boilerplate] [destination]  Generate boilerplate.
  preview|p [boilerplate]                 Preview boilerplate.
  edit|e [boilerplate]                    Edit boilerplate in editor.

Examples:
  # Show first depth level of boilerplates path.
  $ tp ls -L 1

  # Copy boilerplate file.txt to current directory with filename new-file.txt
  $ tp generate files/file.txt new-file.txt

Boilerplate Path:

  The order of precedence (highest to lowest) is:
    Environment variable BOILERPLATES_PATH
    $PWD/.boilerplates/
    $PWD/boilerplates/
    ~/.boilerplates/
    ~/boilerplates/