| name | bash-script-framework |
| description | Create organized bash script structure with color output, menu systems, error handling, and cross-platform support. Standardizes CLI tooling. |
| version | 1.1.0 |
| category | _core |
| type | skill |
| trigger | manual |
| auto_execute | false |
| capabilities | ["script_organization","menu_systems","color_output","error_handling","cross_platform"] |
| tools | ["Write","Bash","Read"] |
| related_skills | ["python-project-template","yaml-workflow-executor"] |
| tags | [] |
| see_also | ["bash-script-framework-example-1-create-new-cli-tool","bash-script-framework-best-practices"] |
Bash Script Framework
Quick Start
/bash-script-framework init
/bash-script-framework new my-script --menu
/bash-script-framework add utility-script
When to Use
USE when:
- Creating CLI tools for repository
- Building menu-driven automation
- Standardizing script organization
- Cross-platform script development
DON'T USE when:
- Python script is more appropriate
- Simple one-liner needed
- Windows-only environment
For Windows/Git Bash-compatible scripts, see _core/bash/cross-platform-compat.
Prerequisites
- Bash 4.0+
- Unix-like environment (Linux, macOS, WSL)
Overview
Creates organized bash scripts following workspace-hub patterns:
- Color utilities - Consistent terminal output
- Menu systems - Multi-level navigation
- Error handling - Proper exit codes
- Logging - Timestamped output
- Cross-platform - Linux/macOS/WSL support
Directory Structure
scripts/
├── workspace # Main entry point
├── lib/
│ ├── colors.sh # Color definitions
│ ├── logging.sh # Logging utilities
│ ├── menu.sh # Menu system
│ └── utils.sh # General utilities
├── bash/
│ ├── git/ # Git operations
│ └── dev/ # Development tools
├── python/ # Python utilities
└── powershell/ # Windows scripts
Core Templates
1. Color Library (lib/colors.sh)
#!/bin/bash
NC='\033[0m'
BLACK='\033[0;30m'
*See sub-skills full details.*
```bash
LOG_LEVEL_DEBUG=0
LOG_LEVEL_INFO=1
LOG_LEVEL_WARN=2
LOG_LEVEL_ERROR=3
*See sub-skills full details.*
```bash
() {
title=
options=()
*See sub-skills full details.*
```bash
() {
-v &> /dev/null
}
*See sub-skills full details.*
```bash
-e
SCRIPT_DIR=
*See sub-skills full details.*
- [python-project-template](../python-project-template/SKILL.md) - Python CLI tools
- [yaml-workflow-executor](../yaml-workflow-executor/SKILL.md) - YAML-driven execution
- [Bash Reference Manual](https://www.gnu.org/software/bash/manual/)
- [workspace-hub CLI Standards](../../../docs/modules/cli/WORKSPACE_CLI.md)
---
- **1.0.0** (2026-01-14): Initial release - bash script framework with colors, menus, logging, and utilities
- [Example 1: Create New CLI Tool (+1)](example-1-create-new-cli-tool/SKILL.md)
- [Best Practices](best-practices/SKILL.md)