{
 "kind": "tool",
 "slug": "husky",
 "path": "tools/husky/",
 "name": "Husky",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Dev workflow and config",
   "tools/dev-workflow/"
  ]
 ],
 "lead": "Modern Git hooks manager for running tasks on git events.",
 "chips": [
  {
   "label": "Dev workflow and config",
   "path": "tools/dev-workflow/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install husky"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/typicode/husky"
  },
  {
   "label": "Website",
   "href": "https://github.com/typicode/husky#readme"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/typicode/husky"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Mar 19, 2026",
   "note": "Latest GitHub release Nov 18, 2024. ",
   "src": "https://github.com/typicode/husky"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "639 projects",
   "status": "info",
   "sub": "#2 of 299 in its category",
   "note": "Dependency in 639 public GitHub projects set up for AI coding agents that we scanned (10.2%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Husky does",
   "parts": [
    {
     "t": "prose",
     "text": "Husky's website pitches it as \"native\" Git hooks: it uses Git's own <code>core.hooksPath</code> setting and \"adheres to Git's native hook organization\", in a package the maintainers put at 2 kB gzipped with no dependencies."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Husky popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "86",
       "of": "/ 100",
       "l": "Gid Score, #38 overall"
      },
      {
       "n": "52.2M",
       "l": "downloads a week, npm"
      },
      {
       "n": "35.4K",
       "l": "GitHub stars"
      },
      {
       "n": "639",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How Husky is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "Husky is a dependency in 639 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (13.1% of the 4,867 JavaScript/TypeScript ones), #2 of 299 in dev workflow and config.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,397; those are left out of every share on this page.",
      "The most used alternative in our scan is Lefthook (127 projects).",
      "Projects that use it most often also use lint-staged (68.1%), Prettier (66.0%), ESLint (67.0%).",
      "It is more common in projects set up for OpenAI Codex (19.4%) than for GitHub Copilot (10.8%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "404 projects, 12.3%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "328 projects, 10.8%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "298 projects, 12.2%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "91 projects, 19.4%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "80 projects, 16.9%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "54 projects, 15.7%",
       "v": "OpenCode",
       "path": "agents/opencode/"
      },
      {
       "l": "34 projects, 12.2%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      },
      {
       "l": "23 projects, 16.4%",
       "v": "Kiro",
       "path": "agents/kiro/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 68.1% of its projects",
       "v": "lint-staged",
       "path": "tools/lint-staged/"
      },
      {
       "l": "In 66.0% of its projects",
       "v": "Prettier",
       "path": "tools/prettier/"
      },
      {
       "l": "In 67.0% of its projects",
       "v": "ESLint",
       "path": "tools/eslint/"
      },
      {
       "l": "In 78.2% of its projects",
       "v": "TypeScript",
       "path": "tools/typescript/"
      },
      {
       "l": "In 42.1% of its projects",
       "v": "Vitest",
       "path": "tools/vitest/"
      },
      {
       "l": "In 35.2% of its projects",
       "v": "Playwright (JavaScript)",
       "path": "tools/playwright-test/"
      },
      {
       "l": "In 26.6% of its projects",
       "v": "Testing Library",
       "path": "tools/testing-library/"
      },
      {
       "l": "In 33.3% of its projects",
       "v": "Vite",
       "path": "tools/vite/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "Husky in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Small, by the maintainers' account",
       "v": "The maintainers write that Husky is \"just 2 kB (gzipped) with no dependencies\". They say it is \"fastest due to being lightweight\"."
      },
      {
       "l": "Built on core.hooksPath",
       "v": "The site says Husky uses Git's <code>core.hooksPath</code> feature. The same section lists support for a custom hooks directory, nested projects and monorepos."
      },
      {
       "l": "All 13 client-side hooks, per branch if needed",
       "v": "The feature list covers every client-side Git hook. It also lists branch-specific hooks. The site says to use POSIX shell for advanced cases."
      },
      {
       "l": "Setup through npm's prepare script",
       "v": "The maintainers say Husky \"aligns with npm best practices using prepare script\". They also say it \"adheres to Git's native hook organization\"."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "The ~1ms figure is unverified here",
       "v": "The \"runs in ~1ms\" and \"fastest\" claims come from the project's own website. None of the sources includes an independent measurement."
      },
      {
       "l": "JS config and autoinstall were dropped",
       "v": "The site links two articles. One is titled \"Why husky has dropped conventional JS config\". The other is titled \"Why husky doesn't autoinstall anymore\". The sources here include only the titles, not what replaced either feature, so anyone used to older setups should read both articles."
      },
      {
       "l": "Deprecation warnings exist in v9",
       "v": "The latest release, v9.1.7 (2024-11-18), lists one change: <code>fix: add husky label to deprecated warning</code>. The release notes do not say what is deprecated."
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about Husky",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/typicode",
        "Open Collective: https://opencollective.com/husky",
        "12 GitHub sponsors"
       ]
      },
      {
       "title": "Head to head",
       "items": [
        {
         "text": "Husky vs Lefthook",
         "note": "used together in 4 projects",
         "path": "tools/compare/husky-vs-lefthook/"
        }
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "lint-staged: Run tasks on staged files",
        "prettier: Code formatter",
        "eslint: JavaScript linter",
        "vitest: Test runner",
        "@playwright/test: End-to-end browser tests",
        "@testing-library: Component testing helpers"
       ]
      },
      {
       "title": "More in Dev workflow and config",
       "path": "tools/dev-workflow/",
       "items": [
        {
         "text": "dotenv",
         "path": "tools/dotenv/"
        },
        {
         "text": "python-dotenv",
         "path": "tools/python-dotenv/"
        },
        {
         "text": "lint-staged",
         "path": "tools/lint-staged/"
        },
        {
         "text": "concurrently",
         "path": "tools/concurrently/"
        },
        {
         "text": "Rich",
         "path": "tools/rich/"
        },
        {
         "text": "Pydantic Settings",
         "path": "tools/pydantic-settings/"
        },
        {
         "text": "cross-env",
         "path": "tools/cross-env/"
        },
        {
         "text": "chalk",
         "path": "tools/chalk/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Husky",
       "me": true,
       "facts": [
        "MIT",
        "Gid 86",
        "52.2M/wk"
       ]
      },
      {
       "name": "Lefthook",
       "why": "Fast git hooks manager for running checks and tasks on commits.",
       "path": "tools/lefthook/",
       "facts": [
        "MIT",
        "Gid 70",
        "10.2M/wk"
       ]
      }
     ],
     "more": "Compare Husky with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install husky"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## Husky\n- Set Husky up through the npm `prepare` script. The site says it \"aligns with npm best practices using prepare script.\"\n- Script advanced hook logic in POSIX shell, as the site recommends.\n- Any of the 13 client-side Git hooks can be used. The site lists all 13 as supported.\n- When a check should apply only to some branches, use branch-specific hooks. They are a listed feature.\n- Read the maintainers' articles \"Why husky has dropped conventional JS config\" and \"Why husky doesn't autoinstall anymore\" before writing a JS config or expecting hooks to install themselves.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm husky"
  ],
  [
   "Category",
   "Dev workflow and config"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Latest version",
   "v9.1.7, November 18, 2024"
  ],
  [
   "On GitHub since",
   "June 2014"
  ],
  [
   "Gid Score",
   "85.5"
  ],
  [
   "Rank in category",
   "#2 of 299"
  ],
  [
   "GitHub",
   "typicode/husky"
  ],
  [
   "Last change",
   "Mar 19, 2026"
  ]
 ],
 "good": [
  "Used by vercel/next.js, vercel/hyper, webpack/webpack, angular/angular, as listed by the source; we have not checked each one."
 ],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/typicode.png"
}