bash-script-template

Solid

Generate bash script templates with best practices including error handling, argument parsing, logging, and portability considerations.

AI & Automation 814 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
97
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Bash Script Template Generate bash script templates with best practices. ## Capabilities - Generate robust bash script templates - Set up proper error handling - Implement argument parsing with getopts - Create logging utilities - Configure strict mode settings - Generate reusable function libraries ## Usage Invoke this skill when you need to: - Create new bash scripts with best practices - Set up proper error handling patterns - Implement argument parsing - Create portable shell scripts ## Inputs | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | scriptName | string | Yes | Script name | | description | string | Yes | Script description | | arguments | array | No | Script arguments | | functions | array | No | Functions to include | ## Generated Template ```bash #!/usr/bin/env bash # # <scriptName> - <description> # # Usage: <scriptName> [options] <arguments> # set -euo pipefail IFS=$'\n\t' # Script directory readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" readonly SCRIPT_NAME="$(basename "${BASH_SOURCE[0]}")" # Colors (if terminal supports) if [[ -t 1 ]]; then readonly RED='\033[0;31m' readonly GREEN='\033[0;32m' readonly YELLOW='\033[0;33m' readonly BLUE='\033[0;34m' readonly NC='\033[0m' else readonly RED='' GREEN='' YELLOW='' BLUE='' NC='' fi # Logging functions log_info() { echo -e "${BLUE}[INFO]${NC} $*"; } log_success() { echo -e "${GREEN}[OK]${NC} $*"; } log_warn() {...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Related Skills