Skip to content

hk init

  • Usage: hk init [FLAGS]
  • Aliases: generate
  • Effect: modifies state

Generate a new hk.pkl file for a project

Flags

  • -f --force — Overwrite existing hk.pkl file

  • -i --interactive — Interactive mode: select linters and hooks manually

  • --mise — Generate a mise.toml file with hk configured

    Set HK_MISE=1 to make this the default behavior.

  • -h --help — Print help

Examples

Generate a configuration, then validate it. Install selected tools separately.

sh
hk init
hk validate

# Choose linters and hooks interactively
hk init --interactive

Learn more

Getting started · Troubleshooting · All commands

MIT LicenseCopyright © 2026jdx.dev