diff --git a/.prompt/01_built-task-template-from-library_session.md b/.prompt/01_built-task-template-from-library_session.md
index f62a22b..cee3a86 100644
--- a/.prompt/01_built-task-template-from-library_session.md
+++ b/.prompt/01_built-task-template-from-library_session.md
@@ -8,13 +8,13 @@
## User
-/home/janikvonrotz/taskfile.build/.prompt/01_built-task-template-from-library.md
+/home/janikvonrotz/taskfile.build/.prompt/01_built-task-template-from-library.md
---
## Assistant (Build · devstral-2512 · 1.7s)
-```
+````
Tool: read
**Input:**
@@ -22,34 +22,37 @@ Tool: read
{
"filePath": "/home/janikvonrotz/taskfile.build/.prompt/01_built-task-template-from-library.md"
}
-```
+````
+
**Output:**
-```
+
+````
00001| Read the AGENTS.md and README.md to get understanding of the project.
-00002|
+00002|
00003| Add a new command `update-template` to the `task` file. The bash function updates the `task.template` list from rows from from the `library.md`.
-00004|
+00004|
00005| To identify the section in the `task.template` use the header row:
-00006|
+00006|
00007| ```
00008| rows+=("Command|Option|Description")
00009| ```
-00010|
+00010|
00011| And the for-loop:
-00012|
+00012|
00013| ```
00014| for row in "${rows[@]}"; do
00015| ```
-00016|
+00016|
00017| To identify the rows in `library.md` simply look for `rows+=(`.
-00018|
+00018|
00019| The task is completed if all rows defined in `library.md` are also in `task.template`.
-00020|
+00020|
(End of file - total 20 lines)
-```
+````
+
```
---
@@ -57,35 +60,39 @@ Tool: read
## Assistant (Build · devstral-2512 · 1.9s)
```
+
Tool: read
**Input:**
+
```json
{
- "filePath": "/home/janikvonrotz/taskfile.build/AGENTS.md"
+ "filePath": "/home/janikvonrotz/taskfile.build/AGENTS.md"
}
```
+
**Output:**
-```
+
+````
00001| # AGENTS.md
-00002|
+00002|
00003| ## General agent guidance
-00004|
+00004|
00005| This section outlines the universal rules and expectations for any LLM agent working within this repository.
-00006|
+00006|
00007| **Safety and Quality First:** The highest priority is to produce secure, well-documented, and high-quality code. Do not introduce vulnerabilities, hardcoded secrets, or unreadable code.
-00008|
+00008|
00009| **Propose a Plan:** For any new task, first provide a brief plan of action. This plan should clearly outline the intended changes and the rationale behind them.
-00010|
+00010|
00011| **Maintain Context:** Before making any changes, an agent must read and understand the relevant files, including the project's main documentation and existing code structure.
-00012|
-00013| **Be Sparse:** Only introduce new code if needed. Comment only what is worth commenting. When testing focus on the business use case.
-00014|
+00012|
+00013| **Be Sparse:** Only introduce new code if needed. Comment only what is worth commenting. When testing focus on the business use case.
+00014|
00015| ## Project structure
-00016|
+00016|
00017| The project follows the 11ty static site generator structure:
-00018|
+00018|
00019| ```
00020| taskfile.build/
00021| ├── _includes/ # Template files and layouts
@@ -106,178 +113,183 @@ Tool: read
00036| ├── package.json # Node.js dependencies
00037| └── task # Main task script
00038| ```
-00039|
+00039|
00040| The site generates documentation pages from markdown files using Nunjucks templates, with a responsive layout that includes navigation and content areas.
-00041|
+00041|
00042| ## Environment & tooling
-00043|
+00043|
00044| ### Taskfile
-00045|
+00045|
00046| This project uses the standard.
-00047|
+00047|
00048| The `./task` file is a bash script that provides all functions necessary to work with this project.
-00049|
+00049|
00050| **Execute**: Always try to run a command with the `./task` file script.
-00051|
+00051|
00052| ## Coding conventions
-00053|
+00053|
00054| ### Bash
-00055|
+00055|
00056| The following guideline is heavily based on the [Bash Style Guide | ysap.sh](https://style.ysap.sh/), which should be considered the primary reference for style. Adhere to the following principles to ensure scripts are safe, predictable, and maintainable.
-00057|
+00057|
00058| **Shebang:** Start scripts with `#!/usr/bin/env bash` for portability.
-00059|
+00059|
00060| **Quoting:** This is critical.
-00061|
+00061|
00062| - Use double quotes `"` for strings that require variable expansion.
00063| - Use single quotes `'` for all other strings.
-00064|
+00064|
00065| **Always quote variable expansions** `"$var"` to prevent word-splitting and globbing issues.
-00066|
+00066|
00067| **Variables:** Distinct between local and environment vars.
-00068|
+00068|
00069| - Use `local` for all variables inside functions.
00070| - Use lowercase names for local variables (e.g., `buildx_output`).
00071| - Use uppercase names for environment variables (e.g. `export BUILDX_PLATFORM`)
-00072|
+00072|
00073| **Functions:**
-00074|
+00074|
00075| - Do not use the `function` keyword.
00076| - Use `my-func() { ... }` syntax.
00077| - Function names are in kebab case.
-00078|
+00078|
00079| **Conditionals:**
-00080|
+00080|
00081| - Always use `[[ ... ]]` for conditional testing, not `[ ... ]` or `test`.
00082| - Use `((...))` for arithmetic comparisons (e.g., `((a > b))`).
00083| - When replacing `[]` with `[[]]` make sure to escape the brackets. The `[]` is a regex filter.
-00084|
+00084|
00085| **Command Substitution:**
-00086|
+00086|
00087| - Always use `$(...)` for command substitution, not backticks.
-00088|
+00088|
00089| **Arrays:**
-00090|
+00090|
00091| - Use Bash arrays to manage lists of items instead of space-separated strings.
00092| - Iterate over arrays using `for item in "${my_array[@]}"; do ... done`.
-00093|
+00093|
00094| **Avoid External Commands:**
-00095|
+00095|
00096| - Use Bash's built-in parameter expansion for string manipulation (e.g., `${var/foo/bar}`).
00097| - Use globbing (`*`) to iterate over files, not `ls`.
00098| - Avoid `cat` when a command can read a file directly (e.g., `grep "pattern" file`).
-00099|
+00099|
00100| **`eval`:** Never use `eval`.
-00101|
+00101|
(End of file - total 101 lines)
-```
+````
+
```
```
+
Tool: read
**Input:**
+
```json
{
- "filePath": "/home/janikvonrotz/taskfile.build/README.md"
+ "filePath": "/home/janikvonrotz/taskfile.build/README.md"
}
```
+
**Output:**
-```
+
+````
00001| ---
00002| layout: layouts/base.njk
00003| permalink: /
00004| ---
-00005|
+00005|
00006|
00007|
./task
00008|
Run any project.
00009|
-00010|
+00010|
00011| [](https://codeberg.org/janikvonrotz/taskfile.build/actions?workflow=build.yml) 
-00012|
+00012|
00013| ---
-00014|
+00014|
00015| The task file is a simple bash script and standardized interface for any software project.
-00016|
+00016|
00017| It is to be understood as a software development pattern to standardize the installation, configuration and execution of different software frameworks.
-00018|
+00018|
00019| - **Package Management**: Install and configure software and tools with ease.
00020| - **Docker Build**: Build and publish Docker imgages for your project.
00021| - **KeePass / Pass**: Store and load secrets from KeePass and pass.
00022| - **.env / dotenv**: Manage multiple dotenv files for your projects.
00023| - **CI Pipelines**: Simplify CI pipelines by making the executed task reproducable.
-00024| - **Helper scripts**: There are many examples and commands that make scripting easier.
-00025|
+00024| - **Helper scripts**: There are many examples and commands that make scripting easier.
+00025|
00026| ## Specification
-00027|
+00027|
00028| The specification is a short guide to set up a task file for a Python project.
-00029|
+00029|
00030| Create a file `task` in your project.
-00031|
+00031|
00032| ```bash
00033| touch task
00034| ```
-00035|
+00035|
00036| Ensure it is executable.
-00037|
+00037|
00038| ```bash
00039| chmod +x task
00040| ```
-00041|
+00041|
00042| First add the bash shebang.
-00043|
+00043|
00044| ```bash
00045| #!/usr/bin/env bash
00046| ```
-00047|
+00047|
00048| Then append the abort on error setting.
-00049|
+00049|
00050| ```bash
00051| set -e
00052| ```
-00053|
+00053|
00054| Load environment variables from the `.env` file.
-00055|
+00055|
00056| ```bash
00057| if [[ -a ".env" ]]; then
00058| source .env
00059| fi
00060| ```
-00061|
+00061|
00062| Add a help function.
-00063|
+00063|
00064| ```bash
00065| help-table() {
00066| local -a rows
00067| local max_cmd=7 max_opt=6 max_desc=11
-00068|
+00068|
00069| rows+=("Command|Option|Description")
00070| rows+=("help|[grep]|Show help for commands.")
00071| rows+=("install||Setup the local environment.")
00072| rows+=("lint||Run pre-commit and update index.html.")
00073| rows+=("version||Show version of required tools.")
-00074|
+00074|
00075| for row in "${rows[@]}"; do
00076| IFS='|' read -r cmd opt desc <<< "$row"
00077| (( ${#cmd} > max_cmd )) && max_cmd=${#cmd}
00078| (( ${#opt} > max_opt )) && max_opt=${#opt}
00079| (( ${#desc} > max_desc )) && max_desc=${#desc}
00080| done
-00081|
+00081|
00082| printf '| %-*s | %-*s | %-*s |\n' \
00083| "$max_cmd" "Command" \
00084| "$max_opt" "Option" \
00085| "$max_desc" "Description"
-00086|
+00086|
00087| printf '|-%*s-|-%*s-|-%*s-|\n' \
00088| "$max_cmd" "$(printf '%*s' "$max_cmd" '' | tr ' ' '-')" \
00089| "$max_opt" "$(printf '%*s' "$max_opt" '' | tr ' ' '-')" \
00090| "$max_desc" "$(printf '%*s' "$max_desc" '' | tr ' ' '-')"
-00091|
+00091|
00092| for row in "${rows[@]:1}"; do
00093| IFS='|' read -r cmd opt desc <<< "$row"
00094| printf '| %-*s | %-*s | %-*s |\n' \
@@ -286,7 +298,7 @@ Tool: read
00097| "$max_desc" "$desc"
00098| done
00099| }
-00100|
+00100|
00101| help() {
00102| echo
00103| if [[ -n "$1" ]]; then
@@ -301,9 +313,9 @@ Tool: read
00112| echo
00113| }
00114| ```
-00115|
+00115|
00116| Setup the command functions.
-00117|
+00117|
00118| ```bash
00119| install() {
00120| echo 'Setup venv and install python dependencies'
@@ -311,21 +323,21 @@ Tool: read
00122| source env/bin/activate
00123| uv pip install pre-commit
00124| }
-00125|
+00125|
00126| lint() {
00127| source env/bin/activate
-00128|
+00128|
00129| echo 'Run pre-commit'
00130| pre-commit run --all-file
00131| }
-00132|
+00132|
00133| version() {
00134| uv --version
00135| }
00136| ```
-00137|
+00137|
00138| Finish the task file with command switch cases.
-00139|
+00139|
00140| ```bash
00141| if [[ "$1" == *","* ]]; then
00142| # Split comma-separated commands
@@ -357,57 +369,62 @@ Tool: read
00168| esac
00169| fi
00170| ```
-00171|
+00171|
00172| These are the main parts of every task file script.
-00173|
+00173|
00174| Now see [usage](/usage) on how to use the task file.
-00175|
+00175|
00176| ## Naming
-00177|
+00177|
00178| The naming of functions is important. There are basically two styles:
-00179|
+00179|
00180| 1. Action + Object
00181| 2. Object + Action
-00182|
+00182|
00183| The task file functions use the first style. The name of the function starts with an action followed by an object. The object name can be singular or plural.
-00184|
+00184|
00185| **Examples for actions**: activate, install, dev, develop, init, build, start, update, remove, delete, enable, disable, template, convert, create, edit, change, get, set, patch, fetch, generate, push, pull, import, export, list, publish, release, test, setup, prepare, restart, stop, store, restore, translate, upgrade, zip, visualize, sync, switch, run, reset, load, dump, checkout, commit, drop, deploy, handle, trigger, render, lint, uninstall, split, parse, fix, refactor, transform, cat, ls, rm, serve, help, show, filter, login, logout, encrypt, decrypt, upload, download, analyse, transpile, compile, minify, copy
-00186|
+00186|
00187| **Examples for objects**: env, venv, submodule, container, database, snippet, model, module, repo, mail, doc, dependency, view, user, vault, file, host, node, log, password, hash, script, requirement, part, component, system, workspace, image, process, state, platform, dir, folder, readme, overview, lang, level, request, response, result, worker, server, proxy, workflow, volume, network, package, field, value, secret, chart, node, edge, function, method, firewall, html, css, image, svg, style, query, native, group, notebook
-00188|
+00188|
00189| **Objects can be tools**: odoo, vupress, nodejs, zsh, bash, fish, podman, kind, minikube, helm, nvim, docker, podman, rust, python, tmux, vim, helix, system, git, pass, llm, sql, dotenv, javascript, vue, vite, astro, typescript, turbo, pnpm, eslint, jenkins, k8s, nextcloud, postgres, metabase, ansible, prometheus, grafana, hugo, deno, bun, babel, panda, gulp, grunt, electron, react, express, mongodb, angular, ionic, meteor, webpack, bower, jupyter
-00190|
+00190|
00191|
-00192|
+00192|
00193| ## Style
-00194|
+00194|
00195| The bash scripts follow the [Bash Style Guide | ysap.sh](https://style.ysap.sh/). Have a look at the [AGENTS.md](/AGENTS) for details on the applied styling.
-00196|
+00196|
(End of file - total 196 lines)
-```
+````
+
```
```
+
Tool: read
**Input:**
+
```json
{
- "filePath": "/home/janikvonrotz/taskfile.build/task"
+ "filePath": "/home/janikvonrotz/taskfile.build/task"
}
```
+
**Output:**
+
```
00001| #!/usr/bin/env bash
00002| set -e
-00003|
+00003|
00004| help-table() {
00005| local -a rows
00006| local max_cmd=7 max_opt=6 max_desc=11
-00007|
+00007|
00008| rows+=("Command|Option|Description")
00009| rows+=("all||Run all tasks.")
00010| rows+=("build-11ty||Build the 11ty website.")
@@ -421,24 +438,24 @@ Tool: read
00018| rows+=("run-tests||Test with shellcheck.")
00019| rows+=("serve-11ty||Serve the 11ty output folder.")
00020| rows+=("version||Show version of required tools.")
-00021|
+00021|
00022| for row in "${rows[@]}"; do
00023| IFS='|' read -r cmd opt desc <<< "$row"
00024| (( ${#cmd} > max_cmd )) && max_cmd=${#cmd}
00025| (( ${#opt} > max_opt )) && max_opt=${#opt}
00026| (( ${#desc} > max_desc )) && max_desc=${#desc}
00027| done
-00028|
+00028|
00029| printf '| %-*s | %-*s | %-*s |\n' \
00030| "$max_cmd" "Command" \
00031| "$max_opt" "Option" \
00032| "$max_desc" "Description"
-00033|
+00033|
00034| printf '|-%*s-|-%*s-|-%*s-|\n' \
00035| "$max_cmd" "$(printf '%*s' "$max_cmd" '' | tr ' ' '-')" \
00036| "$max_opt" "$(printf '%*s' "$max_opt" '' | tr ' ' '-')" \
00037| "$max_desc" "$(printf '%*s' "$max_desc" '' | tr ' ' '-')"
-00038|
+00038|
00039| for row in "${rows[@]:1}"; do
00040| IFS='|' read -r cmd opt desc <<< "$row"
00041| printf '| %-*s | %-*s | %-*s |\n' \
@@ -447,7 +464,7 @@ Tool: read
00044| "$max_desc" "$desc"
00045| done
00046| }
-00047|
+00047|
00048| help() {
00049| echo
00050| if [[ -n "$1" ]]; then
@@ -461,7 +478,7 @@ Tool: read
00058| fi
00059| echo
00060| }
-00061|
+00061|
00062| clone-taskfile(){
00063| if [[ ! -d "$HOME/taskfile.build" ]]; then
00064| echo -e '\033[38;5;214mGit\033[0m: Clone taskfile repo'
@@ -471,7 +488,7 @@ Tool: read
00068| git -C "$HOME/taskfile.build" pull
00069| fi
00070| }
-00071|
+00071|
00072| if [[ -d "$HOME/taskfile.build/bin" ]]; then
00073| for file in "$HOME/taskfile.build/bin/"*; do
00074| if [[ -f "$file" ]]; then
@@ -479,16 +496,16 @@ Tool: read
00076| fi
00077| done
00078| fi
-00079|
+00079|
00080| # Static vars
-00081|
+00081|
00082| BUILDX_PLATFORM="linux/amd64"
00083| CONTAINER_REGISTRY="janikvonrotz"
00084| CONTAINER_TAG="taskfile.build:latest"
00085| DOCKERFILE="image/Dockerfile"
-00086|
+00086|
00087| # Project commands
-00088|
+00088|
00089| run() {
00090| echo "Open http://localhost:8080 in your browser"
00091| docker run -p 8080:80 \
@@ -497,36 +514,36 @@ Tool: read
00094| -e CADDY_ROOT="_site" \
00095| janikvonrotz/taskfile.build:latest
00096| }
-00097|
+00097|
00098| install() {
00099| pnpm install
00100| }
-00101|
+00101|
00102| dev-11ty() {
00103| open-with-os 'http://localhost:8080/' & pnpm dlx @11ty/eleventy --serve
00104| }
-00105|
+00105|
00106| lint() {
00107| pnpm exec prettier . --write
00108| }
-00109|
+00109|
00110| run-tests() {
00111| echo "Test with shellcheck."
00112| shellcheck task
00113| }
-00114|
+00114|
00115| build-11ty() {
00116| pnpm dlx @11ty/eleventy
00117| }
-00118|
+00118|
00119| serve-11ty() {
00120| pnpx serve ./_site
00121| }
-00122|
+00122|
00123| version() {
00124| echo "eleventy: $(pnpm dlx @11ty/eleventy --version)"
00125| }
-00126|
+00126|
00127| if [[ "$1" == *","* ]]; then
00128| # Split comma-separated commands
00129| IFS=',' read -ra COMMANDS <<< "$1"
@@ -556,24 +573,29 @@ Tool: read
00153| ;;
00154| esac
00155| fi
-00156|
+00156|
(End of file - total 156 lines)
```
+
```
```
+
Tool: read
**Input:**
+
```json
{
- "filePath": "/home/janikvonrotz/taskfile.build/library.md"
+ "filePath": "/home/janikvonrotz/taskfile.build/library.md"
}
```
+
**Output:**
-```
+
+````
00001| ---
00002| layout: layouts/base.njk
@@ -581,7 +603,7 @@ Tool: read
00004| # Library
00005| The repository of this website provides a library of reusable functions.
00006| Clone the repository into your home folder and ensure it is updated regularly.
-00007|
+00007|
00008| ```bash
00009| clone-taskfile(){
00010| if [[ ! -d "$HOME/taskfile.build" ]]; then
@@ -593,9 +615,9 @@ Tool: read
00016| fi
00017| }
00018| ```
-00019|
+00019|
00020| In your task file import all commands from the taskfile library.
-00021|
+00021|
00022| ```bash
00023| if [[ -d "$HOME/taskfile.build/bin" ]]; then
00024| for file in "$HOME/taskfile.build/bin/"*; do
@@ -605,289 +627,289 @@ Tool: read
00028| done
00029| fi
00030| ```
-00031|
+00031|
00032| These commands create folder in the directory of the task file and the home directory. Here is an overview of these folders:
00033| - `$PWD/tmp`: Temporary directory for the task commands.
00034| - `$PWD/.prompt`: LLM prompts stored as markdown files.
00035| - `$HOME/.config/taskfile.build`: Default path for storing dotenv files.
00036| - `$HOME/.docker/$CONTAINER_REGISTRY`: Default path for storing container registry credentials.
-00037|
+00037|
00038| ## Task
00039| Configure the task enviroment.
-00040|
+00040|
00041| ```bash
00042| OPEN_BROWSER=False # Default: True
00043| TASK_DOTENV_DIR="$HOME/Odoo-Build/config" # Default: "$HOME/.config/taskfile.build"
00044| ```
-00045|
+00045|
00046| ### clone-taskfile
00047| ```bash
00048| rows+=("clone-taskfile||Clone the taskfile.build repo.")
00049| ```
-00050|
+00050|
00051| ### init-project
00052| ```bash
00053| rows+=("init-project||Setup a taskfile project in the current directory.")
00054| ```
-00055|
+00055|
00056| ### init-config-dir
00057| ```bash
00058| rows+=("init-dotenv-dir||Setup task dotenv dir.")
00059| ```
-00060|
+00060|
00061| ### template-dotenv
00062| ```bash
00063| rows+=("template-dotenv||Generate .env from .env.template.")
00064| ```
-00065|
+00065|
00066| ### open-with-os
00067| ```bash
00068| rows+=("open-with-os||Open file or url with default application.")
00069| ```
-00070|
+00070|
00071| ### open-url-with-delay
00072| ```bash
00073| rows+=("open-url-with-delay|[url][delay]|Open url after n seconds.")
00074| ```
-00075|
+00075|
00076| ### show-dotenv-setup
00077| ```bash
00078| rows+=("show-dotenv-setup||Show info about the dotenv setup.")
00079| ```
-00080|
+00080|
00081| ## Files
00082| Managing files and directories.
-00083|
+00083|
00084| ### ensure-directory
00085| ```bash
00086| rows+=("ensure-directory|[path]|Ensure directory path exists.")
00087| ```
-00088|
+00088|
00089| ### create-symlink
00090| ```bash
00091| rows+=("create-symlink|[target][source]|Remove existing file/directory and create symlink.")
00092| ```
-00093|
+00093|
00094| ### create-symlink-files
00095| ```bash
00096| rows+=("create-symlink-files|[target][source]|Create symlink for files in source pattern.")
00097| ```
-00098|
+00098|
00099| ## Python
00100| Setup Python virtual enviroment.
-00101|
+00101|
00102| ### activate-venv
00103| ```bash
00104| rows+=("activate-venv||Activate or initialize Python virtual env.")
00105| ```
-00106|
+00106|
00107| ### remove-venv
00108| ```bash
00109| rows+=("remove-venv||Remove the Python virtual env.")
00110| ```
-00111|
+00111|
00112| ## Environment
00113| Manage `.env` files in the task config folder.
-00114|
+00114|
00115| ```bash
00116| TASK_DOTENV_DIR="$HOME/Odoo-Build/config" # Default: "$HOME/.config/taskfile.build"
00117| ```
-00118|
+00118|
00119| ### create-dotenv
00120| ```bash
00121| rows+=("create-dotenv|[env][type]|Create .env file of type nextcloud, odoo, upgrade.")
00122| ```
-00123|
+00123|
00124| ### list-dotenv
00125| ```bash
00126| rows+=("list-dotenv||List .env files.")
00127| ```
-00128|
+00128|
00129| ### show-dotenv
00130| ```bash
00131| rows+=("show-dotenv|[env]|Output content of the .env file.")
00132| ```
-00133|
+00133|
00134| ### copy-dotenv
00135| ```bash
00136| rows+=("copy-dotenv|[env][env]|dotenv .env file.")
00137| ```
-00138|
+00138|
00139| ### edit-dotenv
00140| ```bash
00141| rows+=("edit-dotenv|[env]|Open .env file in default editor.")
00142| ```
-00143|
+00143|
00144| ### load-dotenv
00145| ```bash
00146| rows+=("load-dotenv|[env]|Load and export .env file.")
00147| ```
-00148|
+00148|
00149| ### rename-dotenv
00150| ```bash
00151| rows+=("rename-dotenv|[env][env]|Rename .env file.")
00152| ```
-00153|
+00153|
00154| ### remove-dotenv
00155| ```bash
00156| rows+=("remove-dotenv|[env]|Remove .env file.")
00157| ```
-00158|
+00158|
00159| ### backup-dotenv-files
00160| ```bash
00161| rows+=("backup-dotenv-files|[path]|Archive and copy .env files to target location.")
00162| ```
-00163|
+00163|
00164| ### restore-dotenv-files
00165| ```bash
00166| rows+=("restore-dotenv-files|[path]|Extract and copy .env files from backup file.")
00167| ```
-00168|
+00168|
00169| ## LLM
00170| Commands that integrate the `llm` cli.
-00171|
+00171|
00172| ### commit-with-llm
00173| ```bash
00174| rows+=("commit-with-llm||Commit with llm generated commit message.")
00175| ```
-00176|
+00176|
00177| ### update-with-llm
00178| ```bash
00179| rows+=("update-with-llm|[glob][prompt]|Feed files matching glob to LLM and apply changes.")
00180| ```
-00181|
+00181|
00182| ## Logging
00183| Colorful logging in task commands.
-00184|
+00184|
00185| ### log-error
00186| ```bash
00187| rows+=("log-error||Colored output for errors.")
00188| ```
-00189|
+00189|
00190| ### log-success
00191| ```bash
00192| rows+=("log-success||Colored output for success.")
00193| ```
-00194|
+00194|
00195| ### log-warning
00196| ```bash
00197| rows+=("log-warning||Colored output for warnings.")
00198| ```
-00199|
+00199|
00200| ## Git
00201| Manage git folders and submodules.
-00202|
+00202|
00203| ### commit-git-folder
00204| ```bash
00205| rows+=("commit-git-folder|[message][path]|Commit all changes in git folders in path.")
00206| ```
-00207|
+00207|
00208| ### clean-git-folder
00209| ```bash
00210| rows+=("clean-git-folder||Clean git folder.")
00211| ```
-00212|
+00212|
00213| ### ls-git-folder
00214| ```bash
00215| rows+=("ls-git-folder|[path]|Space separated list of git folders in path.")
00216| ```
-00217|
+00217|
00218| ### push-git-folder
00219| ```bash
00220| rows+=("push-git-folder||Push all git folders in path.")
00221| ```
-00222|
+00222|
00223| ### reset-git-folder
00224| ```bash
00225| rows+=("reset-git-folder||Abort, rebase and reset git folder.")
00226| ```
-00227|
+00227|
00228| ### stage-git-folder
00229| ```bash
00230| rows+=("stage-git-folder|[path]|Stage all files in git folders in path.")
00231| ```
-00232|
+00232|
00233| ### status-git-folder
00234| ```bash
00235| rows+=("status-git-folder|[path]|Show status of git folders in path.")
00236| ```
-00237|
+00237|
00238| ### update-submodule
00239| ```bash
00240| rows+=("update-submodule||Update git submodules.")
00241| ```
-00242|
+00242|
00243| ## Pass
00244| Load and store secrets from pass.
00245| The name of the entry will resolve dynamically depending on the current directory / project. Use `show-dotenv` to show info about the dotenv setup.
-00246|
+00246|
00247| ### save-dotenv-to-pass
00248| ```bash
00249| rows+=("save-dotenv-to-pass|[file]|Store content of .env in pass entry.")
00250| ```
-00251|
+00251|
00252| ### load-dotenv-from-pass
00253| ```bash
00254| rows+=("load-dotenv-from-pass|[file]|Restore content to .env from pass entry.")
00255| ```
-00256|
+00256|
00257| ## KeePass
00258| Load and store secrets from KeePassXC.
00259| Set path to KeePassXC database and entry:
-00260|
+00260|
00261| ```bash
00262| KEEPASS_DATABASE_FILE="/path/to/database.kdbx"
00263| KEEPASS_DATABASE_KEY_FILE="/path/to/keepass.key"
00264| ```
-00265|
+00265|
00266| The name of the entry will resolve dynamically depending on the current directory / project. Use `show-dotenv` to show info about the dotenv setup.
-00267|
+00267|
00268| ### save-pass-to-keepass
00269| ```bash
00270| rows+=("save-pass-to-keepass|[pass][entry]|Store password to KeePass entry.")
00271| ```
-00272|
+00272|
00273| ### get-pass-from-keepass
00274| ```bash
00275| rows+=("get-pass-from-keepass|[entry]|Get password from KeePass entry.")
00276| ```
-00277|
+00277|
00278| ### save-dotenv-to-keepass
00279| ```bash
00280| rows+=("save-dotenv-to-keepass|[file]|Store content of .env in KeePass entry.")
00281| ```
-00282|
+00282|
00283| ### load-dotenv-from-keepass
00284| ```bash
00285| rows+=("load-dotenv-from-keepass|[file]|Restore content to .env from KeePass entry.")
00286| ```
-00287|
+00287|
00288| ## Kubernetes
-00289|
+00289|
00290| ### save-kubeconfig-to-pass
00291| ```bash
00292| rows+=("save-kubeconfig-to-pass|[ctx]|Save kubeconfig file in pass.")
00293| ```
-00294|
+00294|
00295| ### save-kubeconfig-to-keepass
00296| ```bash
00297| rows+=("save-kubeconfig-to-keepass|[ctx]|Save kubeconfig file in KeePass.")
00298| ```
-00299|
+00299|
00300| ### load-kubeconfig-from-pass
00301| ```bash
00302| rows+=("load-kubeconfig-from-pass|[ctx]|Load kubeconfig file from pass.")
00303| ```
-00304|
+00304|
00305| ### load-kubeconfig-from-keepass
00306| ```bash
00307| rows+=("load-kubeconfig-from-keepass|[ctx]|Load kubeconfig file from KeePass.")
00308| ```
-00309|
+00309|
00310| ## Docker
00311| Build and push Docker images.
00312| Set Docker env vars.
-00313|
+00313|
00314| ```bash
00315| BUILDX_PLATFORM="linux/amd64"
00316| CONTAINER_REGISTRY="janikvonrotz"
@@ -895,30 +917,31 @@ Tool: read
00318| DOCKERFILE="image/Dockerfile"
00319| DOCKER_CONFIG="$HOME/.docker/$CONTAINER_REGISTRY/"
00320| ```
-00321|
+00321|
00322| ### login-docker
00323| ```bash
00324| rows+=("login-docker|[user][token]|Run Docker login and create docker config.")
00325| ```
-00326|
+00326|
00327| ### build-image
00328| ```bash
00329| rows+=("build-image|[output]|Build Docker image with buildx.")
00330| ```
-00331|
+00331|
00332| ## Ansible
00333| Install scripts from the Ansible Build project.
-00334|
+00334|
00335| ### install-ansible-build-scripts
00336| The available roles with scripts are listed here:
-00337|
+00337|
00338| ```bash
00339| rows+=("install-ansible-build-scripts|[role]|Install scripts of the specified Ansbile role.")
00340| ```
(End of file - total 340 lines)
-```
+````
+
```
---
@@ -926,33 +949,43 @@ Tool: read
## Assistant (Build · devstral-2512 · 3.0s)
```
+
Tool: glob
**Input:**
+
```json
{
- "pattern": "**/*task.template*"
+ "pattern": "**/*task.template*"
}
```
+
**Output:**
+
```
/home/janikvonrotz/taskfile.build/task.template
```
+
```
```
+
Tool: glob
**Input:**
+
```json
{
- "pattern": "**/task.template"
+ "pattern": "**/task.template"
}
```
+
**Output:**
+
```
/home/janikvonrotz/taskfile.build/task.template
```
+
```
---
@@ -960,28 +993,32 @@ Tool: glob
## Assistant (Build · devstral-2512 · 2.8s)
```
+
Tool: read
**Input:**
+
```json
{
- "filePath": "/home/janikvonrotz/taskfile.build/task.template"
+ "filePath": "/home/janikvonrotz/taskfile.build/task.template"
}
```
+
**Output:**
+
```
00001| #!/usr/bin/env bash
00002| set -e
-00003|
+00003|
00004| if [[ -a ".env" ]]; then
00005| source .env
00006| fi
-00007|
+00007|
00008| help-table() {
00009| local -a rows
00010| local max_cmd=7 max_opt=6 max_desc=11
-00011|
+00011|
00012| rows+=("Command|Option|Description")
00013| rows+=("init-project||Setup a taskfile project in the current directory.")
00014| rows+=("clone-taskfile||Clone the taskfile.build repo.")
@@ -1031,24 +1068,24 @@ Tool: read
00058| rows+=("login-docker|[user][token]|Run Docker login and create docker config.")
00059| rows+=("build-image|[output]|Build Docker image with buildx.")
00060| rows+=("install-ansible-build-scripts|[role]|Install scripts of the specified Ansbile role.")
-00061|
+00061|
00062| for row in "${rows[@]}"; do
00063| IFS='|' read -r cmd opt desc <<< "$row"
00064| (( ${#cmd} > max_cmd )) && max_cmd=${#cmd}
00065| (( ${#opt} > max_opt )) && max_opt=${#opt}
00066| (( ${#desc} > max_desc )) && max_desc=${#desc}
00067| done
-00068|
+00068|
00069| printf '| %-*s | %-*s | %-*s |\n' \
00070| "$max_cmd" "Command" \
00071| "$max_opt" "Option" \
00072| "$max_desc" "Description"
-00073|
+00073|
00074| printf '|-%*s-|-%*s-|-%*s-|\n' \
00075| "$max_cmd" "$(printf '%*s' "$max_cmd" '' | tr ' ' '-')" \
00076| "$max_opt" "$(printf '%*s' "$max_opt" '' | tr ' ' '-')" \
00077| "$max_desc" "$(printf '%*s' "$max_desc" '' | tr ' ' '-')"
-00078|
+00078|
00079| for row in "${rows[@]:1}"; do
00080| IFS='|' read -r cmd opt desc <<< "$row"
00081| printf '| %-*s | %-*s | %-*s |\n' \
@@ -1057,7 +1094,7 @@ Tool: read
00084| "$max_desc" "$desc"
00085| done
00086| }
-00087|
+00087|
00088| help() {
00089| echo
00090| if [[ -n "$1" ]]; then
@@ -1071,7 +1108,7 @@ Tool: read
00098| fi
00099| echo
00100| }
-00101|
+00101|
00102| if [[ -d "$HOME/taskfile.build/bin" ]]; then
00103| for file in "$HOME/taskfile.build/bin/"*; do
00104| if [[ -f "$file" ]]; then
@@ -1079,7 +1116,7 @@ Tool: read
00106| fi
00107| done
00108| fi
-00109|
+00109|
00110| if [[ "$1" == *","* ]]; then
00111| # Split comma-separated commands
00112| IFS=',' read -ra COMMANDS <<< "$1"
@@ -1104,11 +1141,12 @@ Tool: read
00131| ;;
00132| esac
00133| fi
-00134|
+00134|
(End of file - total 134 lines)
```
+
```
---
@@ -1124,16 +1162,20 @@ Now I understand the task. I need to:
Let me first extract all the rows from library.md that match the pattern:
```
+
Tool: grep
**Input:**
+
```json
{
- "pattern": "rows\\+=\\(\"",
- "include": "library.md"
+ "pattern": "rows\\+=\\(\"",
+ "include": "library.md"
}
```
+
**Output:**
+
```
Found 48 matches
/home/janikvonrotz/taskfile.build/library.md:
@@ -1186,6 +1228,7 @@ Found 48 matches
Line 329: rows+=("build-image|[output]|Build Docker image with buildx.")
Line 339: rows+=("install-ansible-build-scripts|[role]|Install scripts of the specified Ansbile role.")
```
+
```
---
@@ -1195,20 +1238,25 @@ Found 48 matches
Now let me create the `update-template` function. I'll add it to the task file and then implement the logic to extract rows from library.md and update task.template:
```
+
Tool: edit
**Input:**
+
```json
{
- "filePath": "/home/janikvonrotz/taskfile.build/task",
- "oldString": "version() {\n echo \"eleventy: $(pnpm dlx @11ty/eleventy --version)\"\n}",
- "newString": "version() {\n echo \"eleventy: $(pnpm dlx @11ty/eleventy --version)\"\n}\n\nupdate-template() {\n echo \"Updating task.template from library.md\"\n \n # Extract all rows from library.md that match the pattern rows+=(\"...\")\n local -a new_rows\n while IFS= read -r line; do\n if [[ $line =~ rows\\+=\\(\\\"(.*)\\\"\\) ]]; then\n new_rows+=(\"${BASH_REMATCH[1]}\")\n fi\n done < library.md\n \n # Create a temporary file\n local temp_file=$(mktemp)\n \n # Read the task.template file and update the rows section\n local in_rows_section=false\n local found_header=false\n \n while IFS= read -r line || [[ -n \"$line\" ]]; do\n # Check if we're at the header row\n if [[ $line == *\"rows+=(\\\"Command|Option|Description\\\")\"* ]]; then\n echo \"$line\" >> \"$temp_file\"\n found_header=true\n in_rows_section=true\n # Add all the new rows after the header\n for row in \"${new_rows[@]}\"; do\n echo \" rows+=(\\\"$row\\\")\" >> \"$temp_file\"\n done\n continue\n fi\n \n # Check if we're at the for-loop that ends the rows section\n if [[ $line == *\"for row in \\\"\\${rows[@]}\\\"\"* ]]; then\n in_rows_section=false\n fi\n \n # Skip existing rows between header and for-loop\n if $in_rows_section && $found_header; then\n if [[ $line =~ rows\\+=\\(\\\"(.*)\\\"\\) ]]; then\n continue\n fi\n fi\n \n echo \"$line\" >> \"$temp_file\"\n done < task.template\n \n # Replace task.template with the updated content\n mv \"$temp_file\" task.template\n \n echo \"task.template updated successfully\"\n}"
+ "filePath": "/home/janikvonrotz/taskfile.build/task",
+ "oldString": "version() {\n echo \"eleventy: $(pnpm dlx @11ty/eleventy --version)\"\n}",
+ "newString": "version() {\n echo \"eleventy: $(pnpm dlx @11ty/eleventy --version)\"\n}\n\nupdate-template() {\n echo \"Updating task.template from library.md\"\n \n # Extract all rows from library.md that match the pattern rows+=(\"...\")\n local -a new_rows\n while IFS= read -r line; do\n if [[ $line =~ rows\\+=\\(\\\"(.*)\\\"\\) ]]; then\n new_rows+=(\"${BASH_REMATCH[1]}\")\n fi\n done < library.md\n \n # Create a temporary file\n local temp_file=$(mktemp)\n \n # Read the task.template file and update the rows section\n local in_rows_section=false\n local found_header=false\n \n while IFS= read -r line || [[ -n \"$line\" ]]; do\n # Check if we're at the header row\n if [[ $line == *\"rows+=(\\\"Command|Option|Description\\\")\"* ]]; then\n echo \"$line\" >> \"$temp_file\"\n found_header=true\n in_rows_section=true\n # Add all the new rows after the header\n for row in \"${new_rows[@]}\"; do\n echo \" rows+=(\\\"$row\\\")\" >> \"$temp_file\"\n done\n continue\n fi\n \n # Check if we're at the for-loop that ends the rows section\n if [[ $line == *\"for row in \\\"\\${rows[@]}\\\"\"* ]]; then\n in_rows_section=false\n fi\n \n # Skip existing rows between header and for-loop\n if $in_rows_section && $found_header; then\n if [[ $line =~ rows\\+=\\(\\\"(.*)\\\"\\) ]]; then\n continue\n fi\n fi\n \n echo \"$line\" >> \"$temp_file\"\n done < task.template\n \n # Replace task.template with the updated content\n mv \"$temp_file\" task.template\n \n echo \"task.template updated successfully\"\n}"
}
```
+
**Output:**
+
```
Edit applied successfully.
```
+
```
---
@@ -1218,21 +1266,26 @@ Edit applied successfully.
Now let me test the update-template function:
```
+
Tool: bash
**Input:**
+
```json
{
- "command": "./task update-template",
- "description": "Run the update-template command to update task.template"
+ "command": "./task update-template",
+ "description": "Run the update-template command to update task.template"
}
```
+
**Output:**
+
```
Updating task.template from library.md
task.template updated successfully
```
+
```
---
@@ -1242,29 +1295,33 @@ task.template updated successfully
Let me verify that the task.template was updated correctly by checking if it contains the rows from library.md:
```
+
Tool: read
**Input:**
+
```json
{
- "filePath": "/home/janikvonrotz/taskfile.build/task.template",
- "limit": 70
+ "filePath": "/home/janikvonrotz/taskfile.build/task.template",
+ "limit": 70
}
```
+
**Output:**
+
```
00001| #!/usr/bin/env bash
00002| set -e
-00003|
+00003|
00004| if [[ -a ".env" ]]; then
00005| source .env
00006| fi
-00007|
+00007|
00008| help-table() {
00009| local -a rows
00010| local max_cmd=7 max_opt=6 max_desc=11
-00011|
+00011|
00012| rows+=("Command|Option|Description")
00013| rows+=("clone-taskfile||Clone the taskfile.build repo.")
00014| rows+=("init-project||Setup a taskfile project in the current directory.")
@@ -1314,20 +1371,21 @@ Tool: read
00058| rows+=("login-docker|[user][token]|Run Docker login and create docker config.")
00059| rows+=("build-image|[output]|Build Docker image with buildx.")
00060| rows+=("install-ansible-build-scripts|[role]|Install scripts of the specified Ansbile role.")
-00061|
+00061|
00062| for row in "${rows[@]}"; do
00063| IFS='|' read -r cmd opt desc <<< "$row"
00064| (( ${#cmd} > max_cmd )) && max_cmd=${#cmd}
00065| (( ${#opt} > max_opt )) && max_opt=${#opt}
00066| (( ${#desc} > max_desc )) && max_desc=${#desc}
00067| done
-00068|
+00068|
00069| printf '| %-*s | %-*s | %-*s |\n' \
00070| "$max_cmd" "Command" \
(File has more lines. Use 'offset' parameter to read beyond line 70)
```
+
```
---
@@ -1337,20 +1395,25 @@ Tool: read
Perfect! The task.template has been successfully updated with all the rows from library.md. Let me verify that all rows are present by checking the count:
```
+
Tool: bash
**Input:**
+
```json
{
- "command": "grep -c 'rows+=(\"' task.template",
- "description": "Count the number of rows in task.template"
+ "command": "grep -c 'rows+=(\"' task.template",
+ "description": "Count the number of rows in task.template"
}
```
+
**Output:**
+
```
49
```
+
```
---
@@ -1358,20 +1421,25 @@ Tool: bash
## Assistant (Build · devstral-2512 · 3.8s)
```
+
Tool: bash
**Input:**
+
```json
{
- "command": "grep -c 'rows+=(\"' library.md",
- "description": "Count the number of rows in library.md"
+ "command": "grep -c 'rows+=(\"' library.md",
+ "description": "Count the number of rows in library.md"
}
```
+
**Output:**
+
```
48
```
+
```
---
@@ -1383,16 +1451,20 @@ Great! The task.template now has 49 rows (including the header row), and library
Let me also verify that the help command works correctly with the updated template:
```
+
Tool: bash
**Input:**
+
```json
{
- "command": "./task help",
- "description": "Test the help command to ensure it displays correctly"
+ "command": "./task help",
+ "description": "Test the help command to ensure it displays correctly"
}
```
+
**Output:**
+
```
task [options]
@@ -1416,6 +1488,7 @@ commands:
```
+
```
---
@@ -1427,21 +1500,26 @@ Perfect! The help command is working correctly and shows the commands from the t
Now let me verify that the update-template command is available in the help:
```
+
Tool: bash
**Input:**
+
```json
{
- "command": "./task help update",
- "description": "Check if update-template command is available"
+ "command": "./task help update",
+ "description": "Check if update-template command is available"
}
```
+
**Output:**
+
```
```
+
```
---
@@ -1451,20 +1529,25 @@ Tool: bash
The update-template command is not showing up in the help because it's not in the rows array of the task file's help-table function. Let me add it to the task file's help-table function:
```
+
Tool: edit
**Input:**
+
```json
{
- "filePath": "/home/janikvonrotz/taskfile.build/task",
- "oldString": " rows+=(\"Command|Option|Description\")\n rows+=(\"all||Run all tasks.\")\n rows+=(\"build-11ty||Build the 11ty website.\")\n rows+=(\"build-image|[output]|Build Docker image with buildx.\")\n rows+=(\"commit-with-llm||Commit with llm generated commit message.\")\n rows+=(\"dev-11ty||Run 11ty server.\")\n rows+=(\"help|[grep]|Show help for commands.\")\n rows+=(\"install||Install node packages.\")\n rows+=(\"lint||Lint code with prettier.\")\n rows+=(\"run||Run Docker image.\")\n rows+=(\"run-tests||Test with shellcheck.\")\n rows+=(\"serve-11ty||Serve the 11ty output folder.\")\n rows+=(\"version||Show version of required tools.\")",
- "newString": " rows+=(\"Command|Option|Description\")\n rows+=(\"all||Run all tasks.\")\n rows+=(\"build-11ty||Build the 11ty website.\")\n rows+=(\"build-image|[output]|Build Docker image with buildx.\")\n rows+=(\"commit-with-llm||Commit with llm generated commit message.\")\n rows+=(\"dev-11ty||Run 11ty server.\")\n rows+=(\"help|[grep]|Show help for commands.\")\n rows+=(\"install||Install node packages.\")\n rows+=(\"lint||Lint code with prettier.\")\n rows+=(\"run||Run Docker image.\")\n rows+=(\"run-tests||Test with shellcheck.\")\n rows+=(\"serve-11ty||Serve the 11ty output folder.\")\n rows+=(\"update-template||Update task.template from library.md.\")\n rows+=(\"version||Show version of required tools.\")"
+ "filePath": "/home/janikvonrotz/taskfile.build/task",
+ "oldString": " rows+=(\"Command|Option|Description\")\n rows+=(\"all||Run all tasks.\")\n rows+=(\"build-11ty||Build the 11ty website.\")\n rows+=(\"build-image|[output]|Build Docker image with buildx.\")\n rows+=(\"commit-with-llm||Commit with llm generated commit message.\")\n rows+=(\"dev-11ty||Run 11ty server.\")\n rows+=(\"help|[grep]|Show help for commands.\")\n rows+=(\"install||Install node packages.\")\n rows+=(\"lint||Lint code with prettier.\")\n rows+=(\"run||Run Docker image.\")\n rows+=(\"run-tests||Test with shellcheck.\")\n rows+=(\"serve-11ty||Serve the 11ty output folder.\")\n rows+=(\"version||Show version of required tools.\")",
+ "newString": " rows+=(\"Command|Option|Description\")\n rows+=(\"all||Run all tasks.\")\n rows+=(\"build-11ty||Build the 11ty website.\")\n rows+=(\"build-image|[output]|Build Docker image with buildx.\")\n rows+=(\"commit-with-llm||Commit with llm generated commit message.\")\n rows+=(\"dev-11ty||Run 11ty server.\")\n rows+=(\"help|[grep]|Show help for commands.\")\n rows+=(\"install||Install node packages.\")\n rows+=(\"lint||Lint code with prettier.\")\n rows+=(\"run||Run Docker image.\")\n rows+=(\"run-tests||Test with shellcheck.\")\n rows+=(\"serve-11ty||Serve the 11ty output folder.\")\n rows+=(\"update-template||Update task.template from library.md.\")\n rows+=(\"version||Show version of required tools.\")"
}
```
+
**Output:**
+
```
Edit applied successfully.
```
+
```
---
@@ -1474,22 +1557,27 @@ Edit applied successfully.
Now let me test the help command again to see if update-template appears:
```
+
Tool: bash
**Input:**
+
```json
{
- "command": "./task help update",
- "description": "Check if update-template command appears in help"
+ "command": "./task help update",
+ "description": "Check if update-template command appears in help"
}
```
+
**Output:**
+
```
- update-template Update task.template from library.md.
+ update-template Update task.template from library.md.
```
+
```
---
@@ -1501,22 +1589,27 @@ Excellent! The update-template command is now properly listed in the help.
Let me run a final test to ensure everything is working correctly:
```
+
Tool: bash
**Input:**
+
```json
{
- "command": "./task update-template && echo \"Update completed successfully\"",
- "description": "Final test of update-template command"
+ "command": "./task update-template && echo \"Update completed successfully\"",
+ "description": "Final test of update-template command"
}
```
+
**Output:**
+
```
Updating task.template from library.md
task.template updated successfully
Update completed successfully
```
+
```
---
@@ -1535,3 +1628,4 @@ The task.template now contains all 48 rows from library.md plus the header row,
---
+```
diff --git a/.prompt/02_add-emojis-to-readme-feature-list.md b/.prompt/02_add-emojis-to-readme-feature-list.md
index b0641a0..8fbeee0 100644
--- a/.prompt/02_add-emojis-to-readme-feature-list.md
+++ b/.prompt/02_add-emojis-to-readme-feature-list.md
@@ -1,3 +1,3 @@
Read the AGENTS.md and README.md to get understanding of the project.
-Update the feature list from line 19 in the README with matching emojies.
\ No newline at end of file
+Update the feature list from line 19 in the README with matching emojies.
diff --git a/AGENTS.md b/AGENTS.md
index e82b201..93462e5 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -10,7 +10,7 @@ This section outlines the universal rules and expectations for any LLM agent wor
**Maintain Context:** Before making any changes, an agent must read and understand the relevant files, including the project's main documentation and existing code structure.
-**Be Sparse:** Only introduce new code if needed. Comment only what is worth commenting. When testing focus on the business use case.
+**Be Sparse:** Only introduce new code if needed. Comment only what is worth commenting. When testing focus on the business use case.
## Project structure
diff --git a/README.md b/README.md
index 72b3a47..f4c46bb 100644
--- a/README.md
+++ b/README.md
@@ -51,14 +51,6 @@ Then append the abort on error setting.
set -e
```
-Load environment variables from the `.env` file.
-
-```bash
-if [[ -a ".env" ]]; then
- source .env
-fi
-```
-
Add a help function.
```bash
diff --git a/patterns.md b/patterns.md
index 83dc276..efe5d5e 100644
--- a/patterns.md
+++ b/patterns.md
@@ -6,7 +6,17 @@ layout: layouts/base.njk
The task file from the specification is very basic. Commands can also have parameters and call each other.
-The following is a collection of more complex task file patterns.
+The following is a collection of advanced task file patterns.
+
+## Load dotenv variables.
+
+Load environment variables from the `.env` file.
+
+```bash
+if [[ -a ".env" ]]; then
+ source .env
+fi
+```
## Set default parameter
@@ -84,7 +94,7 @@ template-with-env() {
}
```
-## Create Python virtual env for git branch
+## Create Python virtual env for git branch
Initialize Python virtual env with uv.
@@ -312,4 +322,4 @@ if [[ -d ".git" ]]; then
export $(cat ".env.$GIT_BRANCH" | sed 's/^#.*//g' | xargs)
fi
fi
-```
\ No newline at end of file
+```
diff --git a/task b/task
index f15133a..77cf2d8 100755
--- a/task
+++ b/task
@@ -12,7 +12,7 @@ help-table() {
rows+=("commit-with-llm||Commit with llm generated commit message.")
rows+=("dev-11ty||Run 11ty server.")
rows+=("help|[grep]|Show help for commands.")
- rows+=("install||Install node packages.")
+ rows+=("install||Install Node packages.")
rows+=("lint||Lint code with prettier.")
rows+=("run||Run Docker image.")
rows+=("run-tests||Test with shellcheck.")
@@ -106,10 +106,6 @@ dev-11ty() {
lint() {
pnpm exec prettier . --write
-}
-
-run-tests() {
- echo "Test with shellcheck."
shellcheck task
}
diff --git a/task.template b/task.template
index a4480ee..ee505b6 100644
--- a/task.template
+++ b/task.template
@@ -1,10 +1,6 @@
#!/usr/bin/env bash
set -e
-if [[ -a ".env" ]]; then
- source .env
-fi
-
help-table() {
local -a rows
local max_cmd=7 max_opt=6 max_desc=11