What
Import a global just justfile that lives at ~/.config/just/justfile and provides a helm-template recipe for rendering any Helm chart folder from anywhere via just -g helm-template <chart-dir>.
Set up ad-hoc on my work machine — capturing here so chezmoi manages it.
Where it goes (chezmoi)
New file: dot_config/just/justfile → renders to ~/.config/just/justfile (the first path just -g searches).
File contents
# Global justfile — run from anywhere with `just -g <recipe>`.
# Render a Helm chart's manifests to stdout. Builds chart dependencies first
# (so charts with `dependencies:` like ghcr.io/dnd-it/helm-charts work).
#
# Usage:
# just -g helm-template <chart-dir> [extra helm args...]
#
# Examples:
# just -g helm-template deploy/app
# just -g helm-template deploy/app -f deploy/app/envs/prod/values.yaml
helm-template chart='.' *args='':
#!/usr/bin/env bash
set -euo pipefail
cd "{{invocation_directory()}}"
chart="{{chart}}"
name="$(basename "$(cd "$chart" && pwd)")"
helm dependency build "$chart" >/dev/null
helm template "$name" "$chart" {{args}}
Notes
- Uses
invocation_directory() so relative chart paths resolve against the dir you ran the command in, not the justfile's home location (the usual just -g gotcha).
- Runs
helm dependency build first so charts with OCI dependencies render out of the box.
- Forwards extra args (
-f, --set, …) straight through to helm template.
- Dependencies
just and helm are already in the Brewfile — no Brewfile change needed.
Acceptance
What
Import a global
justjustfile that lives at~/.config/just/justfileand provides ahelm-templaterecipe for rendering any Helm chart folder from anywhere viajust -g helm-template <chart-dir>.Set up ad-hoc on my work machine — capturing here so chezmoi manages it.
Where it goes (chezmoi)
New file:
dot_config/just/justfile→ renders to~/.config/just/justfile(the first pathjust -gsearches).File contents
Notes
invocation_directory()so relative chart paths resolve against the dir you ran the command in, not the justfile's home location (the usualjust -ggotcha).helm dependency buildfirst so charts with OCI dependencies render out of the box.-f,--set, …) straight through tohelm template.justandhelmare already in the Brewfile — no Brewfile change needed.Acceptance
dot_config/just/justfileadded and applied by chezmoijust -g helm-template <chart-dir>renders a chart from an arbitrary working directory