Skip to content
Edit this page

Library

In your Taskfile source commands from the taskfile.build library by adding:

if [[ -d "$HOME/taskfile.build/bin" ]]; then
    for file in "$HOME/taskfile.build/bin/"*; do
        if [[ -f "$file" ]]; then
            source "$file"
        fi
    done
fi

With these instructions you have access to all commands documented on this page.

Aliases

Every command in the library also set an alias derived from the first letters of each word. For example, commit-with-llm can also be invoked as cwl.

Aliases are appended to each script and pass through arguments:

cwl() {
    commit-with-llm "$@"
}

If two commands would map to the same alias, the alias is extended with additional letters from the first conflicting word until it is unique. Aliases that would shadow standard shell commands (e.g. cd, ls, cp) are also extended to avoid collisions.

Run task list-aliases to list all aliases.

av='activate-venv'
agf='add-git-folder'
agm='add-git-merge'
agr='add-git-remote'
aggf='aggregate-git-folders'

Project

Most commands can be configured by setting enviroment vars.

OPEN_BROWSER=False # Default: True
TASK_DOTENV_DIR="$HOME/Odoo-Build/config" # Default: "$HOME/.config/taskfile.build"
rows+=("clone-taskfile||Clone the taskfile.build repo.")
rows+=("init-project||Setup a taskfile project.")
rows+=("init-dotenv-dir||Setup task dotenv dir.")
rows+=("template-dotenv||Generate .env from .env.template.")
rows+=("open-with-os|<path>|Open file or url with default application.")
rows+=("open-url|<url>|Open url.")
rows+=("setup-completion|[shell]|Show shell completion instructions.")
rows+=("list-aliases|[grep]|List all library command aliases.")
rows+=("check-help-width||Show help lines that exceed terminal width.")
rows+=("update-project|[task][AGENTS.md][.gitignore][path]|Update the project taskfile.")
rows+=("template-project-task|[path]|Assemble task file from template.")
rows+=("template-project-agents|[path]|Assemble AGENTS.md from template.")
rows+=("template-project-gitignore|[path]|Assemble .gitignore from template.")
rows+=("template-project-license|[path]|Assemble LICENSE from template.")
rows+=("get-project-name||Print resolved project name.")

clone-taskfile

init-project

init-dotenv-dir

template-dotenv

open-with-os

open-url

setup-completion

list-aliases

check-help-width

update-project

template-project-task

template-project-agents

template-project-gitignore

template-project-license

get-project-name

Resolves the project name. Priority: $PROJECT_NAME, git remote origin URL basename, current directory name.

Files

Managing files and directories.

rows+=("ensure-directory|<path>|Ensure directory path exists.")
rows+=("create-symlink|<source><target>|Remove file/directory and create symlink.")
rows+=("create-symlink-files|<source><target>|Create symlink for files in source pattern.")
rows+=("copy-to-clipboard||Copy stdin to clipboard.")
rows+=("copy-path|[-r] [path]|Copy path to clipboard, home shortened to ~.")

ensure-directory

create-symlink

create-symlink-files

copy-to-clipboard

copy-path

Resolves the given path (default .) to an absolute path and copies it to the clipboard without a trailing newline. A path inside the home directory is shortened to ~/…. Prints the copied path. With -r the path is kept relative to the current directory instead, e.g. docs/library.md instead of ~/taskfile.build/docs/library.md.

task copy-path [-r] <path>

Markdown

Read and write YAML frontmatter values in Markdown files.

rows+=("get-frontmatter-field|<file> <field>|Read a single frontmatter field value.")
rows+=("set-frontmatter-field|<file> <versions>|Write versions list to frontmatter.")
rows+=("filter-files-frontmatter|<path><expr>|Filter files by frontmatter expression.")

get-frontmatter-field

Reads a single scalar frontmatter field value from a Markdown file. The value is extracted from the YAML block between --- delimiters. Surrounding quotes are stripped.

set-frontmatter-field

Replaces the versions: block inside a Markdown file's frontmatter with a new list of version strings. The command takes a file path followed by one or more version values.

filter-files-frontmatter

Prints the paths of all Markdown files in <path> whose frontmatter matches <expr>. The expression uses the Docker CLI style key=value, key!=value and key=~regex. The space separated form key == value is also accepted. See docs/patterns.md for details.

Python

Setup Python virtual enviroment.

rows+=("activate-venv||Activate or initialize Python virtual env.")
rows+=("remove-venv||Remove the Python virtual env.")

activate-venv

remove-venv

Jupyter

Setup and run Jupyter notebooks.

rows+=("start-jupyter-lab|[env]|Start Jupyter Lab server.")
rows+=("install-jupyter-lab||Install Jupyter Lab and dependencies.")
rows+=("run-jupyter-notebook|<path>[env]|Execute notebook with papermill.")

start-jupyter-lab

install-jupyter-lab

run-jupyter-notebook

Environment

Manage .env files in the task dotenv dir and the current project.

TASK_DOTENV_DIR="$HOME/Odoo-Build/config" # Default: "$HOME/.config/taskfile.build"

Dotenv files with sops markers are encrypted with sops and age.

rows+=("create-dotenv|<env><template>[-g]|Create .env file from templates.")
rows+=("list-dotenv|[-g]|List dotenv files.")
rows+=("show-dotenv|<env>|Output content of the .env file(s).")
rows+=("copy-dotenv|<env><env>|Copy .env file.")
rows+=("edit-dotenv|<env>|Open .env file in default editor.")
rows+=("load-dotenv|<env>|Load and export unset .env variables.")
rows+=("init-dotenv-sops||Initialize age key and sops config.")
rows+=("show-project-setup||Show project setup info.")
rows+=("rename-dotenv|<env><env>|Rename .env file.")
rows+=("remove-dotenv|<env>|Remove .env file.")
rows+=("backup-dotenv-files|<path>|Archive .env files to target.")
rows+=("restore-dotenv-files|<path>|Extract and copy .env files from backup.")

create-dotenv

Available templates are defined in templates/:

nextcloud.env  odoo.env  upgrade.env

By default the .env file is created in the current directory. Use the -g / --global flag to store it in TASK_DOTENV_DIR instead.

The file is encrypted with sops after creation when a creation_rules entry in .sops.yaml has a path_regex that matches the file name (see init-dotenv-sops). Otherwise the file is created as plain text.

list-dotenv

Lists *.env and legacy .env.* files from the current directory. A plain .env file is listed with the name .. Use the -g / --global flag to list the files in TASK_DOTENV_DIR instead.

show-dotenv

Accepts a single env name or a comma-separated list of env names. Files with sops markers are decrypted with sops before printing.

copy-dotenv

Copies a dotenv file to a new name. Accepts the name with or without the .env suffix. Use . as the source name to copy the plain .env file. If the source is located in the current directory the copy is written next to it, otherwise the copy is written to TASK_DOTENV_DIR.

copy-dotenv smartme-ecarup-staging.env smartme-ecarup

edit-dotenv

Accepts the env name (prod), the file name (prod.env) or a path to the file. Files with sops markers are opened with sops for decrypted editing.

load-dotenv

Accepts a single env name or a comma-separated list of env names. Files with sops markers are decrypted with sops before sourcing. Use . as the env name to load the plain .env file.

Variables that are already set are skipped and keep their current value. Set means present in the environment, an exported empty value also counts as set. This lets a process, container or earlier dotenv file take precedence over a file value.

export ODOO_URL="http://odoo:8069"
load-dotenv erp-staging # ODOO_URL from the file is ignored

Files are processed in the given order, so the first file that defines a variable wins.

init-dotenv-sops

Generates an age key for the project based on the git URL and creates .sops.yaml. The private key is appended to the sops default location ~/.config/sops/age/keys.txt. A custom key name can be given as the first argument; the default is the project name.

show-project-setup

Displays the project name, dotenv, KeePass / Pass entries, age key file, age keys that are referenced in .sops.yaml, .sops.yaml config and key status.

rename-dotenv

remove-dotenv

backup-dotenv-files

restore-dotenv-files

LLM

Commands that integrate the llm cli.

rows+=("commit-with-llm|[-m]|Commit with llm generated commit message.")
rows+=("select-llm-model||Select configured llm model from fzf list.")
rows+=("update-with-llm|<glob><prompt>|Feed files matching glob to llm.")
rows+=("update-changelog-with-llm|[num_lines]|Update CHANGELOG.md from git diff using llm.")

commit-with-llm

Use the -m / --model flag to select a model from an fzf dialog. The available models are listed by llm models list.

select-llm-model

Prints the selected model ID to stdout, so it can be used inline:

llm -m "$(task select-llm-model)" "my prompt"

The list is restricted to the models configured in extra-openai-models.yaml. If that file is missing or lists no models, all models from llm models list are shown.

update-with-llm

The last parameter can be either a direct prompt string or a path to a text file containing the prompt.

update-changelog-with-llm

Prompt

Create and track prompt.md files.

rows+=("init-prompt-log||Initialize prompt-log branch and worktree.")
rows+=("pull-prompt-log|[path]|Pull prompt-log from origin.")
rows+=("push-prompt-log|[path]|Push prompt-log to origin.")
rows+=("probe-prompt-log-remote|[path]|Check whether the prompt-log remote is reachable.")
rows+=("create-prompt|<title>[path]|Create prompt.md from template.")
rows+=("prompt-with-pi|[-l][-m][-n][path]|Run pi with prompt.md.")
rows+=("run-nono-pi|[args]|Run pi inside the nono sandbox.")
rows+=("select-pi-model||Select pi model from fzf list.")
rows+=("commit-prompt|[path]|Commit prompt.md to prompt-log branch.")
rows+=("list-prompts|[-f <expr>][path]|List prompts from prompt-log branch.")
rows+=("list-pi-sessions|[-f <expr>][path]|List pi sessions.")
rows+=("reset-prompt|[path]|Reset project and keep ## Task section.")
rows+=("load-prompt|[-f <expr>][path]|Load prompt from prompt-log into prompt.md.")
rows+=("edit-prompt|[commit][path]|Edit prompt in prompt-log worktree.")
rows+=("show-prompt|[commit][path]|Show prompt content from prompt-log.")
rows+=("delete-prompt|[commit][path]|Delete prompt from prompt-log.")
rows+=("cancel-prompt|[path]|Cancel prompt and set state to cancelled.")
rows+=("convert-prompts-folder-to-prompt-log|[path]|Convert prompts folder to prompt-log.")

init-prompt-log

pull-prompt-log

push-prompt-log

probe-prompt-log-remote

commit-prompt and push-prompt-log probe the host of the origin remote with probe-prompt-log-remote before pushing. The host and port are read from remote.origin.url, so self-hosted remotes such as ssh://git@host:10007/group/repo.git are probed on their own port. If the host is unreachable, the commit is kept locally and the push is skipped. Run task push-prompt-log to push the pending commits once the host is reachable again.

create-prompt

prompt-with-pi

Use the -l / --load flag to run load-prompt before starting pi. When -l is given without -f, prompts with state: completed are filtered out.

If the prompt frontmatter has a session_id, pi asks Return to session <session_id>? [Y/n]. Answering Y or pressing enter resumes the session with --session <session_id> and passes no prompt, because the session already holds it. Answering n starts a new session with the prompt.

Use the -m / --model flag to select a model from an fzf dialog. The available models are read from ~/.pi/agent/models.json and pi is started with the selected model.

Starts pi through nono run --profile pi --allow-cwd -- so the session is sandboxed by default. It keeps an existing nono layer and fails when nono is not installed.

Use the -n / --no-sandbox flag to start pi on the host instead, with extensions enabled. It reports the sandbox layer it detects (nono) and prints Running unsandboxed: nono is not installed. when nono is absent. nono runs pi as its child process, so the flag can only report an active nono sandbox, not remove it.

run-nono-pi

Runs nono run --profile pi --allow-cwd -- pi so pi is confined by the nono sandbox. When the project root holds a nono.json, that profile is used instead of pi. Aliases: np, rnp. All arguments are forwarded to pi unchanged. nono is the parent process, so the sandbox has to wrap the pi invocation instead of being enabled from inside pi. --allow-cwd grants the current project folder; without it nono starts pi at /.

Fails when nono is missing or when the session already runs inside the sandbox, because a sandbox cannot be dropped from within. prompt-with-pi wraps pi in nono itself, so pwp from a host shell is sandboxed as well.

select-pi-model

Lists the models as provider/id [provider], matching the format of pi's /model command. The dialog only shows this label; the model ID is passed in a tab separated second column that --with-nth=1 hides and is printed on selection.

Prints the selected model ID to stdout, so it can be used inline:

pi --model "$(task select-pi-model)" "my prompt"

commit-prompt

list-prompts

Use -f / --filter with a frontmatter expression to only show matching prompts, e.g. task list-prompts -f state=draft. See filter-files-frontmatter.

The table is capped to the terminal width. Long titles are truncated with .... The width is read from COLUMNS, falling back to tput cols and then 80.

list-pi-sessions

Lists the pi sessions in ~/.pi/agent/sessions with their date, project and id. The date and id are taken from the session file name, the project from the cwd recorded in the session file.

Use -f / --filter with key=value or key!=value to filter on date, project or id, e.g. task list-pi-sessions -f project=taskfile.build.

The table is capped to the terminal width and long project names are truncated with .... The cwd is read from the first line of each session file with a bash read instead of sed/basename forks, since the loop runs over every session.

reset-prompt

Extracts the ## Task section, runs git checkout . and git clean -df (excluding the prompt file and the frontmatter task entry), then writes a fresh prompt from the template of the prompt's action with the task section inserted. The title and author are kept, frontmatter state and session details are reset.

load-prompt

Use -f / --filter with a frontmatter expression like state != completed. Supported operators: ==, !=, =~ (regex). The filter is delegated to filter-files-frontmatter.

edit-prompt

show-prompt

delete-prompt

cancel-prompt

Shows an fzf dialog with all non-completed prompts and sets the selected prompt's state to cancelled.

convert-prompts-folder-to-prompt-log

Logging

Colorful logging in task commands.

rows+=("log-error||Colored output for errors.")
rows+=("log-success||Colored output for success.")
rows+=("log-warning||Colored output for warnings.")

log-error

log-success

log-warning

Git

These commands replace the git submodule command. The commands store and retrieve additional information from the .gitmodules file.

Set Git SSH deploy key env vars for add-ssh-key:

GIT_SSH_PUBLIC_KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFM2dT27qOOiKHZfecvzlh+oAgzxwxC+G9uFp9g9VZxw Taskfile-Build-Demo"
GIT_SSH_PRIVATE_KEY="LS0tLS1CRUdJTiBPUEVOU1NIIFBSSVZBVEUgS0VZLS0tLS0K..."
SSH_ID_ALGORITHM="id_ed25519"
GIT_SSH_HOST="github.com"
GIT_SSH_CONFIG="Host github.com\n  Hostname ssh.github.com\n  Port 443\n  User git"
  • GIT_SSH_PUBLIC_KEY: Public key of the deploy key. Optional.
  • GIT_SSH_PRIVATE_KEY: Base64 encoded private key: cat ~/.ssh/id_ed25519 | base64 -w0.
  • SSH_ID_ALGORITHM: Filename of the key in ~/.ssh. Default is id_ed25519.
  • GIT_SSH_HOST: Hostname scanned into ~/.ssh/known_hosts.
  • GIT_SSH_CONFIG: Content of ~/.ssh/config.
rows+=("add-git-folder|<url><branch><path>|Add git folder to .gitmodules.")
rows+=("add-git-merge|<remote><merge><path>|Add git merge ref in .gitmodules.")
rows+=("add-git-remote|<remote><url><path>|Add git remote to git folder.")
rows+=("merge-git-remote||Merge remotes and refs in .gitmodules.")
rows+=("aggregate-git-folders|<path>|Run gitaggregate for the repos.yaml.")
rows+=("commit-git-folder|<path><message>|Commit changes of git folders.")
rows+=("clean-git-folder|<path>|Clean git folder.")
rows+=("checkout-git-folder|<branch><path>|Checkout git commit or branch.")
rows+=("clone-git-folder|<path>|Clone git folder.")
rows+=("download-git-folder|<path>|Download git folder.")
rows+=("find-git-folder|<path>|Find all .git folders in path.")
rows+=("add-ssh-key||Add SSH deploy key from env vars.")
rows+=("generate-ssh-key||Generate ssh key pair.")
rows+=("list-git-folder|<path>|List path and url of git folders.")
rows+=("ls-git-folder|<grep>|List git folders.")
rows+=("pull-git-folder|<branch><path>|Pull all git folders.")
rows+=("pull-all-repos||Pull all git repos.")
rows+=("switch-git-folder|<branch><path>|Switch branch for git folders.")
rows+=("push-git-folder|<path>|Push all git folders.")
rows+=("remove-git-folder|<path>|Remove git folders in path.")
rows+=("reset-git-folder|<path>|Abort and reset git folders.")
rows+=("run-pre-commit|<path>|Run pre-commit in path.")
rows+=("stage-git-folder|<path>|Stage all files in git folders.")
rows+=("status-git-folder|<path>|Show status of git folders.")
rows+=("status-all-repos||Show status of all git repos.")
rows+=("save-git-folder||Save commit refs to .gitmodules.")
rows+=("update-submodule||Update git submodules.")
rows+=("unshallow-git-folder||Fetch with unshallow and fix config.")

add-git-folder

add-git-merge

add-git-remote

merge-git-remote

aggregate-git-folders

commit-git-folder

clean-git-folder

checkout-git-folder

clone-git-folder

download-git-folder

find-git-folder

add-ssh-key Creates ~/.ssh, writes the public key, the base64 decoded private key and the ssh config, scans GIT_SSH_HOST into known_hosts and starts an ssh-agent with the key. Prints the agent environment, evaluate it with eval "$(add-ssh-key)" to make SSH_AUTH_SOCK available to later git calls.

generate-ssh-key

list-git-folder

ls-git-folder

pull-git-folder

pull-all-repos

switch-git-folder

push-git-folder

remove-git-folder

reset-git-folder

run-pre-commit

stage-git-folder

status-git-folder

status-all-repos

save-git-folder

update-submodule

unshallow-git-folder

KeePass

Load and store secrets from KeePassXC.

The commands will prompt you to select a KeePassXC database using fzf. You can optionally select a key file as well.

The name of the entry will resolve dynamically depending on the current directory / project. Use show-project-setup to show info about the project setup.

rows+=("select-keepass-database||Select KeePassXC database and key file with fzf.")
rows+=("save-password-to-keepass|<password><entry>|Store password to KeePass entry.")
rows+=("get-password-from-keepass|<entry>[db-pass]|Get password from KeePass entry.")
rows+=("save-dotenv-to-keepass|[file]|Store content of .env in KeePass entry.")
rows+=("load-dotenv-from-keepass|[file]|Restore content of .env from KeePass entry.")
rows+=("store-agekey-to-keepass|[name]|Store age key for the project in KeePass.")
rows+=("load-agekey-from-keepass|[name]|Restore age private key from KeePass.")

select-keepass-database

Interactively select a KeePassXC database and optional key file using fzf. The command searches $HOME (max 5 levels deep) for .kdbx and .key files, excluding hidden folders and paths containing tmp. Outputs environment variable exports that can be evaluated.

Set FORCE_INTERACTIVE=1 to force fzf selection even in non-interactive contexts.

save-password-to-keepass

get-password-from-keepass

If a database password (db-pass) is provided as the second argument, it is piped to keepassxc-cli.

save-dotenv-to-keepass

load-dotenv-from-keepass

store-agekey-to-keepass

Reads the key block from ~/.config/sops/age/keys.txt, stores the secret key in the entry's password field and attaches the key block as keys.txt to the age/<project> KeePass entry. A sub path can be passed as the first argument to store a sub key, e.g. task store-agekey-to-keepass app stores the age/<project>/app entry.

load-agekey-from-keepass

Restores the age key attachment from the age/<project> KeePass entry and merges it into ~/.config/sops/age/keys.txt. A sub path can be passed as the first argument to restore a sub key, e.g. task load-agekey-from-keepass app.

Kubernetes

Manage kube config files and namespaces.

rows+=("get-kubeconfig||Show active kubeconfig.")
rows+=("list-kubeconfigs|<path>|List kubeconfig files.")
rows+=("switch-kubeconfig|<path>|Switch kubeconfig file.")
rows+=("generate-kubeconfig|<sa><path>|Generate kubeconfig for service account.")
rows+=("save-kubeconfig-to-keepass|[ctx]|Save kubeconfig file in KeePass.")
rows+=("load-kubeconfig-from-keepass|[ctx]|Load kubeconfig file from KeePass.")
rows+=("select-kubectl-namespace||Select namespace with fzf and set context.")

get-kubeconfig

Shows the active kubeconfig file by resolving the $HOME/.kube/config symlink, or none if no kubeconfig is set.

list-kubeconfigs

Lists all kubeconfig files matching */kube/config*.yaml below the given path, excluding decrypted copies.

switch-kubeconfig

Switches the active kubeconfig by symlinking $HOME/.kube/config to the target file. Encrypted files are decrypted first, then the namespace can be selected interactively.

generate-kubeconfig

save-kubeconfig-to-keepass

load-kubeconfig-from-keepass

select-kubectl-namespace

Lists all namespaces with kubectl get namespaces, presents an fzf selection dialog and sets the current context namespace with kubectl config set-context --current --namespace.

Docker

Build and push Docker images. Set Docker env vars.

BUILDX_PLATFORM="linux/amd64"
CONTAINER_REGISTRY="mintsystem"
CONTAINER_TAG="taskfile.build:latest"
DOCKERFILE="image/Dockerfile"
DOCKER_CONFIG="$HOME/.docker/$CONTAINER_REGISTRY/"
rows+=("login-docker|[user][token]|Run Docker login and create docker config.")
rows+=("build-image|[output]|Build Docker image with buildx.")

login-docker

build-image

11ty

Build static sites with 11ty.

rows+=("init-11ty-docs||Install 11ty with pnpm.")
rows+=("dev-11ty-docs||Run 11ty development server.")
rows+=("build-11ty-docs||Build the 11ty website.")
rows+=("serve-11ty-docs||Serve the 11ty output folder.")

init-11ty-docs

dev-11ty-docs

build-11ty-docs

serve-11ty-docs

Zensical

Build static sites with Zensical.

rows+=("init-zensical-docs||Initialize Zensical documentation build deps.")
rows+=("dev-zensical-docs||Run Zensical development server.")
rows+=("build-zensical-docs||Build the Zensical docs site.")
rows+=("serve-zensical-docs||Serve the Zensical documentation build.")

init-zensical-docs

dev-zensical-docs

build-zensical-docs

serve-zensical-docs

Vitepress

Build static sites with Vitepress.

rows+=("init-vitepress-docs||Install Vitepress build dependencies.")
rows+=("dev-vitepress-docs||Start Vitepress development server.")
rows+=("build-vitepress-docs||Create Vitepress build.")
rows+=("serve-vitepress-docs||Serve Vitepress build.")

init-vitepress-docs

dev-vitepress-docs

build-vitepress-docs

serve-vitepress-docs

Vuepress

Build static sites with Vuepress.

rows+=("init-vuepress-docs||Install Vuepress build dependencies.")
rows+=("dev-vuepress-docs||Start Vuepress development server.")
rows+=("build-vuepress-docs||Create Vuepress build.")
rows+=("serve-vuepress-docs||Serve Vuepress build.")

init-vuepress-docs

dev-vuepress-docs

build-vuepress-docs

serve-vuepress-docs

Hugo

Build static sites with Hugo.

Set Hugo env vars:

HUGO_VERSION="0.153.5" # Default: 0.153.5
BASE_URL="http://localhost:1313" # Default: http://localhost:1313
rows+=("install-hugo||Install Hugo from binary source.")
rows+=("dev-hugo-site|[url]|Start Hugo dev server.")
rows+=("build-hugo-site|[url]|Build with Hugo.")
rows+=("serve-hugo-site||Serve output from public folder.")

install-hugo

dev-hugo-site

build-hugo-site

serve-hugo-site

SOPS

Encrypt and decrypt files with sops and age.

rows+=("init-agekey-sops|[name]|Generate age key without encryption rule.")
rows+=("add-agekey|<path>|Generate age key and add rule for path.")
rows+=("list-agekeys|[-g]|List age keys from the default key file.")
rows+=("delete-agekey|<name>|Delete age key from the default key file.")
rows+=("encrypt-with-sops|<path>|Encrypt file with sops in place.")
rows+=("decrypt-with-sops|<path>|Decrypt file with sops in place.")
rows+=("cat-with-sops|<path>|Decrypt and show file content.")

init-agekey-sops

Generates an age key for the project based on the git URL and creates .sops.yaml with a default catch-all rule using the generated public key. The private key is appended to ~/.config/sops/age/keys.txt. A custom key name can be given as the first argument; the default is the project name.

add-agekey

Generates an age key named <project>/<path> and appends an encryption rule for the given path to .sops.yaml. Use it to encrypt files in sub folders with their own key, e.g. task add-agekey app. Multiple keys and rules can coexist; sops picks the rule that matches the file path.

list-agekeys

Lists the public keys, names and creation dates from ~/.config/sops/age/keys.txt. By default only keys for the current project are shown. Use the -g / --global flag to list all keys.

delete-agekey

Deletes the age key block matching <name> from ~/.config/sops/age/keys.txt.

encrypt-with-sops

decrypt-with-sops

cat-with-sops

Forgejo

Create Forgejo Actions workflows from templates.

rows+=("add-forgejo-workflow|[name]|Add Forgejo workflow from template.")

add-forgejo-workflow

Renders templates/forgejo-workflow.<name> to .forgejo/workflows/<name>.yml. Without a name the templates are listed in an fzf dialog. The template variables $PROJECT_NAME, $REPO_URL and $WORKFLOW_FILENAME are replaced, other variables such as $HOME are kept for the workflow runner.

The repository url is derived from the git remote origin url, ssh urls are converted to https. The command prints the workflow badge for Codeberg or GitHub and creates an empty .forgejo/secrets/kubeconfig.yml if the workflow references it.

Available templates:

deploy-docs

Next steps are printed after the files are created: run init-agekey-sops if .sops.yaml is missing and encrypt the kubeconfig with encrypt-with-sops.