About this tool
Generate a Husky v9 + lint-staged setup: exact install commands, hook files and package.json config for npm, pnpm, yarn or bun.
This generator produces a complete Husky v9 and lint-staged setup: the exact install commands for npm, pnpm, Yarn or bun, the .husky hook files, and the package.json additions including the prepare script and lint-staged configuration. It follows the current Husky v9 format, where hook files are plain shell lines and the deprecated husky.sh sourcing boilerplate is gone. It is built for developers wiring up pre-commit linting, commitlint message checks or pre-push tests in a new or existing repository.
Open Husky Config Generator on AltFTool — it loads instantly in your browser.
Provide your input — an image, text, or data.
Let the tool analyze or generate the result.
Review, refine, and reuse the output wherever you need it.
Emits the right install, init and exec commands for npm, pnpm, Yarn or bun.
Generates plain shell hook files without the deprecated husky.sh boilerplate that breaks in v10.
Covers install commands, hook files, commitlint config and the package.json prepare script in one pass.
Install both as dev dependencies, run husky init, then make .husky/pre-commit run lint-staged and add a lint-staged object to package.json mapping globs to commands. husky init also adds a "prepare": "husky" script so hooks are installed for everyone who clones and runs an install.
No. Since Husky v9, hook files are plain shell snippets — a one-line file containing npx lint-staged is a valid pre-commit hook. The old #!/usr/bin/env sh and husky.sh sourcing lines are deprecated and cause a failure in v10, so they should be removed when migrating.
Set the HUSKY environment variable to 0, for example HUSKY=0 git commit -m "wip". Git's own --no-verify flag also skips pre-commit and commit-msg hooks. Both are meant for exceptional cases; hooks exist so problems are caught before they reach CI.
Only on the files currently staged for the commit that match each glob pattern, not the whole project. That keeps pre-commit hooks fast: a one-line fix triggers linting for one file. Commands like eslint --fix that modify files have their changes automatically re-staged by lint-staged.