Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Git Guard AINew to Visual Studio Code? Get it now.
Git Guard AI

Git Guard AI

Varad Dhumale

|
1 install
| (0) | Free
AI-powered Git guardian — scans for secrets, generates commit messages, and guards against dangerous commands.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AI Git Guard 🛡️

AI-powered Git guardian — scans for secrets, generates commit messages, and guards against dangerous commands.

Why Git Guard? (vs. GitHub Copilot)

While GitHub Copilot is your co-pilot for writing code, Git Guard is your air traffic controller. General AI agents don't natively monitor your terminal for destructive commands or scan your staged files for leaked API keys.

  • Repository Protection First: Git Guard intercepts dangerous commands (like git push --force) and explains the consequences before disaster strikes.
  • Pre-Commit Secret Scanning: Actively scans staged files for API keys, passwords, and tokens before they are committed to GitHub.
  • 100% Privacy Focused: Supports running models entirely locally via Ollama, guaranteeing zero data leakage—crucial for enterprise security.

Features

  • Scan for Secrets: Analyzes your staged files for potential secrets or sensitive information before committing.
  • Generate Commit Message: Uses AI to generate a highly contextual and descriptive commit message based on your staged changes.
  • Guard Git Commands: Intercepts and explains potentially dangerous Git commands to prevent repository mistakes.
  • Local AI Support: Supports both Grok and Ollama, allowing you to run AI models entirely locally for maximum privacy.

Getting Started

  1. Install the extension from the VS Code Marketplace.
  2. Open a project with a Git repository.
  3. Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and type AI Git Guard: Configure AI Provider.
  4. Select either Grok (Cloud) or Ollama (Local).

Setting up Grok (Cloud)

If you choose Grok, you will need an API key.

  1. Go to the xAI Console and create an account.
  2. Navigate to the API Keys section and generate a new key.
  3. Run the AI Git Guard: Configure AI Provider command in VS Code, select Grok, and paste your API key.

🔒 Privacy Guarantee: Your API key is securely stored in VS Code's native SecretStorage. It never leaves your system and is only sent directly to the xAI API endpoints. We do not track, collect, or store any of your data or keys on external servers.

Setting up Ollama (100% Local)

If you want maximum privacy, you can run the AI entirely on your own machine.

  1. Download and install Ollama.
  2. Open your terminal and pull a model (e.g., ollama run llama3).
  3. Ensure the Ollama service is running (default: http://localhost:11434).
  4. Run the configuration command in VS Code and select Ollama!

Commands

  • AI Git Guard: Scan for Secrets
  • AI Git Guard: Generate Commit Message
  • AI Git Guard: Configure AI Provider
  • AI Git Guard: Run Git Command (Guarded)

Extension Settings

  • aiGitGuard.provider: AI provider to use for commit generation and command explanations (Options: grok, ollama).
  • aiGitGuard.model: Model name to use with the selected AI provider (Default: llama-3.3-70b-versatile).
  • aiGitGuard.ollamaUrl: URL for the Ollama server (only used when provider is 'ollama'. Default: http://localhost:11434).
  • aiGitGuard.scanOnSave: Automatically scan files for secrets whenever you save a file.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft