blog.tomhanoldt.info

easy-terminal-app

easy-terminal-app
Dec 17, 2016

A minimal terminal-app with maximum comfort.

A minimal "terminal-app" with maximum comfort for me, you and all of our bash-scripting friends =)
This terminal application skeleton is ment for replacing endless switch-case instructions in control scripts and reinventing the wheel again and again.
It is minimal because it only depends on standard bash.
It has maximal comfort because:

  • easily add a command by creating a simple bash script
  • separated config file for your scripts
  • automatic help generation (greps command-scripts for specific marks)
  • logging and colored outputs ready to use
  • write tests for your scripts and run with travis or similar
  • simply adjust the scripts for your needs (all in all only 300 lines of app code)

usage

Usage: ./app [command] [help|*]
 
Available commands:
 
 du                     show disk usage
 
 help                   print help
 
 logs                   show app logs
 
 ps                     show running processes
 
 test                   run tests
 
Configuration:
 
 edit ./bootstrap
 
Available libs:
 
 color                  helps dealing with colors in terminal
 
 command                helps dispatching commands in scripts/commands/*
 
 log                    helps writing and reading app logs
 
 os                     helps detecting current os (exports $is_osx, $is_win, $is_linux)

ressources

Back to latest