klim shell hook
Generate a shell hook that automatically runs klim check when you cd into a directory with a .klim.yaml file — like nvm or direnv for your toolchain.
klim shell hook <bash|zsh|fish|powershell>How It Works
Section titled “How It Works”- You add the hook to your shell startup file
- Every time you
cdinto a directory, the hook walks up the directory tree - If it finds a
.klim.yaml, it runsklim checksilently - Only prints output when tools are missing or outdated
# bash — add to ~/.bashrceval "$(klim shell hook bash)"
# zsh — add to ~/.zshrceval "$(klim shell hook zsh)"
# fish — save to conf.dklim shell hook fish > ~/.config/fish/conf.d/klim-hook.fish
# powershell — add to $PROFILEklim shell hook powershell | Out-String | Invoke-ExpressionExample Output
Section titled “Example Output”When you cd into a project with missing tools:
✗ kubectl — (>=1.28) ⚠ terraform 1.5.0 (>=1.7) Run 'klim check' for details or 'klim import' to install missing tools.See Also
Section titled “See Also”- klim completion — Shell tab completions
- klim check — Manual project validation
- Shell Integration guide