AutoRebase helps re-target feature customizations when a Base SW updates. Given base-OLD, base-NEW, and feature-OLD, it produces feature-NEW with re-applied customizations, machine-readable patchsets, and a human report with traceability and validation.
The MCP (Model Context Protocol) server provides AI-powered conflict resolution and is perfect for integration with AI models like Cursor.
Setup:
cd mcp-server
npm install
npm run buildUsage with Cursor:
- Copy
mcp-server/cursor-mcp-config.jsonto your Cursor MCP configuration - Restart Cursor
- Use AI to call AutoRebase tools directly
Available Tools:
autorebase: Complete AutoRebase process with AI conflict resolutionvalidate_repository: Validate GitHub repositories and SHAs
See mcp-server/README.md for detailed MCP setup instructions.
REST API for programmatic access to AutoRebase functionality.
Setup:
pip install -r api/requirements.txt
python api/main.pyUsage:
curl -X POST "http://localhost:8000/autorebase" \
-H "Content-Type: application/json" \
-d '{
"base_software_0": "main",
"base_software_1": "main",
"feature_software_0": "main",
"base_repo_url": "https://github.com/user/base-repo.git",
"feature_repo_url": "https://github.com/user/feature-repo.git"
}'See README_FASTAPI.md for detailed API documentation.
Command-line interface for direct AutoRebase operations.
Setup:
bash scripts/install_tools.shUsage:
python -m engine.cli.auto_rebase init --old-base data/sample/base-1.0 --new-base data/sample/base-1.1 --feature data/sample/feature-5.0 --req-map data/sample/requirements_map.yaml --workdir artifacts/run1
python -m engine.cli.auto_rebase extract-feature --out artifacts/run1/feature_patch
python -m engine.cli.auto_rebase extract-base --out artifacts/run1/base_patch
python -m engine.cli.auto_rebase retarget --feature-patch artifacts/run1/feature_patch --base-patch artifacts/run1/base_patch --new-base data/sample/base-1.1 --out artifacts/run1/feature-5.1
python -m engine.cli.auto_rebase validate --path artifacts/run1/feature-5.1 --report artifacts/run1/report.html
python -m engine.cli.auto_rebase finalize --path artifacts/run1/feature-5.1 --tag v5.1 --trace artifacts/run1/trace.json- feature-NEW tree with applied changes
- Machine-readable ΔF and ΔB patchsets
- Complete changelog with detailed processing information
- AI-powered conflict resolution using OpenAI
- Requirements-based resolution respecting REQUIREMENTS_MAP.yml
- report.html and report.json (schema-validated)
- trace.json listing requirement IDs per patch unit
- Optional git tag and commit trailers
- Model Context Protocol server for AI integration
- TypeScript/Node.js implementation
- Provides tools for AI models to call AutoRebase functionality
- Supports local SSH authentication and GitHub token authentication
- REST API for programmatic access
- Python implementation with Pydantic models
- Async/await support for concurrent operations
- Comprehensive error handling and validation
- Core AutoRebase logic and algorithms
- Adapter pattern for different file types
- Fallback strategies for missing external tools
- Python implementation with extensive testing
- Next.js web application
- User-friendly interface for AutoRebase operations
- Real-time progress tracking and results visualization
- Python: 3.11+ recommended
- Node.js: 18+ for MCP server and Next.js app
- OpenAI API Key: Required for AI conflict resolution
- Git: Required for repository operations
- Optional external tools: difftastic, gumtree, clang-tidy, coccinelle, dtc, yq, comby
- Uses OpenAI GPT models to intelligently resolve merge conflicts
- Respects REQUIREMENTS_MAP.yml for context-aware resolution
- Validates resolutions with confidence scoring
- Handles complex multi-file conflicts
- Complete processing history with timestamps
- Detailed file-by-file change tracking
- Patch application success/failure logging
- AI resolution statistics and validation scores
- SSH: Uses local SSH keys for GitHub operations
- GitHub Token: Supports personal access tokens
- Public Repositories: No authentication required for read operations
- Local Credentials: Falls back to system Git configuration
- Graceful degradation when external tools are missing
- Comprehensive validation of inputs and outputs
- Detailed error messages with troubleshooting guidance
- Fallback strategies for edge cases
- Formatting/lint: ruff, black, isort configured in
pyproject.toml - Tests:
pytest(seetests/) - CI: GitHub Actions in
.github/workflows/ci.yml - Type Safety: TypeScript for MCP server, Pydantic for Python APIs
- Local Processing: All operations happen on your machine
- No Data Storage: No sensitive data is stored or transmitted
- Secure Authentication: Multiple authentication methods supported
- API Key Management: Secure handling of OpenAI and GitHub tokens
- Public Repository Focus: Designed for open-source workflows
- MCP Server:
mcp-server/README.md- AI integration guide - FastAPI:
README_FASTAPI.md- REST API documentation - Cursor Setup:
mcp-server/CURSOR_SETUP.md- Cursor AI integration - Engine:
engine/README.md- Core algorithm documentation
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly (unit tests + integration tests)
- Submit a pull request
MIT License - see LICENSE file for details.