Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.
/ senbei Public archive

Generate tasty command line snacks, using simple templates.

Notifications You must be signed in to change notification settings

Financial-Times/senbei

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍘 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
    

About

Generate tasty command line snacks, using simple templates.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published