{"id":28755680,"url":"https://github.com/mucahitgurbuz/ai-code-context","last_synced_at":"2026-03-12T20:13:14.255Z","repository":{"id":299408148,"uuid":"1002843178","full_name":"mucahitgurbuz/ai-code-context","owner":"mucahitgurbuz","description":"AI-powered code documentation that actually helps - automatically generate and maintain contextual documentation for code changes using git diffs and AI","archived":false,"fork":false,"pushed_at":"2025-12-03T11:14:41.000Z","size":139,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-06T14:40:17.954Z","etag":null,"topics":["ai","anthropic","automation","cli","code-analysis","code-documentation","developer-productivity","developer-tools","documentation","documentation-generator","git","git-hooks","nodejs","openai","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mucahitgurbuz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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-06-16T08:23:47.000Z","updated_at":"2025-06-16T11:52:54.000Z","dependencies_parsed_at":"2025-06-16T12:34:25.291Z","dependency_job_id":null,"html_url":"https://github.com/mucahitgurbuz/ai-code-context","commit_stats":null,"previous_names":["mucahitgurbuz/ai-code-context"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mucahitgurbuz/ai-code-context","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mucahitgurbuz%2Fai-code-context","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mucahitgurbuz%2Fai-code-context/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mucahitgurbuz%2Fai-code-context/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mucahitgurbuz%2Fai-code-context/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mucahitgurbuz","download_url":"https://codeload.github.com/mucahitgurbuz/ai-code-context/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mucahitgurbuz%2Fai-code-context/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30441857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai","anthropic","automation","cli","code-analysis","code-documentation","developer-productivity","developer-tools","documentation","documentation-generator","git","git-hooks","nodejs","openai","typescript"],"created_at":"2025-06-17T02:39:40.648Z","updated_at":"2026-03-12T20:13:14.231Z","avatar_url":"https://github.com/mucahitgurbuz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 AI Code Context\n\n\u003e AI-powered code documentation that actually helps developers understand and maintain code\n\n[![npm version](https://badge.fury.io/js/ai-code-context.svg)](https://badge.fury.io/js/ai-code-context)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js CI](https://github.com/mucahitgurbuz/ai-code-context/actions/workflows/ci.yml/badge.svg)](https://github.com/mucahitgurbuz/ai-code-context/actions/workflows/ci.yml)\n\n## The Problem\n\nDevelopers spend **30%+ of their time** understanding existing code and writing documentation. When working on unfamiliar codebases or returning to old projects, developers waste hours figuring out what code does and why it was written that way.\n\n## The Solution\n\n**AI Code Context** automatically generates and maintains contextual documentation for your code changes using AI. It integrates seamlessly into your git workflow and provides human-readable explanations that actually help developers understand code faster.\n\n## ✨ Features\n\n- 🔍 **Smart Code Analysis** - Analyzes git diffs and understands code changes in context\n- 📝 **Auto-Documentation** - Generates clear, helpful documentation automatically\n- 🔗 **Git Integration** - Hooks into your git workflow for seamless analysis\n- 🧠 **Multiple AI Providers** - Works with OpenAI, Anthropic, or local models\n- 🎯 **Language Agnostic** - Supports any programming language\n- 🚀 **Zero Config** - Works out of the box with sensible defaults\n- 🔐 **Privacy Focused** - Option to use local AI models\n\n## 🚀 Quick Start\n\n### Installation\n\n```bash\nnpm install -g ai-code-context\n```\n\n### Initialize in your project\n\n```bash\ncd your-project\nai-context init\n```\n\n### Analyze your code\n\n```bash\n# Analyze recent changes\nai-context analyze --commit HEAD~1..HEAD\n\n# Analyze staged changes before committing\nai-context analyze --staged\n\n# Analyze specific file\nai-context analyze --file src/components/UserProfile.tsx\n\n# Set up automatic analysis on commits\nai-context watch --install-hook\n```\n\n## 📖 Usage Examples\n\n### Analyzing Git Commits\n\n```bash\n# Analyze the last commit\nai-context analyze --commit HEAD~1..HEAD\n\n# Analyze a range of commits\nai-context analyze --commit feature-branch..main\n\n# Analyze uncommitted changes\nai-context analyze --unstaged\n```\n\n### Example Output\n\n```markdown\n# Code Analysis Report\n\n**Project:** my-react-app\n**Type:** React Application\n**Languages:** typescript, javascript\n**Generated:** 2024-01-15T10:30:00.000Z\n\n## Summary\n\nAnalyzed 3 file(s) with AI-powered code analysis.\n\n### src/components/UserProfile.tsx\n\n**Language:** typescript\n\n**Summary:** Added new user profile component with avatar display and edit functionality\n\n**Purpose:** Create a reusable user profile component for displaying user information with editing capabilities\n\n**Key Changes:**\n\n- Implemented UserProfile React component with TypeScript\n- Added avatar image display with fallback to initials\n- Integrated edit mode toggle for profile information\n- Added form validation for email and username fields\n\n**Impact:** Enables user profile functionality across the application with consistent UI/UX\n\n**Suggestions:**\n\n- Consider adding loading states for async operations\n- Add unit tests for form validation logic\n- Consider extracting avatar logic into separate component for reusability\n```\n\n### Configuration\n\nCreate `.aicontext.json` in your project root:\n\n```json\n{\n  \"aiProvider\": \"openai\",\n  \"model\": \"gpt-4\",\n  \"apiKey\": \"your-api-key-here\",\n  \"maxTokens\": 2000,\n  \"temperature\": 0.3,\n  \"autoCommitHook\": true,\n  \"includePatterns\": [\"**/*.js\", \"**/*.ts\", \"**/*.tsx\", \"**/*.py\"],\n  \"excludePatterns\": [\"node_modules/**\", \"dist/**\", \"**/*.test.*\"],\n  \"outputFormat\": \"both\",\n  \"updateReadme\": true\n}\n```\n\n## 🎛️ Configuration Options\n\n| Option            | Description                                   | Default                       |\n| ----------------- | --------------------------------------------- | ----------------------------- |\n| `aiProvider`      | AI provider: `openai`, `anthropic`, `local`   | `openai`                      |\n| `model`           | AI model to use                               | `gpt-4`                       |\n| `apiKey`          | API key for AI provider                       | env var                       |\n| `maxTokens`       | Maximum tokens per request                    | `2000`                        |\n| `temperature`     | AI creativity (0-1)                           | `0.3`                         |\n| `autoCommitHook`  | Auto-analyze on commits                       | `false`                       |\n| `includePatterns` | Files to analyze                              | `[\"**/*.js\", \"**/*.ts\", ...]` |\n| `excludePatterns` | Files to ignore                               | `[\"node_modules/**\", ...]`    |\n| `outputFormat`    | Output format: `markdown`, `comments`, `both` | `both`                        |\n| `updateReadme`    | Auto-update README.md                         | `true`                        |\n\n## 🧠 AI Provider Setup\n\n### OpenAI\n\n```bash\nexport OPENAI_API_KEY=\"your-api-key\"\nai-context init --provider openai --model gpt-4\n```\n\n### Anthropic (Claude)\n\n```bash\nexport ANTHROPIC_API_KEY=\"your-api-key\"\nai-context init --provider anthropic --model claude-3-sonnet-20240229\n```\n\n### Local/Self-hosted (Ollama)\n\n```bash\n# Start Ollama server\nollama serve\n\n# Configure AI Code Context\nai-context init --provider local --model llama2\n```\n\n## 🔧 Commands\n\n### `ai-context init`\n\nInitialize AI Code Context in your project.\n\n```bash\nai-context init [options]\n\nOptions:\n  --provider \u003cprovider\u003e  AI provider (openai, anthropic, local)\n  --model \u003cmodel\u003e       AI model to use\n  --api-key \u003ckey\u003e       API key for the AI provider\n```\n\n### `ai-context analyze`\n\nAnalyze code changes and generate documentation.\n\n```bash\nai-context analyze [options]\n\nOptions:\n  --commit \u003crange\u003e   Analyze specific commit range (e.g., HEAD~1..HEAD)\n  --staged          Analyze staged changes\n  --unstaged        Analyze unstaged changes\n  --file \u003cpath\u003e     Analyze specific file\n  --output \u003cpath\u003e   Output file for the analysis report\n  --auto           Auto mode for git hooks (minimal output)\n```\n\n### `ai-context watch`\n\nSet up automatic analysis on git commits.\n\n```bash\nai-context watch [options]\n\nOptions:\n  --install-hook    Install git commit hook\n  --remove-hook     Remove git commit hook\n```\n\n### `ai-context config`\n\nManage configuration.\n\n```bash\nai-context config [options]\n\nOptions:\n  --show           Show current configuration\n  --set \u003ckey=value\u003e Set configuration value\n  --reset          Reset to default configuration\n```\n\n### `ai-context status`\n\nShow project status and configuration.\n\n```bash\nai-context status\n```\n\n## 🔄 Git Integration\n\n### Automatic Analysis on Commits\n\nInstall the git hook to automatically analyze commits:\n\n```bash\nai-context watch --install-hook\n```\n\nThis creates a `post-commit` hook that runs `ai-context analyze --commit HEAD~1..HEAD --auto` after each commit.\n\n### Pre-commit Analysis\n\nAdd to your `.git/hooks/pre-commit`:\n\n```bash\n#!/bin/sh\nai-context analyze --staged\n```\n\n## 🏗️ Integration Examples\n\n### GitHub Actions\n\n```yaml\nname: AI Code Analysis\non: [pull_request]\n\njobs:\n  analyze:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: actions/setup-node@v3\n        with:\n          node-version: \"18\"\n      - run: npm install -g ai-code-context\n      - run: ai-context analyze --commit ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}\n        env:\n          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}\n```\n\n### VS Code Extension\n\nInstall the AI Code Context VS Code extension for integrated analysis:\n\n```bash\ncode --install-extension ai-code-context.vscode-extension\n```\n\n### Package.json Scripts\n\n```json\n{\n  \"scripts\": {\n    \"analyze\": \"ai-context analyze --staged\",\n    \"analyze:last\": \"ai-context analyze --commit HEAD~1..HEAD\",\n    \"analyze:branch\": \"ai-context analyze --commit main..HEAD\"\n  }\n}\n```\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n### Development Setup\n\n```bash\ngit clone https://github.com/mucahitgurbuz/ai-code-context.git\ncd ai-code-context\nnpm install\nnpm run build\nnpm link\n```\n\n### Running Tests\n\n```bash\nnpm test\nnpm run test:coverage\n```\n\n## 📊 Benefits\n\n- **Save 2-3 hours per week** on documentation tasks\n- **Faster onboarding** for new team members\n- **Better code reviews** with AI-generated context\n- **Improved maintainability** with up-to-date documentation\n- **Language agnostic** - works with any codebase\n- **Privacy focused** - option for local AI processing\n\n## 🛡️ Privacy \u0026 Security\n\n- **API Keys**: Stored locally in `.aicontext.json` or environment variables\n- **Code Privacy**: Use local AI models to keep code on your infrastructure\n- **No Data Storage**: AI providers process requests but don't store your code\n- **Secure Transmission**: All API calls use HTTPS encryption\n\n## 📄 License\n\nMIT © [AI Code Context Contributors](LICENSE)\n\n## 🙋‍♂️ Support\n\n- 📚 [Documentation](https://github.com/mucahitgurbuz/ai-code-context/wiki)\n- 🐛 [Issue Tracker](https://github.com/mucahitgurbuz/ai-code-context/issues)\n- 💬 [Discussions](https://github.com/mucahitgurbuz/ai-code-context/discussions)\n- 📧 [Email Support](mailto:mucahitgurbuz@gmail.com)\n\n---\n\n**Made with ❤️ by developers, for developers who want to spend less time writing docs and more time writing code.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmucahitgurbuz%2Fai-code-context","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmucahitgurbuz%2Fai-code-context","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmucahitgurbuz%2Fai-code-context/lists"}