๐Ÿถ Husky Config Generator

Visually configure Git Hooks โ€” pre-commit / commit-msg / pre-push with lint-staged integration
Zero Dependencies | No Signup, Client-Side ยท No Server Uploads

โš™๏ธ Git Hooks Configuration

๐Ÿ”— Enable Hooks
๐Ÿ“‹ pre-commit Commands
โœ‰๏ธ commit-msg Validation
๐Ÿ“ Custom Hooks (format: hook-name:command)
Click "Generate Config" to see results...

What Can the Husky Config Generator Do?

The Husky Config Generator is a free online tool that helps developers quickly generate Husky v9 Git hooks configuration through a visual interface. It supports pre-commit, commit-msg, pre-push hooks with automatic lint-staged configuration generation. All processing is done locally in your browser with zero data upload.

Core Features

How to Use

1. Select your package manager (npm/yarn/pnpm)

2. Check the Git hooks you want to enable (pre-commit, commit-msg, pre-push, etc.)

3. Configure pre-commit tasks (ESLint, Prettier, type checking, tests)

4. Set commit-msg validation rules (Conventional Commits, max length)

5. Optionally add custom Git hooks

6. Click "Generate Config" to preview all generated config files, then follow the setup instructions

Use Cases

Case 1: Team Git Standards

Standardize Git hooks across team projects to ensure every commit passes ESLint and Prettier, maintaining consistent code style.

Case 2: Conventional Commits Adoption

Enforce Conventional Commits with commit-msg hooks for automatic CHANGELOG generation and semantic version management.

Case 3: Pre-CI Checks

Run tests and type checks in pre-push hooks to catch issues before pushing to remote, reducing CI failures.

Case 4: Open Source Contribution

Configure Husky hooks for open source projects so contributors automatically run code checks and formatting on commit.

Technical Background

Husky is the most popular Git hooks manager in the JavaScript ecosystem. v9 simplifies configuration by using a .husky directory for shell scripts, initialized via 'husky init'. Combined with lint-staged, it runs linters only on staged files for maximum speed. commitlint provides commit-msg validation for Conventional Commits. Together with prettier and eslint, husky creates a complete Git workflow automation system that catches issues before they reach the repository.

โ“ What can the Husky Config Generator do?

Generates Husky v9 Git hooks configuration through a visual interface. Supports pre-commit, commit-msg, pre-push hooks with lint-staged integration.

โ“ What is Husky?

Husky is a popular Git hooks management tool for installing and managing hook scripts in the .git/hooks directory.

โ“ Which Git Hooks are supported?

Supports pre-commit, commit-msg, pre-push, post-merge, pre-rebase, and other common hooks.

โ“ What is lint-staged?

lint-staged runs linters only on staged (git-added) files, dramatically improving speed. Supports eslint, prettier, stylelint.

โ“ What changed in Husky v9?

Husky v9 uses .husky directory for hook scripts and initializes with 'husky init'. No more .huskyrc config file.

โ“ Does this tool upload my data?

No. All configuration generation is done locally in your browser. No data is sent to any server.

Husky Config Generator | No Signup, Client-Side ยท No Server Uploads

Feedback: dexshuang@google.com