{"id":26282372,"url":"https://github.com/deeeed/gitguard","last_synced_at":"2025-10-10T14:10:09.658Z","repository":{"id":277777291,"uuid":"933458406","full_name":"deeeed/gitguard","owner":"deeeed","description":"Your AI-powered guardian for maintaining high-quality Git repositories","archived":false,"fork":false,"pushed_at":"2025-04-15T13:45:39.000Z","size":15583,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T14:43:44.043Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deeeed.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/contributing.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-16T02:06:39.000Z","updated_at":"2025-04-15T13:45:43.000Z","dependencies_parsed_at":"2025-04-08T07:29:09.177Z","dependency_job_id":"eb2c9d3d-7cf3-4fc1-9be0-96ddd239e03f","html_url":"https://github.com/deeeed/gitguard","commit_stats":null,"previous_names":["deeeed/gitguard"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/deeeed/gitguard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeeed%2Fgitguard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeeed%2Fgitguard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeeed%2Fgitguard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeeed%2Fgitguard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deeeed","download_url":"https://codeload.github.com/deeeed/gitguard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeeed%2Fgitguard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004181,"owners_count":26083688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-14T16:49:58.105Z","updated_at":"2025-10-10T14:10:09.631Z","avatar_url":"https://github.com/deeeed.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitGuard\n\n\u003cdiv align=\"center\"\u003e\n\n\u003e Your AI-powered guardian for maintaining high-quality Git repositories\n\n\u003cimg src=\"./images/gitguard.webp\" alt=\"GitGuard Logo\" width=\"200\"/\u003e\n\nGitGuard helps developers maintain best practices without slowing them down.\n\n\u003e ⚠️ **Development Status**: GitGuard is under active development. APIs, command options, and configuration formats may change in future versions as I consolidate and improve the features. Please check the changelog for updates before upgrading.\n\n\u003c/div\u003e\n\n## 🎥 Demo\n\n\u003ca href=\"https://deeeed.github.io/universe/gitguard/index.html\" target=\"_blank\"\u003e\n  \u003cimg src=\"./images/gitguard_demo_thumbnail.png\" alt=\"Watch the GitGuard Demo Video\"\u003e\n\u003c/a\u003e\n\n_Click the link above to watch the GitGuard demo video._\n\n\u003c!-- Table of Contents --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003e📋 Table of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\u003ca href=\"#-why-gitguard\"\u003eWhy GitGuard?\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#-quick-start\"\u003eQuick Start\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#-key-features\"\u003eKey Features\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#️-commit-guardian\"\u003eCommit Guardian\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#-pr-assistant\"\u003ePR Assistant\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#-ai-integration\"\u003eAI Integration\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#-quality-checks\"\u003eQuality Checks\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#-repository-intelligence\"\u003eRepository Intelligence\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#configuration\"\u003eConfiguration\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#custom-prompts\"\u003eCustom Prompts\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#status\"\u003eStatus\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#arthitecture\"\u003eArchitecture\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#full-configuration-reference\"\u003eFull Configuration Reference\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n## 🤖 Why GitGuard?\n\nMaintaining clean commits, well-structured PRs, and comprehensive changelogs is crucial but time-consuming. GitGuard automates these best practices using AI, helping you:\n\n- Split large commits intelligently\n- Generate meaningful commit messages\n- Create detailed PR descriptions\n- Maintain structured changelogs\n- Detect potential issues before they reach review\n\nWhile there are existing solutions integrated into IDEs (like Cursor or Copilot) or working as PR agents, GitGuard offers unique advantages:\n\n1. **Complete Prompt Control**: Full customization of AI interactions and prompts\n2. **Model Flexibility**: Freedom to use and switch between different AI models\n3. **Multiple Suggestions**: Get various commit message options to choose from\n4. **Complementary Integration**: Works alongside existing tools in your workflow\n5. **Open Source**: Full transparency and community-driven development\n\nFor a deeper dive into the motivation behind GitGuard, check out our [detailed explanation](./docs/why.md).\n\n\n## 🚀 Quick Start\n\n```bash\n# Install GitGuard globally (recommended)\nnpm install -g gitguard\n\n# Commit workflows\ngitguard commit # Analyze staged changes and get suggestions\ngitguard commit analyze --all # Analyze all changes (staged + unstaged) in the current branch\ngitguard commit create -m \"feat: update login\" # Create commit with AI suggestions\ngitguard commit --split # Get suggestions to split large commits\n\n# Branch and PR workflows\ngitguard branch pr # Preview AI-generated PR title and description\ngitguard branch --split # Analyze and split complex branches\ngitguard branch pr --draft # Create a draft PR with AI-generated title and description\ngitguard branch edit pr # Directly save AI generated values to matching github PR.\n\n# Pro tip: create an alias for the commit command\nalias lazycommit=\"gitguard commit create \"\n```\n\n\u003e **💰 Cost-Conscious AI Integration**\n\u003e\n\u003e Working with AI models like ChatGPT or Claude can be costly. GitGuard is designed with an \"offline\" clipboard capability that allows you to:\n\u003e\n\u003e - Use the tool without an API key\n\u003e - Copy formatted prompts to your clipboard\n\u003e - Paste directly into web interfaces (ChatGPT, Claude)\n\u003e - Paste the AI response back into GitGuard\n\u003e\n\u003e **🎯 Customization**\n\u003e\n\u003e - Templates can be set dynamically\n\u003e - Prompts can be redefined per project\n\u003e - Configure in `.gitguard/config.json` or globally\n\u003e - Use environment variables for sensitive settings\n\n## 🎯 Key Features\n\n### 🛡️ Commit Guardian\n- Analyzes commit size and complexity\n- Suggests optimal commit structure\n- Generates conventional commit messages\n- Detects potential issues early\n\n### 📝 PR Assistant\n- Generates AI powered titles and descriptions\n- Validates against PR templates\n- Suggests structural improvements\n\n### 🤖 AI Integration\n- Azure OpenAI\n- OpenAI\n- Anthropic\n- Local Custom models\n\n### 🔍 Quality Checks\n- Ensures consistent commit style\n- Validates dependency changes\n- Checks for security issues\n- Maintains monorepo integrity\n\n### 📦 Repository Intelligence\n- Automatic monorepo detection\n- Smart package change analysis\n- Cross-package dependency tracking\n- PR template management\n\n## Configuration\n\nGitGuard can be configured both globally and locally using the `init` command:\n\n```bash\n# Initialize local configuration (in current repository)\nnpx gitguard init\n# Initialize global configuration (user-level)\nnpx gitguard init -g\n\n# View all configurations\nnpx gitguard status\n```\n\n## Custom Prompts\n\nGitGuard's AI capabilities are fully customizable through a template system. You can:\n- Override default templates\n- Create custom workflows\n- Use offline clipboard mode\n- Debug and validate templates\n\n```bash\n# Initialize global templates\ngitguard template --init --global\n# Edit templates in ~/.gitguard/templates/\nls -l ~/.gitguard/templates/\n```\n\nSee [custom_prompts.md](./docs/custom_prompts.md) for detailed documentation\n\n\n## Status\n\nGitGuard provides a powerful configuration inspection tool to help you understand your current setup:\n\n```bash\n# Show effective configuration\ngitguard status\n\n# Show global configuration\ngitguard status --global\n\n# Show local project configuration\ngitguard status --local\n```\n\nThe status command shows your effective configuration, combining:\n1. Default values\n2. Global user settings (`~/.gitguard/config.json`)\n3. Project settings (`.gitguard/config.json`)\n\nExample minimal configuration that inherits defaults:\n```json\n{\n  \"ai\": {\n    \"enabled\": true,\n    \"provider\": \"anthropic\"\n  }\n}\n```\n\nRunning `gitguard status` will show:\n- ✅ All inherited default values\n- ✅ Your custom overrides\n- ✅ Active features and providers\n- ✅ Security rules and patterns\n- ✅ Complexity thresholds\n- ✅ PR requirements\n\nSee [Full configuration reference](#full-configuration-reference) for all available options.\n\n## Architecture\n\n### Smart Diff to Template\n\nGitGuard is designed to be an intelligent wrapper around git diffs, focusing on creating optimal context for AI language models (LLMs). Here's how it works:\n\n#### 🎯 Core Concept\nGitGuard analyzes your changes and creates tailored prompts for different AI models. Since each model has different context limits and costs, I've implemented two main approaches:\n\n1. **API Format** (`format: \"api\"`)\n   - Optimized for token efficiency\n   - Strict output formatting\n   - Cost-conscious context selection\n\n2. **Human Format** (`format: \"human\"`)\n   - Richer context inclusion\n   - More descriptive prompts\n   - Optimized for ChatGPT/Claude web interfaces\n\n#### ⚙️ Configuration\nYou can fine-tune the diff analysis with:\n```json\n{\n  \"ai\": {\n    \"maxPromptTokens\": 4096,  // Maximum tokens in generated prompts\n    \"maxPromptCost\": 0.1       // Maximum cost per API call in USD\n  }\n}\n```\n\n#### 🔬 Implementation Details\nThe current diff algorithm focuses on extracting meaningful changes while respecting token limits. I'm actively working on improvements, including:\n- Commit classification for targeted analysis\n- Smart chunking for large changes\n- Context-aware diff summarization\n\n\u003e 🚧 **Work in Progress**: The diff algorithm is being actively developed. I'm experimenting with using a classifier to determine the best diff strategy based on commit type.\n\nSee the implementation in [diff.util.ts](./src/utils/diff.util.ts)\n\n\n### 🔍 Commit Complexity Analysis\n\nGitGuard analyzes commit complexity to help identify changes that might benefit from being split into smaller, more focused commits.\n\n#### Current Implementation\n```json\n{\n  \"analysis\": {\n    \"complexity\": {\n      \"patterns\": {\n        \"sourceFiles\": [\"src/*\", \"lib/*\"],\n        \"apiFiles\": [\"api/*\"],\n        \"criticalFiles\": [\"package.json\", \"tsconfig.json\"]\n      },\n      \"scoring\": {\n        \"sourceFileScore\": 1.0,\n        \"apiFileScore\": 2.0,\n        \"criticalFileScore\": 2.0\n      }\n    }\n  }\n}\n```\n\n#### Future Improvements\nThe complexity analysis will become more flexible, allowing custom patterns and scoring:\n```json\n{\n  \"analysis\": {\n    \"patterns\": {\n      \"database\": [\"db/*.sql\", \"migrations/*\"],  // Custom category\n      \"security\": [\"auth/*\", \"crypto/*\"],        // Custom category\n      \"documentation\": [\"docs/*\", \"*.md\"]        // Custom category\n    },\n    \"scoring\": {\n      \"database\": 2.0,      // Custom weight\n      \"security\": 2.0,      // Custom weight\n      \"documentation\": 0.5   // Custom weight\n    }\n  }\n}\n```\n\n#### Development Status\n- Currently uses predefined categories and scoring\n- Moving towards fully customizable patterns and thresholds\n- Evaluating value of automatic detection vs. manual `--split` flag\n- Gathering user feedback on most useful detection patterns\n\n\u003e 💡 See [analysis.types.ts](./src/types/analysis.types.ts) for current implementation details\n\u003e \n\u003e 🔧 Use `--split` flag to manually trigger split suggestions: `gitguard commit --split`\n\n### 🔒 Security Scanning\n\nGitguard has built in security scanning to catch common mistakes before they make it to your repository:\n\n#### 🚨 What We Detect\n1. **Secrets and Keys**\n   - API keys\n   - Access tokens\n   - Private keys\n   - Database credentials\n\n2. **Sensitive Files**\n   - Environment files\n   - Configuration files\n   - Certificate files\n   - Database files\n\n```bash\n📂 Analyzing changes...\n⚠️  Security issue detected in .env.development\n    High Severity: Potential API key exposure\n    \n? How would you like to proceed?\n❯ Unstage affected files\n  Review changes\n  Proceed anyway (not recommended)\n```\n\n\u003e 🔍 See [security.types.ts](./src/types/security.types.ts) for all security patterns\n\n### 🧠 Repository Intelligence\n\nWhile AI assistance is GitGuard's primary feature, I've also built in smart repository analysis that works offline:\n\n#### 📦 Monorepo Detection\n```bash\n# Automatic package detection\n\"feat: add user auth\" → \"feat(auth): add user auth\"\n\n# Cross-package changes detection\n📦 Changes affect multiple packages:\n  • packages/api/src/auth.ts\n  • packages/web/src/login.tsx\n  \n? Choose action:\n❯ Split into separate commits\n  Keep changes together\n  Review changes\n```\n\n#### 🎯 Smart Scoping\n- Automatically detects affected packages\n- Suggests optimal commit structure\n- Maintains monorepo integrity\n- Prevents cross-package tangles\n\n\u003e 🔧 Configure detection patterns in `.gitguard/config.json`:\n```json\n{\n  \"git\": {\n    \"monorepoPatterns\": [\"packages/*\", \"apps/*\"],\n    \"ignorePatterns\": [\"*.lock\", \"dist/*\"]\n  }\n}\n```\n\n\u003e 💡 See [commit.service.ts](./src/services/commit.service.ts) for implementation details\n\n## Full Configuration Reference\n\nCreate a `.gitguard/config.json` file in your git repository or home directory. The configuration supports JSON with comments (JSONC):\n\n```json\n{\n  // Git-related configuration\n  \"git\": {\n    // Base branch for comparisons (default: \"main\")\n    \"baseBranch\": \"main\",\n    // Patterns to detect monorepo packages\n    \"monorepoPatterns\": [\"packages/*\", \"apps/*\"],\n    // Patterns to ignore in all git operations\n    \"ignorePatterns\": [\"*.lock\", \"dist/*\"],\n    // GitHub integration settings\n    \"github\": {\n      // GitHub token (recommended: use GITHUB_TOKEN env var instead)\n      \"token\": \"your-token-here\",\n      // GitHub Enterprise settings\n      \"enterprise\": {\n        \"url\": \"https://github.yourcompany.com\"\n      }\n    }\n  },\n\n  // Code analysis configuration\n  \"analysis\": {\n    // Enable/disable multi-package detection\n    \"multiPackageDetection\": true,\n    // Enable/disable complexity analysis\n    \"complexityDetection\": true, // Not implemented yet - currently always enabled\n    // Maximum number of lines changed in a single commit\n    \"maxCommitSize\": 500,\n    // Maximum number of lines in a single file\n    \"maxFileSize\": 1000,\n    // Whether to validate commits against conventional commits specification\n    \"checkConventionalCommits\": true,\n    // Complexity analysis settings\n    \"complexity\": {\n      // Size thresholds for complexity calculations\n      \"thresholds\": {\n        \"largeFile\": 100,      // Lines that make a file \"large\"\n        \"veryLargeFile\": 300,  // Lines that make a file \"very large\"\n        \"hugeFile\": 500,       // Lines that make a file \"huge\"\n        \"multipleFiles\": 5,    // Number of files to trigger \"multiple files\" warning\n        \"manyFiles\": 10        // Number of files to trigger \"many files\" warning\n      },\n      // Scoring weights for different types of changes\n      \"scoring\": {\n        \"baseFileScore\": 1,        // Base score for any file\n        \"largeFileScore\": 2,       // Additional score for large files\n        \"veryLargeFileScore\": 3,   // Additional score for very large files\n        \"hugeFileScore\": 5,        // Additional score for huge files\n        \"sourceFileScore\": 1,      // Score multiplier for source code files\n        \"testFileScore\": 1,        // Score multiplier for test files\n        \"configFileScore\": 0.5,    // Score multiplier for config files\n        \"apiFileScore\": 2,         // Score multiplier for API files\n        \"migrationFileScore\": 2,   // Score multiplier for migrations\n        \"componentFileScore\": 1,   // Score multiplier for UI components\n        \"hookFileScore\": 1,        // Score multiplier for hooks\n        \"utilityFileScore\": 0.5,   // Score multiplier for utilities\n        \"criticalFileScore\": 2     // Score multiplier for critical files\n      },\n      // File patterns for categorizing changes\n      \"patterns\": {\n        \"sourceFiles\": [\"/src/\", \"/lib/\", \"/core/\"],\n        \"apiFiles\": [\"/api/\", \"/interfaces/\", \"/services/\"],\n        \"migrationFiles\": [\"/migrations/\", \"/migrate/\"],\n        \"componentFiles\": [\"/components/\", \"/views/\", \"/pages/\"],\n        \"hookFiles\": [\"/hooks/\", \"/composables/\"],\n        \"utilityFiles\": [\"/utils/\", \"/helpers/\", \"/shared/\"],\n        \"criticalFiles\": [\n          \"package.json\",\n          \"tsconfig.json\",\n          \".env\",\n          \"pnpm-workspace.yaml\",\n          \"yarn.lock\",\n          \"package-lock.json\"\n        ]\n      },\n      // Thresholds that trigger restructuring recommendations\n      \"structureThresholds\": {\n        \"scoreThreshold\": 10,    // Total complexity score threshold\n        \"reasonsThreshold\": 2    // Number of complexity reasons threshold\n      }\n    }\n  },\n\n  // Security scanning configuration\n  \"security\": {\n    // Enable/disable all security features\n    \"enabled\": true,\n    \"rules\": {\n      // Secret detection configuration\n      \"secrets\": {\n        \"enabled\": true,\n        \"severity\": \"high\",\n        \"blockPR\": true,\n        // Additional patterns to detect secrets (adds to built-in patterns)\n        \"patterns\": []\n      },\n      // Sensitive file detection\n      \"files\": {\n        \"enabled\": true,\n        \"severity\": \"medium\",\n        // Additional patterns for sensitive files (adds to built-in patterns)\n        \"patterns\": []\n      }\n    }\n  },\n\n  // AI integration configuration\n  \"ai\": {\n    // Enable/disable AI features\n    \"enabled\": false,\n    // AI provider: \"azure\", \"openai\", \"anthropic\", \"custom\"\n    \"provider\": null,\n    // Maximum tokens allowed in prompts\n    \"maxPromptTokens\": 4096,\n    // Maximum cost allowed per prompt in USD\n    \"maxPromptCost\": 0.1,\n    // Enable copying API responses to clipboard\n    \"apiClipboard\": true,\n    // Azure OpenAI configuration\n    \"azure\": {\n      \"endpoint\": \"https://your-endpoint.openai.azure.com\",\n      \"deployment\": \"your-deployment\",\n      \"apiVersion\": \"2023-05-15\",\n      // API key (recommended: use AZURE_OPENAI_API_KEY env var instead)\n      \"apiKey\": \"your-key-here\"\n    },\n    // OpenAI configuration\n    \"openai\": {\n      // API key (recommended: use OPENAI_API_KEY env var instead)\n      \"apiKey\": \"your-key-here\",\n      \"model\": \"gpt-4\",\n      \"organization\": \"your-org-id\"\n    },\n    // Anthropic configuration\n    \"anthropic\": {\n      // API key (recommended: use ANTHROPIC_API_KEY env var instead)\n      \"apiKey\": \"your-key-here\",\n      \"model\": \"claude-3-sonnet-20240229\"\n    },\n    // Custom AI provider configuration\n    \"custom\": {\n      \"host\": \"http://localhost:11434\",\n      \"model\": \"codellama\"\n    },\n    // Commit analysis AI configuration\n    \"commitDetails\": {\n      \"enabled\": true,\n      \"complexityThreshold\": 5,\n      \"alwaysInclude\": false\n    }\n  },\n\n  // Pull Request configuration\n  \"pr\": {\n    // PR template settings\n    \"template\": {\n      // Path to PR template file\n      \"path\": \".github/pull_request_template.md\",\n      // Whether template is required\n      \"required\": true,\n      // Required sections in PR template\n      \"sections\": {\n        \"description\": true,\n        \"breaking\": true,\n        \"testing\": true,\n        \"checklist\": true\n      }\n    },\n    // Maximum size of PR in lines\n    \"maxSize\": 800,\n    // Number of required approvals\n    \"requireApprovals\": 1\n  },\n\n  // Enable debug logging\n  \"debug\": false,\n  // Enable colored output\n  \"colors\": true\n}\n```\n\n### Important Notes\n\n1. **Configuration is Optional**: All settings are optional and will use smart defaults if not provided. You only need to configure what you want to customize.\n\n2. **Security Patterns**:\n   - Custom patterns in `security.rules.secrets.patterns` and `security.rules.files.patterns` are **added to** the built-in patterns, not replacing them\n   - Built-in patterns provide comprehensive security checks out of the box\n   - Custom patterns allow you to add organization-specific checks\n\n3. **Sensitive Values**:\n   The following values should preferably be set via environment variables:\n   - GitHub Token: Use `GITHUB_TOKEN` or `GH_TOKEN`\n   - Azure OpenAI Key: Use `AZURE_OPENAI_API_KEY`\n   - OpenAI Key: Use `OPENAI_API_KEY`\n   - Anthropic Key: Use `ANTHROPIC_API_KEY`\n\n4. **Environment Variables**:\n   All configuration options can also be set via environment variables. Here's a complete list:\n\n   **AI Configuration**\n   ```bash\n   # Enable/Disable AI features\n   GITGUARD_USE_AI=true\n\n   # Azure OpenAI\n   AZURE_OPENAI_ENDPOINT=\"https://your-endpoint.openai.azure.com\"\n   AZURE_OPENAI_DEPLOYMENT=\"your-deployment\"\n   AZURE_OPENAI_API_VERSION=\"2023-05-15\"\n   AZURE_OPENAI_API_KEY=\"your-key\"\n\n   # OpenAI\n   OPENAI_API_KEY=\"your-key\"\n\n   # Anthropic\n   ANTHROPIC_API_KEY=\"your-key\"\n   ```\n\n   **GitHub Configuration**\n   ```bash\n   # GitHub Authentication\n   GITHUB_TOKEN=\"your-token\"  # or\n   GH_TOKEN=\"your-token\"\n   ```\n\n   **Security Configuration**\n   ```bash\n   # Enable/Disable Security Features\n   GITGUARD_SECURITY_ENABLED=true\n\n   # Secret Detection\n   GITGUARD_SECURITY_SECRETS=true\n   GITGUARD_SECURITY_SECRETS_SEVERITY=\"high\"  # high|medium|low\n\n   # Sensitive File Detection\n   GITGUARD_SECURITY_FILES=true\n   GITGUARD_SECURITY_FILES_SEVERITY=\"high\"  # high|medium|low\n   ```\n\n   **Note**: Environment variables take precedence over configuration files. They're particularly useful for:\n   - CI/CD environments\n   - Keeping sensitive values out of configuration files\n   - Temporary overrides during development\n\n\n## Roadmap\n\n- [x] Add support for Anthropic\n- [x] Template engine to customize prompts\n- [X] Simulate API calls to debug prompts\n- [ ] Add shell auto completions\n- [ ] PR Review feature\n- [ ] Custom model fine tuning guide (run everything on your own server)\n\n## Contributing\n\nSee [CONTRIBUTING.md](./docs/contributing.md)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](../../LICENSE.md) file for details.\n\n---\n\u003csub\u003eCreated by [Arthur Breton](https://siteed.net) • See more projects at [siteed.net](https://siteed.net)\u003c/sub\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeeed%2Fgitguard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeeeed%2Fgitguard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeeed%2Fgitguard/lists"}