scriptize is a set of templates and utilities for Bash and Python scripts, plus a new-script helper that scaffolds a new script from them. The Bash utilities come with shdoc generated API docs and bats tests.
Install the tools the Bash templates and tests use.
On Debian/Ubuntu:
sudo apt update
sudo apt install shellcheck bats shell-formatOn Fedora:
sudo dnf install ShellCheck bats shfmtOn macOS (using Homebrew):
brew install shellcheck bats shfmtThen clone the repository and run the installer:
git clone https://github.com/JonathanTSilva/scriptize.git script-templates
cd script-templates && sudo ./install.shCreate a new script:
new-script bash my-awesome-toolcreates./my-awesome-tool.sh, makes it executable, and you are ready to add your logic.new-script python my-data-processorcreates./my-data-processor.pyfor your Python project.
If you keep .pre-commit-config.yaml, install pre-commit once per system and the hooks into your git repo (run inside the repo):
pip install pre-commit
pre-commit installRun shdoc from the root of your repository without any installation. It behaves like the original shdoc.
Generate documentation for a single file:
./scriptize/utils/shdoc < ./bash/utilities/alerts.bash > docs/alerts_api.mdGenerate a single documentation file for all utilities:
./scriptize/utils/shdoc < ./bash/utilities/*.bash > docs/BASH_API_REFERENCE.md- API reference:
docs/, built with mkdocs. - Test report: https://jonathantsilva.github.io/scriptize/
Read the contribution guide first. To work on the Python code:
uv sync
uv run pytestThe Bash utilities are tested with bats, see .github/workflows/shell.yml for how the tests are staged.