hk migrate pre-commit
- Usage:
hk migrate pre-commit [FLAGS] - Effect: modifies state
Migrate from pre-commit to hk
Flags
-c --config <CONFIG>— Path to .pre-commit-config.yamlDefault:
.pre-commit-config.yaml-f --force— Overwrite existing hk.pkl file-o --output <OUTPUT>— Output path for hk.pklDefault:
hk.pkl--hk-pkl-root <HK_PKL_ROOT>— Root path for hk pkl files (e.g. "pkl" for a local checkout, or a package URL prefix). If set, the generated config uses {root}/Config.pkl and {root}/Builtins.pkl-h --help— Print help
Examples
Write to a separate file while evaluating a migration. Review filters, tool versions, and any unsupported hooks before installing.
sh
hk migrate pre-commit --output hk.migrated.pkl
HK_FILE=./hk.migrated.pkl hk check --all --plan