Interactive CLI and web interface for setting up Husky git hooks with Prettier, ESLint, and commit conventions
npm install husky-installerbash
npx husky-installer
`
$3
`bash
npm install -g husky-installer
husky-installer
`
> Note: Don't use npm install husky-installer in your project - use npx instead!
š Quick Start
$3
Simply run in your project directory:
`bash
husky-installer
`
The CLI will:
1. ā
Auto-detect your package manager
2. ā
Ask if you want Prettier (code formatting)
3. ā
Ask if you want ESLint (code linting)
4. ā
Ask if you want commit prefixes
5. ā
Install and configure everything automatically!
$3
`bash
npm run dev
`
Then open your browser to configure visually and copy the commands.
š Commit Prefix Examples
When enabled, your commits get automatic emoji prefixes:
`bash
git commit -m "feat: add login" ā š feat: add login
git commit -m "fix: button bug" ā š fix: button bug
git commit -m "docs: update readme" ā š docs: update readme
git commit -m "style: format code" ā šØ style: format code
git commit -m "test: add tests" ā ā
test: add tests
git commit -m "perf: optimize" ā ā” perf: optimize
git commit -m "refactor: cleanup" ā ā»ļø refactor: cleanup
git commit -m "chore: update deps" ā š§ chore: update deps
`
$3
| Type | Emoji | Description |
| ---------- | ----- | ---------------- |
| feat | š | New features |
| fix | š | Bug fixes |
| docs | š | Documentation |
| style | šØ | Code style |
| refactor | ā»ļø | Code refactoring |
| perf | ā” | Performance |
| test | ā
| Tests |
| chore | š§ | Maintenance |
| build | š¦ | Build system |
| ci | āļø | CI/CD |
| breaking | š„ | Breaking changes |
| hotfix | š„ | Urgent fixes |
| wip | š§ | Work in progress |
| release | š | Releases |
š® Control Commands
After installation, you get these npm scripts:
`bash
Temporarily disable Husky hooks
npm run husky:disable
Re-enable Husky hooks
npm run husky:enable
`
š ļø What Gets Installed
The installer sets up:
- ā
Husky git hooks
- ā
Pre-commit hook (runs Prettier/ESLint)
- ā
Commit-msg hook (adds emoji prefixes)
- ā
Configuration files (.prettierrc, eslint.config.js)
- ā
Control scripts (enable/disable hooks)
š Requirements
- Node.js >= 18.0.0
- Git repository initialized (git init must be run first)
- npm, yarn, pnpm, or bun
šØ CLI Preview
`
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā š Husky Installer CLI v1.0.0 ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
š¦ Detected package manager: npm
? Do you want to add Prettier (code formatting)?
⯠Yes
No
? Do you want to add ESLint (code linting)?
⯠Yes
No
? Enable automatic commit prefixes?
⯠Yes
No
š Commit prefix examples:
feat: add login ā š feat: add login
fix: button bug ā š fix: button bug
docs: update readme ā š docs: update readme
...
š¦ Installing dependencies...
āļø Configuring Husky...
šŖ Creating pre-commit hook...
š Creating commit-msg hook...
ā
Husky installation complete!
``