A terminal command for running logic-less project templates.
Install with Ruby Gems:
$ gem install begin_cli
begin
is a terminal command for running logic-less project templates. Templates are just git
repositories whose files and directories are copied to the working directory when run. Directory names, file names,
and file content can contain Mustache tags - the values of which are
prompted for in the terminal and substituted when the template is run.
~$begin new latex-document
Title: My Amazing New Document
Author: John Smith
Sections (CTRL+D to stop): Introduction
Sections (CTRL+D to stop): Background
Sections (CTRL+D to stop): ^D
Running template 'latex-document'...
Template 'latex-document' successfully run
~$
Install a template with the begin install
command, e.g:
$ begin install path/to/template.git
Once you have installed a template, you may run it…
Run a template with the begin new
command, e.g:
$ begin new template
A template is just a Git repository
A template can therefore contain any number of files and directories, and can be easily shared with others
A template name can optionally start with begin-
. This prefix is ignored and stripped by the command automatically, e.g:
$ begin install path/to/begin-latex-document.git
$ begin new latex-document
File names, directory names, and file content can contain Mustache tags
Create a .begin.yml
in your template repository to describe expected tags:
tags: !!omap
title:
label: 'Title'
author:
label: 'Author'
sections:
label: 'Sections'
array: true
The user will be prompted for expected tags upon running a template:
$ begin new latex-document
Title: My Amazing New Document
Author: John Smith
Sections (CTRL+D to stop): Introduction
Sections (CTRL+D to stop): Background
Sections (CTRL+D to stop): ^D
Running template 'latex-document'...
Template 'latex-document' successfully run
Run a template with begin new
List installed templates with begin list
Install a template with begin install
Uninstall a template with begin uninstall
Update templates with begin update
Get help with begin help
Print the command version with begin version