{
  "id": "hk",
  "name": "hk",
  "homepage": "https://hk.jdx.dev/",
  "description": "A fast and extensible git hook manager",
  "executables": [
    "hk"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/hk/config.pkl"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "hk",
    "description": "Run the check hook over a repository with hk check. Other hk commands, hook subcommands and output options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "check"
        ],
        "label": "Check files",
        "description": "Run each step's check command on selected files.",
        "source": [
          {
            "id": "docs",
            "kind": "manual",
            "url": "https://raw.githubusercontent.com/jdx/hk/HEAD/docs/cli/check.md",
            "revision": "v2.9.0",
            "evidence": "- **`[FILES]…`** — Run on specific files\n- **`-a --all`** — Select all tracked and eligible untracked files, then apply step filters\n- **`-f --fix`** — Run fix commands instead of check commands for this invocation\n- **`-g --glob <GLOB>`** — Run on files that match these glob patterns\n- **`-S --step <STEP>`** — Run only specific step(s)\n- **`-P --plan`** — Print the plan instead of running the hook\n- **`--skip-step <STEP>`** — Skip specific step(s)\n- **`--staged`** — Run on staged files only without stashing unstaged changes\n- **`--pr`** — Check only files changed in the current PR/branch (shortcut for --from-ref DEFAULT_BRANCH --to-ref HEAD)\n- **`--from-ref <FROM_REF>`** — Select files changed since this reference; optionally pair with --to-ref\n- **`--to-ref <TO_REF>`** — End reference for comparison with --from-ref"
          }
        ],
        "field": [
          {
            "id": "files",
            "label": "Files",
            "type": "path",
            "position": 0,
            "multiple": true,
            "min": 0,
            "path": {
              "kind": "any",
              "role": "input"
            },
            "sources": [
              "docs"
            ]
          },
          {
            "id": "all",
            "label": "All files",
            "type": "boolean",
            "option": [
              "--all",
              "-a"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "fix",
            "label": "Fix instead of check",
            "description": "Runs fix commands, which can modify files.",
            "type": "boolean",
            "option": [
              "--fix",
              "-f"
            ],
            "effect": "overwrite",
            "sources": [
              "docs"
            ]
          },
          {
            "id": "staged",
            "label": "Staged files only",
            "type": "boolean",
            "option": [
              "--staged"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "pr",
            "label": "Files changed in this branch",
            "type": "boolean",
            "option": [
              "--pr"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "plan",
            "label": "Print plan only",
            "type": "boolean",
            "option": [
              "--plan",
              "-P"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "step",
            "label": "Only step",
            "type": "string",
            "option": [
              "--step",
              "-S"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "skip_step",
            "label": "Skip step",
            "type": "string",
            "option": [
              "--skip-step"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "glob",
            "label": "Glob",
            "type": "string",
            "option": [
              "--glob",
              "-g"
            ],
            "multiple": true,
            "sources": [
              "docs"
            ]
          },
          {
            "id": "from_ref",
            "label": "From ref",
            "type": "string",
            "option": [
              "--from-ref"
            ],
            "sources": [
              "docs"
            ]
          },
          {
            "id": "to_ref",
            "label": "To ref",
            "type": "string",
            "option": [
              "--to-ref"
            ],
            "sources": [
              "docs"
            ]
          }
        ],
        "task": [
          {
            "id": "all",
            "label": "Check the whole repository",
            "fields": [
              "all",
              "step",
              "skip_step"
            ],
            "required": [
              "all"
            ],
            "set": {
              "all": [
                true
              ]
            }
          },
          {
            "id": "staged",
            "label": "Check staged files",
            "fields": [
              "staged",
              "step",
              "skip_step"
            ],
            "required": [
              "staged"
            ],
            "set": {
              "staged": [
                true
              ]
            }
          },
          {
            "id": "branch",
            "label": "Check this branch",
            "fields": [
              "pr",
              "step",
              "skip_step"
            ],
            "required": [
              "pr"
            ],
            "set": {
              "pr": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "files",
              "all",
              "staged",
              "pr",
              "fix",
              "plan"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "step",
              "skip_step",
              "glob",
              "from_ref",
              "to_ref"
            ]
          }
        ]
      }
    ]
  }
}
