Skip to the content.

Shellplate

A custom boilerplate for shell scripts

This boilerplate does not cover advanced scripting, but focuses more on automating a neat UI/UX for shell scripts.
As someone who occassionally creates shell scripts I made this oriented for self use, so feel free to edit all/any part of the code to match your own styles.
If you do use this code, please give me some credit in the repo :)

Features

Demo

You can find an example script built using Shellplate in the /example directory.
Shellplate in use: Shellplate in use

An example script built using Shellplate: An example script built using Shellplate

Dependencies

Shellplate depends on the following packages which need to be installed manually depending on your platform.

git
jq
curl
tput
fmt
figlet

These can also be found in requirements.txt

How to use

  1. Open a terminal, clone this repo and cd into the Shellplate directory
     git clone https://github.com/DarkGuy10/Shellplate.git
     cd Shellplate
    
  2. Execute the Shellplate.sh script and follow the interactive wizard
     bash Shellplate.sh
    
  3. If during the dependency check, any of the packages are marked UNMET, manually install them and rerun the script.
  4. Your project is created at out/<ProjectName>/. Open the <ProjectName>.sh file in the directory and place your code in the main() function.
  5. Happy scripting!

Features in development

Documentation

Project structure

<ProjectName>/
    ascii_art.txt
    <ProjectName>.sh
    project.json
    README.md
    requirements.txt

UI/UX Utils

By default the <ProjectName>.sh script file contains a few utility functions for easier UI/UX management.

Changelog

Changelog can be found here.