All Projects → pforret → bashew

pforret / bashew

Licence: MIT license
bash script micro-framework - from small stand-alone script to complex projects with CI/CD and testing

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to bashew

freshubuntu
Handy things for setting up a new Ubuntu 16.04 - 20.04 server
Stars: ✭ 15 (-89.21%)
Mutual labels:  bash-script
DiscordBot-Template
A boilerplate / template for discord.js bots with 100% coverage of Discord API, command handler, error handler based on https://discordjs.guide/
Stars: ✭ 129 (-7.19%)
Mutual labels:  boilerplate-template
dotfiles
my dot files with git and docker extension for windows and linux
Stars: ✭ 13 (-90.65%)
Mutual labels:  bash-script
nginx-installer
Bash script designed to ease the process of compiling nginx with multiple patches and modules manually.
Stars: ✭ 28 (-79.86%)
Mutual labels:  bash-script
dockertex
🐋📓📽 Latex & Texstudio Dockerfiles with multiple texlive versions and proper command line tools 🔮 Mirror only!
Stars: ✭ 26 (-81.29%)
Mutual labels:  bash-script
GRC-SECURITY-NOW-PODCAST-DOWNLOAD-SCRIPT
Purpose of this BASH script is to allow easy downloading of Security Now (GRC.Com/SecurityNow) podcasts and files related to it.
Stars: ✭ 23 (-83.45%)
Mutual labels:  bash-script
yukicpl
一个简单的基于bash的服务器管理面板
Stars: ✭ 20 (-85.61%)
Mutual labels:  bash-script
CTF-Script-And-Template-Thrift-Shop
[180+ scripts] There are a few genuine gems in there. And a lot of spaghetti code. Most of these scripts were for solving CTF's. If you googles something for a CTF and landed here look at the scripts they're all fairly malleable. Sorry for the shitty naming conventions (not really). If you are a recruiter stop. I wont be able to rewrite half thi…
Stars: ✭ 38 (-72.66%)
Mutual labels:  bash-script
ExpressJS-SocketIO-Boilerplate
📦 Simple Express.js & Socket.io Boilerplate
Stars: ✭ 31 (-77.7%)
Mutual labels:  boilerplate-template
ExpressSimpleBoilerPlate
Kerangka project Express JS dengan tambahan ES2015, ESLint, Webpack, Babel, beberapa middleware pengaman, Worker Threads, mock data generator, dan masih banyak lagi.
Stars: ✭ 22 (-84.17%)
Mutual labels:  boilerplate-template
HostEnumerator
A tool that automates the process of enumeration
Stars: ✭ 29 (-79.14%)
Mutual labels:  bash-script
Pinaak
A vulnerability fuzzing tool written in bash, it contains the most commonly used tools to perform vulnerability scan
Stars: ✭ 69 (-50.36%)
Mutual labels:  bash-script
scout
Reading and writing in JSON, Plist, YAML and XML data made simple when the data format is not known at build time. Swift library and command-line tool.
Stars: ✭ 110 (-20.86%)
Mutual labels:  bash-script
Dotfiles
Passionately crafted configs for CLI lovers 🐧❤️
Stars: ✭ 70 (-49.64%)
Mutual labels:  bash-script
Reconky-Automated Bash Script
Reconky is an great Content Discovery bash script for bug bounty hunters which automate lot of task and organized in the well mannered form which help them to look forward.
Stars: ✭ 167 (+20.14%)
Mutual labels:  bash-script
cylon-deb
TUI menu driven bash shell script to update and maintain a Debian based Linux distro.
Stars: ✭ 23 (-83.45%)
Mutual labels:  bash-script
jbh
(JBH) Jekyll Blog Helper - A shell script to help manage a jekyll weblog site
Stars: ✭ 26 (-81.29%)
Mutual labels:  bash-script
react-initial-bootstrap
an "almost complete" template for your new projects
Stars: ✭ 24 (-82.73%)
Mutual labels:  boilerplate-template
Bash
Collection of bash scripts I wrote to make my life easier or test myself that you may find useful.
Stars: ✭ 19 (-86.33%)
Mutual labels:  bash-script
sparrowx
Minimal, SEO-friendly, Jekyll + Netlify CMS Boilerplate.
Stars: ✭ 15 (-89.21%)
Mutual labels:  boilerplate-template

Part of part of Bashful Scripting network network / Install with basher install

Latest tag: version / latest release: version / Bash CI Shellcheck CI

bashew

Bashew Logo

bash script / project creator

TL;DR

to create a new stand-alone SCRIPT (just a xyz.sh script), with option parsing, color output (cf 1.)

    bashew.sh script

to create a new standalone script PROJECT (in a folder, with README) (cf 2.)

    bashew.sh project

to initialize a bashew-based REPO with CI/CD you just cloned (cf 3.)

    bashew init

🎯 Features

Self-contained

  • all code contained in 1 single file (no external dependencies)
  • comes with README.md, CHANGELOG.md, ... markdown files
  • edit only Script:main() function and subroutines in beginning of script, all template code is at the end of the script

Option parsing

  • definition of flags/options/parameters in 1 place only
  • automatic creation of usage text based on definition above
  • short/long option parsing, based on definition above
  • option --lorem [value] is available inside the script as $lorem

function library

  • IO: functions for IO, with intelligent color usage (not when output is piped) (e.g. IO.success, IO.die)
  • Str: functions for string manipulation (e.g Str:lower, Str:digest)
  • Os: functions for e.g. required program checking (e.g. Os:require convert imagemagick)

batteries included

  • read multiple .env configuration files
  • predefined --quiet (no output) and --verbose (more output) modes
  • folder for temporary files (with automatic cleanup)
  • folder for log files (with automatic cleanup)
  • correct determination of script installation folder (resolve symbolic links)
  • easy CI/CD for Github (with shellcheck)

🔥 Usage

Program: bashew 1.18.2 by [email protected]
Updated: May  1 16:49:18 2022
Description: package_description
Usage: bashew [-h] [-q] [-v] [-f] [-l <log_dir>] [-t <tmp_dir>] [-n <name>] <action>
Flags, options and parameters:
    -h|--help        : [flag] show usage [default: off]
    -q|--quiet       : [flag] no output [default: off]
    -v|--verbose     : [flag] output more [default: off]
    -f|--force       : [flag] do not ask for confirmation (always yes) [default: off]
    -l|--log_dir <?> : [option] folder for debug files   [default: /Users/pforret/log/bashew]
    -t|--tmp_dir <?> : [option] folder for temp files  [default: /tmp/bashew]
    -n|--name <?>    : [option] name of new script or project
    <action>         : [parameter] action to perform: script/project/init/update

1. create new bash script (without repo)

bashew.sh script                    # will interactively ask for author & script details
bashew.sh -f script                 # will create new script with random name
bashew.sh -f -n "../list.sh" script # will create new script ../list.sh

Example:

$ bashew script
⏳  1. first we need the information of the author
Author full name         (pforret) > Peter Forret
Author email             ([email protected]) > 
Author (github) username (pforret) > 
⏳  2. now we need the path and name of this new script/repo
Script name (./bespoke_bunny.sh) > 
⏳  3. give some description of what the script should do
Script description (This is my script bespoke_bunny) > process log files
⏳  Creating script ./bespoke_bunny.sh ...
./bespoke_bunny.sh

$ bashew.sh -f -q script
./iffiest_prepays.sh

2. create new bash project folder/repo (with README.md, CI/CD)

bashew.sh project               # will interactively ask for author & script details
bashew.sh -f project            # will create new project with random name
bashew.sh -f -n "tango" project # will create new project in folder "tango"

Example:

> bashew.sh -f project
…  Creating project ./tendon_mingle ...
CHANGELOG.md README.md VERSION.md LICENSE .gitignore tendon_mingle.sh bitbucket-pipelines .github/workflows  
✔  next step: 'cd ./tendon_mingle' and start scripting!

3. create a bash script repo, with CI/CD, with README, with tests, with versioning ...

git clone https://github.com/<you>/<your repo>.git
cd <your repo>
./bashew.sh init             # will ask for details and initialise/clean up the repo

and then, if you have setver.sh:

setver push          # will commit and push new code
setver new patch     # will set new version to 0.0.1
setver set 1.0.0     # when your first working version is committed

4. git clone into new repo

git clone --depth=1 https://github.com/pforret/bashew.git <newname>
cd <newname>
./bashew.sh init             # will ask for details and iniialise/clean up the repo

🚀 Installation

  • manually
git clone https://github.com/pforret/bashew.git
ln -s bashew/bashew.sh /usr/local/bin
  • or with basher package manager basher install
basher install pforret/bashew

🙏 Acknowledgements

🤔 What's that name? Bashew?

  • derived from 'bash new'
  • rhymes with cashew

Stargazers over time

Stargazers over time

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].