0.0.2 ā€¢ Published 5 years ago

senbei v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

šŸ˜ 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
something

Built on top of enquirer.

Usage

  • Install senbei

    npm install -g senbei
  • Set the SENBEI_TEMPLATES environment variable to be the folder where templates are stored

    The 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 use
  • Install dependencies

      npm install
  • To start the app

      npm start