Skip to content

A-Noizes/bash-cli-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bash Template Project

This is a modern, minimal Bash project template that includes:

  • A main CLI script using getopts for option parsing.
  • Sourcing-capable sub-scripts placed in lib/.
  • A small test harness that uses plain Bash (no external test frameworks required).
  • A Makefile with test, lint, and install targets.

Quick start

  1. Make the main script executable:

    make install
  2. Run the CLI help:

    ./bin/template.sh -h
  3. Run tests:

    make test

Files

  • bin/template.sh — main CLI script; uses positional subcommands. Subcommands live in lib/commands/ and handle their own getopts parsing.
  • lib/functions/helpers.sh — helper functions (meant to be sourced).
  • lib/functions/tasks.sh — task functions (meant to be sourced).
  • lib/commands/greet.shgreet subcommand (handles -n option).
  • lib/commands/do-task.shdo-task subcommand (handles -r option).
  • tests/run_tests.sh — simple test harness (no external deps).
  • Makefile — targets: install, test, lint, help.

Notes

  • All documentation and inline descriptions are in English.
  • The test harness is intentionally dependency-free so it runs on plain Bash.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors