Skip to main content

Gemini CLI

Install NebGuard for Gemini CLI. First check the shared prerequisites: the nebguard binary on your PATH, and Gemini CLI 0.59.0 or newer already installed.

1. Run setup​

nebguard setup gemini-cli

Setup merges named BeforeTool and AfterTool hooks into your Gemini settings and preserves unrelated settings and hooks. It uses $GEMINI_CLI_HOME/.gemini/settings.json when GEMINI_CLI_HOME is an absolute path, otherwise ~/.gemini/settings.json.

2. Verify​

Re-run setup, then launch Gemini in any workspace and ask it to make a harmless edit:

nebguard setup gemini-cli
gemini

Gemini hooks are enabled by default. If hooksConfig.enabled or the managed hook names disable NebGuard, setup prints an ACTION REQUIRED warning. Headless and autonomous launches need no trust-bypass flag.

Uninstall​

nebguard uninstall --host gemini-cli

Uninstall removes only the named NebGuard hooks and its installed binary. Other Gemini settings and hooks remain unchanged.

Next steps​