Skip to content

CLI reference

Run the same configured steps locally, in Git hooks, and in CI.

TaskCommand
Set up a projecthk init and hk install
Check or fix codehk check and hk fix
Run a named hookhk run
Inspect configurationhk config and hk validate
Test a step definitionhk test
Integrate a coding agenthk agent and hk mcp
Use included file checkshk util

Start with getting started for an end-to-end setup. Command-specific flags are listed on each page; the flags below apply globally.

Usage: hk [FLAGS] <SUBCOMMAND>

Version: 1.58.1

Global Flags

  • --cd <DIRECTORY> — Run as if hk was started in this directory
  • -j --jobs <JOBS> — Number of jobs to run in parallel
  • -p --profile <PROFILE> — Profiles to enable or disable. Prefix a profile with ! to disable it, e.g. --profile slow --profile !fast
  • -s --slow — Shorthand for --profile=slow
  • -v --verbose — Enable verbose (debug) output. Pass twice for trace output
  • -n --no-progress — Disable progress output
  • -q --quiet — Suppress non-essential output (info messages, progress indicators). Failed-step diagnostics are still shown
  • --silent — Suppress all output except errors, including warnings
  • --trace — Enable tracing spans and performance diagnostics
  • --json — Output in JSON format

Flags

  • --format <FORMAT> — Select human or machine-readable execution output

    Choices: human, json, jsonl

    Default: human

  • -h --help — Print help

  • -V --version — Print version

Subcommands

Learn more

Getting started · Troubleshooting

MIT LicenseCopyright © 2026jdx.dev