ggshield install
Description
Installs ggshield as a pre-commit, pre-push, or AI coding assistant hook.
ggshield install [OPTIONS]
The install command installs ggshield as a git pre-commit or pre-push hook, either
for the current repository (locally) or for all repositories (globally).
It can also install ggshield as a Cursor, Claude Code, or Copilot Chat agent hook.
Options
-
-m,--mode [local|global]: Hook installation mode. [required] -
-t,--hook-type [pre-commit|pre-push|cursor|claude-code|copilot]: Type of hook to install.Default:
pre-commit. -
-f,--force: Overwrite any existing hook script. -
-a,--append: Append to existing script.
This command supports all ggshield global options.