VisCommandsvis hook

vis hook

Manage git hooks for your workspace

vis hook

Manage git hooks for your workspace. Supports installing, uninstalling, and migrating from husky.

Usage

vis hook <action> [options]

Actions

install

Install git hooks by configuring core.hooksPath to point to your hooks directory:

vis hook install

uninstall

Remove git hooks and reset core.hooksPath:

vis hook uninstall

migrate

Migrate existing husky hooks to vis:

vis hook migrate

The migration automatically detects your husky directory, copies hook scripts, and prompts for confirmation.

Options

OptionDefaultDescription
--hooks-dir.vis-hooksCustom hooks directory

Environment Variables

VariableDescription
VIS_GIT_HOOKS=0Disable git hooks
VIS_GIT_HOOKS=2Enable debug output for hooks

Supported Hooks

vis supports all standard git hooks:

  • pre-commit
  • pre-merge-commit
  • prepare-commit-msg
  • commit-msg
  • post-commit
  • applypatch-msg
  • pre-applypatch
  • post-applypatch
  • pre-rebase
  • post-rewrite
  • post-checkout
  • post-merge
  • pre-push
  • pre-auto-gc

Creating Hook Scripts

After installing, create executable scripts in your hooks directory:

vis hook install

echo '#!/bin/sh
pnpm run lint-staged' > .vis-hooks/pre-commit

chmod +x .vis-hooks/pre-commit

Commit the hooks directory to version control so all team members use the same hooks.

Support

Contribute to our work and keep us going

Community is the heart of open source. The success of our packages wouldn't be possible without the incredible contributions of users, testers, and developers who collaborate with us every day.Want to get involved? Here are some tips on how you can make a meaningful impact on our open source projects.

Ready to help us out?

Be sure to check out the package's contribution guidelines first. They'll walk you through the process on how to properly submit an issue or pull request to our repositories.

Submit a pull request

Found something to improve? Fork the repo, make your changes, and open a PR. We review every contribution and provide feedback to help you get merged.

Good first issues

Simple issues suited for people new to open source development, and often a good place to start working on a package.
View good first issues