{"id":36443270,"url":"https://github.com/neublink/syncwright","last_synced_at":"2026-01-11T22:01:11.333Z","repository":{"id":306644823,"uuid":"1026834880","full_name":"NeuBlink/syncwright","owner":"NeuBlink","description":"AI-powered Git merge conflict resolution tool","archived":false,"fork":false,"pushed_at":"2025-07-26T21:08:40.000Z","size":4838,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-26T22:53:43.690Z","etag":null,"topics":["ai","automation","claude","cli-tool","devops","git","github-action","merge-conflicts"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/NeuBlink.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}},"created_at":"2025-07-26T17:58:33.000Z","updated_at":"2025-07-26T18:56:03.000Z","dependencies_parsed_at":"2025-07-26T22:53:46.058Z","dependency_job_id":"d55a97d6-c43d-420e-9535-6bcf2249311e","html_url":"https://github.com/NeuBlink/syncwright","commit_stats":null,"previous_names":["neublink/syncwright"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/NeuBlink/syncwright","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeuBlink%2Fsyncwright","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeuBlink%2Fsyncwright/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeuBlink%2Fsyncwright/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeuBlink%2Fsyncwright/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NeuBlink","download_url":"https://codeload.github.com/NeuBlink/syncwright/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NeuBlink%2Fsyncwright/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28324835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T18:42:50.174Z","status":"ssl_error","status_checked_at":"2026-01-11T18:39:13.842Z","response_time":60,"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","automation","claude","cli-tool","devops","git","github-action","merge-conflicts"],"created_at":"2026-01-11T22:01:10.482Z","updated_at":"2026-01-11T22:01:11.325Z","avatar_url":"https://github.com/NeuBlink.png","language":"Go","readme":"# Syncwright\n\n**AI-powered Git merge conflict resolution tool**\n\nSyncwright is a production-ready CLI tool and GitHub Action that automatically detects, analyzes, and resolves Git merge conflicts using AI assistance. It provides a safe, intelligent approach to conflict resolution while maintaining code quality and developer control.\n\n## Key Features\n\n- **Intelligent Conflict Detection** - Automatically scans repositories and identifies merge conflicts with detailed context\n- **AI-Powered Resolution** - Uses Claude AI to provide context-aware conflict resolutions with confidence scoring\n- **Multi-Language Support** - Handles Go, JavaScript/TypeScript, Python, Java, C/C++, and more\n- **Safety First** - Automatic backups, confidence thresholds, and validation ensure safe resolutions\n- **GitHub Actions Integration** - Seamless CI/CD workflow integration with composite action\n- **Security Conscious** - Automatically filters sensitive files and credentials from AI processing\n- **Comprehensive Validation** - Built-in syntax checking and project validation tools\n- **Timeout \u0026 Retry Support** - Configurable timeout limits and retry mechanisms for reliability\n- **Debug Mode** - Detailed logging for troubleshooting and development\n\n## Quick Start\n\n### As GitHub Action (Recommended)\n\nAdd Syncwright to your workflow to automatically resolve merge conflicts in pull requests:\n\n```yaml\nname: Auto-resolve conflicts\non:\n  pull_request:\n\njobs:\n  resolve:\n    runs-on: ubuntu-latest\n    timeout-minutes: 15\n    permissions:\n      contents: write\n      pull-requests: write\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n      - uses: neublink/syncwright@v1.0.3\n        with:\n          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}\n```\n\n## 🔑 Token Setup (Required for AI Features)\n\n### Step 1: Generate Claude Code OAuth Token\n\n1. **Visit Claude Code Console**: Go to [console.anthropic.com](https://console.anthropic.com)\n2. **Login/Create Account**: Sign in with your Anthropic account\n3. **Navigate to API Keys**: Go to Settings → API Keys\n4. **Create New Key**: Click \"Create Key\" \n5. **Name Your Key**: Use a descriptive name like \"Syncwright GitHub Action\"\n6. **Copy Token**: Save the token securely (starts with `sk-ant-oat01-...`)\n\n### Step 2: Add Token to GitHub Repository\n\n1. **Go to Repository Settings**: Navigate to your repo → Settings\n2. **Access Secrets**: Click \"Secrets and variables\" → \"Actions\"  \n3. **Add New Secret**: Click \"New repository secret\"\n4. **Configure Secret**:\n   - **Name**: `CLAUDE_CODE_OAUTH_TOKEN`\n   - **Value**: Your Claude Code OAuth token from Step 1\n5. **Save**: Click \"Add secret\"\n\n### Step 3: Verify Token Setup\n\n```yaml\n# Test your token setup with this minimal workflow\nname: Test Syncwright Token\non: workflow_dispatch\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    timeout-minutes: 5\n    steps:\n      - uses: actions/checkout@v4\n      - uses: neublink/syncwright@v1.0.3\n        with:\n          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}\n          run_validation: true\n```\n\n### ⚠️ Security Notes\n\n- **Never commit tokens**: Keep tokens in GitHub Secrets only\n- **Rotate regularly**: Generate new tokens every 90 days\n- **Scope appropriately**: Use dedicated tokens for different projects\n- **Monitor usage**: Check API usage in Claude Code Console\n\n### As CLI Tool\n\nInstall and use Syncwright directly:\n\n```bash\n# Install via script (recommended)\ncurl -fsSL https://raw.githubusercontent.com/NeuBlink/syncwright/main/scripts/install.sh | bash\n\n# Or install via Go\ngo install github.com/NeuBlink/syncwright/cmd/syncwright@latest\n\n# Detect conflicts\nsyncwright detect --verbose\n\n# Generate AI payload\nsyncwright payload --in conflicts.json --out payload.json\n\n# Apply AI resolutions\nexport CLAUDE_CODE_OAUTH_TOKEN=\"your-token\"\nsyncwright ai-apply --in payload.json --verbose\n\n# Format resolved files\nsyncwright format --recent\n\n# Validate changes\nsyncwright validate --comprehensive\n```\n\n## Installation Options\n\n### GitHub Action (Composite)\n\nUse Syncwright as a reusable GitHub Action:\n\n```yaml\n- uses: neublink/syncwright@v1.0.3\n  with:\n    claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}\n    merge_failed: true  # Set to true when merge conflicts detected\n    pr_number: ${{ github.event.number }}\n    base_branch: ${{ github.base_ref }}\n    head_branch: ${{ github.head_ref }}\n    timeout_seconds: 300  # Maximum execution time (default: 300)\n    max_retries: 3        # Retry attempts for failed operations (default: 3)\n    debug_mode: false     # Enable detailed debug logging (default: false)\n```\n\n### Binary Installation\n\n**Automated Script (Linux/macOS/Windows)**\n```bash\ncurl -fsSL https://raw.githubusercontent.com/NeuBlink/syncwright/main/scripts/install.sh | bash\n```\n\n**Manual Download**\nDownload pre-compiled binaries from [GitHub Releases](https://github.com/NeuBlink/syncwright/releases)\n\n**Go Install**\n```bash\ngo install github.com/NeuBlink/syncwright/cmd/syncwright@latest\n```\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Description | Required | Default |\n|----------|-------------|----------|---------|\n| `CLAUDE_CODE_OAUTH_TOKEN` | Claude Code OAuth token for AI operations | Yes* | - |\n| `SYNCWRIGHT_MAX_TOKENS` | Maximum tokens for AI processing | No | unlimited |\n| `SYNCWRIGHT_DEBUG` | Enable debug logging | No | false |\n| `SYNCWRIGHT_VERSION` | Specific version to install | No | latest |\n\n*Required only for AI-powered operations\n\n### GitHub Action Inputs\n\n| Input | Description | Required | Default |\n|-------|-------------|----------|---------|\n| `claude_code_oauth_token` | Claude Code OAuth token | No | - |\n| `run_validation` | Run validation checks | No | true |\n| `max_tokens` | Maximum tokens for AI processing (-1 for unlimited) | No | -1 |\n| `merge_failed` | Whether automatic merge failed | No | false |\n| `pr_number` | Pull request number | No | - |\n| `base_branch` | Base branch name | No | - |\n| `head_branch` | Head branch name | No | - |\n| `timeout_seconds` | Maximum execution time in seconds | No | 300 |\n| `max_retries` | Maximum number of retry attempts | No | 3 |\n| `debug_mode` | Enable detailed debug logging | No | false |\n\n### CLI Configuration\n\n```bash\n# Set confidence threshold (0.0-1.0)\nsyncwright ai-apply --confidence-threshold 0.8\n\n# Enable verbose output with timeout control\nsyncwright detect --verbose --timeout 600\n\n# Specify output format with retry logic\nsyncwright validate --format json --out results.json --max-retries 5\n\n# Dry run mode with extended timeout\nsyncwright ai-apply --dry-run --timeout 900\n\n# Debug mode for troubleshooting\nsyncwright resolve --ai --verbose --debug\n```\n\n## Workflow Examples\n\n### Standard GitHub Actions Workflow\n\n```yaml\nname: Syncwright Conflict Resolution\n\non:\n  pull_request:\n    types: [opened, synchronize, reopened]\n\njobs:\n  resolve-conflicts:\n    runs-on: ubuntu-latest\n    timeout-minutes: 15\n    permissions:\n      contents: write\n      pull-requests: write\n    \n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n          token: ${{ secrets.GITHUB_TOKEN }}\n      \n      - name: Attempt merge\n        id: merge\n        continue-on-error: true\n        run: |\n          git config user.name \"github-actions[bot]\"\n          git config user.email \"github-actions[bot]@users.noreply.github.com\"\n          \n          # Attempt to merge base branch\n          if ! git merge origin/${{ github.base_ref }}; then\n            echo \"merge_failed=true\" \u003e\u003e $GITHUB_OUTPUT\n          else\n            echo \"merge_failed=false\" \u003e\u003e $GITHUB_OUTPUT\n          fi\n      \n      - name: Resolve conflicts with Syncwright\n        if: steps.merge.outputs.merge_failed == 'true'\n        uses: neublink/syncwright@v1\n        with:\n          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}\n          merge_failed: true\n          pr_number: ${{ github.event.number }}\n          base_branch: ${{ github.base_ref }}\n          head_branch: ${{ github.head_ref }}\n          run_validation: true\n          timeout_seconds: 600  # Extended timeout for large repositories\n          max_retries: 3        # Retry failed operations\n          debug_mode: false     # Enable for troubleshooting\n          # max_tokens: -1      # unlimited by default\n```\n\n### CLI Workflow\n\n```bash\n#!/bin/bash\n# Complete conflict resolution workflow\n\nset -e\n\necho \"🔍 Detecting conflicts...\"\nsyncwright detect --verbose --out conflicts.json\n\nif [ ! -s conflicts.json ] || [ \"$(jq '.conflicts | length' conflicts.json)\" -eq 0 ]; then\n    echo \"✅ No conflicts detected\"\n    exit 0\nfi\n\necho \"📦 Building AI payload...\"\nsyncwright payload --in conflicts.json --out payload.json\n\necho \"🤖 Applying AI resolutions...\"\nsyncwright ai-apply --in payload.json --confidence-threshold 0.7 --verbose\n\necho \"🎨 Formatting resolved files...\"\nsyncwright format --recent --verbose\n\necho \"✅ Validating changes...\"\nsyncwright validate --comprehensive --verbose\n\necho \"🎉 Conflict resolution complete!\"\n```\n\n## Security Considerations\n\nSyncwright is designed with security as a priority:\n\n- **Sensitive Data Protection** - Automatically excludes files containing API keys, passwords, and credentials\n- **Selective Processing** - Only conflict regions are sent to AI, not entire files\n- **Backup Creation** - Automatic backups before any modifications\n- **Confidence Scoring** - AI resolutions include confidence levels; low-confidence changes can be rejected\n- **Local Processing** - Most operations run locally; only conflict context sent to AI service\n- **Token Security** - OAuth tokens are handled securely and never logged\n\nSee [SECURITY.md](SECURITY.md) for detailed security information.\n\n## Troubleshooting\n\n### Common Issues\n\n**Q: \"No conflicts detected\" but I see conflict markers**\n```bash\n# Ensure you're in a Git repository\ngit status\n\n# Check if files are properly staged\ngit add .\n\n# Re-run detection\nsyncwright detect --verbose\n```\n\n**Q: \"AI resolution failed with authentication error\"**\n```bash\n# Verify token is set\necho $CLAUDE_CODE_OAUTH_TOKEN\n\n# Check token permissions\n# Token needs access to Claude Code API\n```\n\n**Q: \"Binary not found\" in GitHub Actions**\n```bash\n# Ensure installation step completed\n./syncwright --version\n\n# Check PATH includes workspace\necho $PATH | grep workspace\n```\n\n**Q: \"Confidence too low\" rejecting all resolutions**\n```bash\n# Lower confidence threshold\nsyncwright ai-apply --confidence-threshold 0.5\n\n# Review conflicts manually\nsyncwright ai-apply --dry-run --verbose\n```\n\n**Q: \"Operation timed out\" errors**\n```bash\n# Increase timeout for large repositories\nsyncwright resolve --ai --timeout 900\n\n# Enable retries for reliability\nsyncwright resolve --ai --max-retries 5\n```\n\n**Q: \"Retry attempts exceeded\" failures**\n```bash\n# Check network connectivity and API status\ncurl -I https://api.anthropic.com\n\n# Increase timeout and retry settings\nsyncwright resolve --ai --timeout 600 --max-retries 10\n```\n\n### Debug Mode\n\nEnable detailed logging:\n\n```bash\nexport SYNCWRIGHT_DEBUG=true\nsyncwright detect --verbose\n```\n\nOr in GitHub Actions:\n```yaml\n- uses: neublink/syncwright@v1.0.3\n  with:\n    claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}\n    debug_mode: true\n    timeout_seconds: 600  # Extended timeout for debugging\n```\n\n### Getting Help\n\n- Check [USAGE.md](USAGE.md) for detailed examples\n- Review [GitHub Issues](https://github.com/NeuBlink/syncwright/issues) for known problems\n- Enable verbose mode (`--verbose`) for detailed output\n- Use dry-run mode (`--dry-run`) to preview changes\n\n## Contributing\n\nWe welcome contributions! Please see our contributing guidelines:\n\n1. **Fork the repository** and create a feature branch\n2. **Write tests** for new functionality\n3. **Follow Go conventions** and run `go fmt`\n4. **Update documentation** as needed\n5. **Submit a pull request** with clear description\n\n### Development Setup\n\n```bash\n# Clone repository\ngit clone https://github.com/NeuBlink/syncwright.git\ncd syncwright\n\n# Install dependencies\ngo mod download\n\n# Run tests\nmake test\n\n# Build binary\nmake build\n\n# Test locally\n./bin/syncwright --version\n```\n\n### Code Structure\n\n```\nsyncwright/\n├── cmd/syncwright/     # CLI entry point\n├── internal/\n│   ├── commands/       # Command implementations\n│   ├── gitutils/       # Git operations\n│   ├── payload/        # AI payload generation\n│   └── validate/       # Validation logic\n├── scripts/            # Installation and utilities\n└── action.yml          # GitHub Action definition\n```\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## Support\n\n- **Documentation**: [USAGE.md](USAGE.md), [SECURITY.md](SECURITY.md)\n- **Issues**: [GitHub Issues](https://github.com/NeuBlink/syncwright/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/NeuBlink/syncwright/discussions)\n\n---\n\n**Syncwright** - Making merge conflicts a thing of the past with AI-powered resolution.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneublink%2Fsyncwright","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneublink%2Fsyncwright","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneublink%2Fsyncwright/lists"}