0.0.2 ⢠Published 7 years ago
senbei v0.0.2
š Senbei
Generate tasty command line snacks, using simple templates.
Senbei (ććć¹ć) is Japanese for rice cracker.
$ export SENBEI_TEMPLATES="/some/path/to/senbei-templates"
$ senbei
ā Choose a template Ā· echo.js
? Fill out the fields in the following command āŗ 0% completed
echo "<something here>"
# After typing something for `<something here>`
ā Fill out the fields in the following command Ā· 100% completed
ā Do you want to run
echo "something"
? (Y/n) Ā· true
somethingBuilt on top of enquirer.
Usage
Install
senbeinpm install -g senbeiSet the
SENBEI_TEMPLATESenvironment variable to be the folder where templates are storedThe format of a template is
// echo.js // Add modifiable fields with `\${fieldName}` const command = `echo "\${something}"`; // `fieldName` can be added here with a message // If there are no modifiable fields, `fields` can be empty const fields = [ { name: "something", message: "something here" } ]; module.exports = { command, fields };Run:
senbei
Development
- Install nvm
Use correct node version
nvm useInstall dependencies
npm installTo start the app
npm start