{"id":30347240,"url":"https://github.com/paraskevi-kivroglou/gemini-cli-github-mcp","last_synced_at":"2026-02-18T17:02:24.756Z","repository":{"id":302993984,"uuid":"1014078634","full_name":"Paraskevi-KIvroglou/Gemini-CLI-GitHub-MCP","owner":"Paraskevi-KIvroglou","description":"To fully automate documentation updates using Gemini CLI with the GitHub MCP server when a branch is pushed to main, you need to combine Gemini's MCP integration with a CI/CD workflow (such as GitHub Actions).","archived":false,"fork":false,"pushed_at":"2025-07-15T00:21:52.000Z","size":219,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-09T09:36:06.597Z","etag":null,"topics":["ci-cd","gemini-cli","github","github-actions","mcp"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Paraskevi-KIvroglou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-05T02:38:07.000Z","updated_at":"2025-08-16T01:22:16.000Z","dependencies_parsed_at":"2025-07-05T04:13:20.453Z","dependency_job_id":"1387f129-a3bd-4170-8e3c-86eccb6125aa","html_url":"https://github.com/Paraskevi-KIvroglou/Gemini-CLI-GitHub-MCP","commit_stats":null,"previous_names":["paraskevi-kivroglou/gemini-cli-github-mcp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Paraskevi-KIvroglou/Gemini-CLI-GitHub-MCP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraskevi-KIvroglou%2FGemini-CLI-GitHub-MCP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraskevi-KIvroglou%2FGemini-CLI-GitHub-MCP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraskevi-KIvroglou%2FGemini-CLI-GitHub-MCP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraskevi-KIvroglou%2FGemini-CLI-GitHub-MCP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Paraskevi-KIvroglou","download_url":"https://codeload.github.com/Paraskevi-KIvroglou/Gemini-CLI-GitHub-MCP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraskevi-KIvroglou%2FGemini-CLI-GitHub-MCP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29587066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T16:55:40.614Z","status":"ssl_error","status_checked_at":"2026-02-18T16:55:37.558Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["ci-cd","gemini-cli","github","github-actions","mcp"],"created_at":"2025-08-18T16:14:53.569Z","updated_at":"2026-02-18T17:02:24.730Z","avatar_url":"https://github.com/Paraskevi-KIvroglou.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gemini CLI + MCP Documentation Generator\n\nThis repository contains a versatile GitHub Actions workflow that automatically generates documentation using Google's Gemini CLI with Model Context Protocol (MCP) integration.\n\n## Features\n\n- **Cross-platform support**: Windows and Linux workflows\n- **Configurable paths**: Customize input and output directories\n- **Flexible triggers**: Manual dispatch or automatic on push\n- **Error handling**: Comprehensive validation and error reporting\n- **MCP Integration**: GitHub MCP server for enhanced context\n- **Automated workflow**: Seamless documentation updates\n\n## Quick Start\n\n### 1. Copy the Workflow\n\nCopy the appropriate workflow file to your repository:\n\n- **Windows**: `.github/workflows/update_docs_windows.yml`\n- **Linux**: `.github/workflows/update_docs_linux.yml`\n\n### 2. Set Up Secrets\n\nAdd these secrets to your repository (Settings → Secrets and variables → Actions):\n\n- `PERSONAL_ACCESS_TOKEN`: GitHub Personal Access Token with repo permissions\n- `GITHUB_TOKEN`: Automatically provided by GitHub Actions\n\n### 3. Configure Your Repository\n\nThe workflow is designed to work out of the box with these defaults:\n- **Input directory**: `src/`\n- **Output directory**: `docs/`\n- **Branch**: `main`\n\n## How It Works\n\n### MCP Server Configuration\n\nThe workflow automatically configures a GitHub MCP server that provides:\n- Repository context and file information\n- Issue and pull request data\n- Enhanced documentation generation capabilities\n\n### Documentation Generation Process\n\n1. **Setup**: Installs Node.js and Gemini CLI\n2. **MCP Configuration**: Creates `.gemini/settings.json` with GitHub MCP server\n3. **Documentation**: Generates docs from your source files\n4. **Commit \u0026 Push**: Automatically commits and pushes changes\n\n## Customization Options\n\n### Repository Variables (Optional)\n\nYou can set these variables in your repository settings (Settings → Secrets and variables → Actions → Variables):\n\n- `INPUT_DIR`: Source directory for documentation generation (default: `src/`)\n- `OUTPUT_DIR`: Output directory for generated docs (default: `docs/`)\n- `COMMIT_MESSAGE`: Custom commit message (default: \"Auto-update docs with Gemini CLI + MCP\")\n- `ENABLE_AUTO_PUSH`: Enable/disable automatic pushing (default: `true`)\n- `CLEAN_CACHE`: Clean npm cache before running (default: `true`)\n\n### Manual Trigger Options\n\nWhen manually triggering the workflow, you can override:\n\n- **Input Directory**: Specify custom source directory\n- **Output Directory**: Specify custom output directory  \n- **Branch Name**: Target branch for commits\n- **Commit Message**: Custom commit message\n- **Auto Push**: Enable/disable automatic pushing\n- **Clean Cache**: Enable/disable npm cache cleaning\n\n## Usage Examples\n\n### Basic Usage\n\n```yaml\n# Copy the workflow file to your repository\n# Set up the required secrets\n# The workflow will run automatically on pushes to main\n```\n\n### Custom Directory Structure\n\nIf your project has a different structure:\n\n```yaml\n# Set repository variables:\nINPUT_DIR: \"source/\"\nOUTPUT_DIR: \"documentation/\"\n```\n\n### Different Branch\n\n```yaml\n# Set repository variables:\nDEFAULT_BRANCH: \"develop\"\n```\n\n### Manual Trigger with Custom Settings\n\n1. Go to Actions → Workflows → \"Auto Update Docs with Gemini CLI + MCP\"\n2. Click \"Run workflow\"\n3. Fill in custom parameters:\n   - Input directory: `lib/`\n   - Output directory: `api-docs/`\n   - Commit message: \"Update API documentation\"\n\n## Workflow Features\n\n### Error Handling\n\n- Validates input directory exists\n- Verifies MCP configuration creation\n- Checks documentation generation success\n- Provides detailed error messages\n\n### Performance Optimizations\n\n- NPM caching for faster installations\n- Conditional cache cleaning\n- Efficient file operations\n\n### Security\n\n- Uses GitHub tokens for authentication\n- Secure MCP server configuration\n- No hardcoded credentials\n\n## Advanced Features\n\n### MCP Server Integration\n\nThe workflow includes a GitHub MCP server that provides:\n- Repository metadata access\n- File content and structure information\n- Issue and PR management capabilities\n- Enhanced context for documentation generation\n\n### Custom Documentation Scripts\n\nThe repository includes a sample `scripts/generate_docs.js` that demonstrates:\n- File system operations\n- Documentation template generation\n- Integration with external tools\n\n## Troubleshooting\n\n### Common Issues\n\n1. **\"Input directory does not exist\"**\n   - Ensure your source directory exists\n   - Check the `INPUT_DIR` variable or workflow input\n\n2. **\"MCP configuration failed\"**\n   - Verify `PERSONAL_ACCESS_TOKEN` secret is set\n   - Check token permissions\n\n3. **\"No changes to commit\"**\n   - This is normal if documentation hasn't changed\n   - Check if source files were modified\n\n4. **\"Documentation generation failed\"**\n   - Verify Gemini CLI installation\n   - Check source files are valid\n\n### Debug Steps\n\n1. Check workflow logs in Actions tab\n2. Verify secrets are properly configured\n3. Test with manual trigger first\n4. Check file permissions and paths\n\n## Advanced Configuration\n\n### Multiple Documentation Sets\n\nCreate multiple workflow files for different documentation types:\n\n```yaml\n# api-docs.yml\nINPUT_DIR: \"api/\"\nOUTPUT_DIR: \"api-docs/\"\n\n# user-guide.yml  \nINPUT_DIR: \"docs/\"\nOUTPUT_DIR: \"user-guide/\"\n```\n\n### Conditional Execution\n\nModify the workflow to run only on specific conditions:\n\n```yaml\non:\n  push:\n    branches: [main, develop]\n    paths: ['src/**', 'docs/**']\n```\n\n### Custom MCP Servers\n\nExtend the MCP configuration for additional servers:\n\n```yaml\nmcpServers:\n  github:\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol/server-github\"]\n    env:\n      GITHUB_PERSONAL_ACCESS_TOKEN: \"${{ secrets.PERSONAL_ACCESS_TOKEN }}\"\n  custom:\n    command: \"npx\"\n    args: [\"-y\", \"your-custom-mcp-server\"]\n```\n\n## Development\n\n### Local Testing\n\nTo test the workflow locally:\n\n1. Clone the repository\n2. Set up your GitHub token\n3. Run the workflow manually\n4. Check the generated documentation\n\n### Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Test with different repository structures\n5. Submit a pull request\n\n## Related Files\n\n- `.github/workflows/update_docs_windows.yml`: Windows workflow\n- `.github/workflows/update_docs_linux.yml`: Linux workflow\n- `scripts/generate_docs.js`: Sample documentation script\n- `Gemini.md`: Project configuration and conventions\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparaskevi-kivroglou%2Fgemini-cli-github-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparaskevi-kivroglou%2Fgemini-cli-github-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparaskevi-kivroglou%2Fgemini-cli-github-mcp/lists"}