hooked/hooked-book/source/cli/install.md

18 lines
655 B
Markdown
Raw Normal View History

2022-11-03 12:59:53 +00:00
# Install
The `install` command creates the scripts inside `.git/hooks`.
```sh
2022-11-06 17:46:28 +00:00
{{#include ../cli-reference.txt:install}}
2022-11-03 12:59:53 +00:00
```
Below is the default script template that Hooked uses, where `hook_type` is the type of hook to run (like `pre-commit`) and `config_path` is the `general.config` field from the parsed configuration.
```sh
{{#include ../../../hooked-cli/source/templates/default.sh}}
```
2022-11-04 18:19:14 +00:00
You can provide your own template by using the `general.template` configuration setting. If you do, make sure you include a line somewhere that says `# Installed by Hooked.` for the [uninstall CLI command][cli-uninstall].
[cli-uninstall]: ./uninstall.md