Skip to main content

ggshield install


Installs ggshield as a pre-commit or pre-push 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).


  • -m, --mode [local|global]: Hook installation mode. [required]

  • -t, --hook-type [pre-commit|pre-push]: 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.

How can I help you ?