Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Git Hooks

This repo uses hk for pre-commit and lint checks. Configuration lives in hk.pkl (Pkl language).

Setup

Hooks auto-install via the mise postinstall hook. You can also install manually:

hk install --mise

Running Checks

# Run all checks
hk check -a

# Fix auto-fixable issues
hk fix -a

Configured Checks

Formatting

CheckFilesWhat it does
nixfmt**/*.nixFormat Nix files
shfmt**/*.shFormat shell scripts
pkl_format**/*.pklFormat Pkl files
tombi_format**/*.tomlFormat TOML files
actionlint.github/workflows/*.ymlLint GitHub Actions
shellcheck**/*.shLint shell scripts
mise-fmtmise.tomlFormat the mise config
misemise.tomlValidate mise task definitions

Security & Hygiene

CheckWhat it does
detect-private-keyCatch accidentally committed private keys
check-merge-conflictDetect merge conflict markers
check-added-large-filesPrevent large file commits
check-byte-order-markerDetect UTF-8 BOM
check-case-conflictDetect case-only filename conflicts
check-symlinksValidate symlink targets exist

Whitespace

CheckWhat it does
trailing-whitespaceRemove trailing whitespace
mixed-line-endingEnforce consistent line endings
newlinesEnsure files end with newline