Run any project.
[](https://codeberg.org/janikvonrotz/taskfile.build/actions?workflow=build.yml)  --- The task file is a simple bash script and standardized interface for any software project. It is to be understood as a software development pattern to standardize the installation, configuration and execution of different software frameworks. - 🛠️ **Configuration**: Install and configure software and tools with ease. - 🐳 **Docker Build**: Build and publish Docker images for your project. - 🔑 **KeePass / Pass**: Store and load secrets from KeePass and pass. - 📄 **.env / dotenv**: Manage multiple dotenv files for your projects. - 🔄 **CI Pipelines**: Simplify CI pipelines by making the executed task reproducible. - 📝 **Helper scripts**: There are many examples and commands that make scripting easier. ## Specification The specification is a short guide to set up a task file for a Python project. Create a file `task` in your project. ```bash touch task ``` Ensure it is executable. ```bash chmod +x task ``` First add the bash shebang. ```bash #!/usr/bin/env bash ``` Then append the abort on error setting. ```bash set -e ``` Add a help function. ```bash help-table() { local -a rows local max_cmd=7 max_opt=6 max_desc=11 rows+=("Command|Option|Description") rows+=("help|[grep]|Show help for commands.") rows+=("install||Setup the local environment.") rows+=("lint||Run pre-commit and update index.html.") rows+=("version||Show version of required tools.") for row in "${rows[@]}"; do IFS='|' read -r cmd opt desc <<< "$row" (( ${#cmd} > max_cmd )) && max_cmd=${#cmd} (( ${#opt} > max_opt )) && max_opt=${#opt} (( ${#desc} > max_desc )) && max_desc=${#desc} done printf '| %-*s | %-*s | %-*s |\n' \ "$max_cmd" "Command" \ "$max_opt" "Option" \ "$max_desc" "Description" printf '|-%*s-|-%*s-|-%*s-|\n' \ "$max_cmd" "$(printf '%*s' "$max_cmd" '' | tr ' ' '-')" \ "$max_opt" "$(printf '%*s' "$max_opt" '' | tr ' ' '-')" \ "$max_desc" "$(printf '%*s' "$max_desc" '' | tr ' ' '-')" for row in "${rows[@]:1}"; do IFS='|' read -r cmd opt desc <<< "$row" printf '| %-*s | %-*s | %-*s |\n' \ "$max_cmd" "$cmd" \ "$max_opt" "$opt" \ "$max_desc" "$desc" done } help() { local grep_pattern echo if [[ -n "$1" ]]; then grep_pattern="$1" help-table | grep -i "$grep_pattern" | column -t -s'|' else echo 'task