Skip to main content

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 an AI coding assistant hook.

Git is optional for this command. Git hook types require it; AI coding assistant hook types do not.

Options​

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

  • -t, --hook-type [pre-commit|pre-push|vibe|claude-code|codex|copilot|cursor|vscode|junie|kiro]: 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.