Cross-language project porting and synchronization tool powered by AI agents.
upsync automates the process of porting projects between programming languages and keeping ports synchronized with upstream changes. It uses AI coding agents (Claude Code, Gemini CLI, or Codex CLI) to translate code while maintaining behavioral equivalence.
cargo install --path .At least one AI coding agent must be installed:
- Claude Code (
claude) - Gemini CLI (
gemini) - Codex CLI (
codex)
Create a new port of an upstream project:
upsync port https://github.com/org/project --to rust
upsync port https://github.com/org/project --to go --output my-projectThis will:
- Clone the upstream repository
- Detect the source language
- Create a new project in the target language
- Set up tracking for future synchronization
If you've already manually ported a project and want to track upstream changes:
cd your-ported-project
upsync init https://github.com/org/upstream-projectThis will:
- Clone the upstream repository to
.upstream-cache/ - Detect source and target languages
- Create configuration files for sync tracking
upsync checkFetches the latest upstream commits and reports how many lines have changed since the last sync.
upsync sync # Apply changes
upsync sync --dry-run # Preview what would happenThe sync command:
- Fetches upstream changes
- Generates a diff since the last sync
- Invokes the AI agent to apply equivalent changes
- Runs verification to ensure the build passes
- Updates the sync state
Created in your project root:
upstream: https://github.com/org/project
agent: claude # Optional: claude, gemini, or codex (auto-detected if not set)
target_language: rust # Optional: override detected language
verify_command: cargo check # Optional: custom verification commandTracks synchronization state (managed automatically):
{
"last_synced_commit": "abc123...",
"source_language": "typescript",
"target_language": "rust"
}Local clone of the upstream repository used for fetching changes.
| Language | Extensions | Default Verify Command |
|---|---|---|
| Rust | .rs |
cargo check |
| Go | .go |
go build ./... |
| TypeScript | .ts, .tsx |
npm run build |
| JavaScript | .js, .jsx |
npm run build |
| Python | .py |
python -m py_compile |
| Ruby | .rb |
- |
| Java | .java |
- |
| Kotlin | .kt, .kts |
- |
| Swift | .swift |
- |
| C | .c, .h |
- |
| C++ | .cpp, .hpp, .cc |
- |
| C# | .cs |
- |
- Language Detection: Counts file extensions to determine the dominant language
- Diff Generation: Uses git to track changes between synced commits
- AI Translation: Sends structured prompts to AI agents with:
- Source and target language context
- The upstream diff (for sync) or full codebase (for port)
- Verification commands to run
- Retry Loop: If verification fails, the agent is re-invoked with error context (up to 3 attempts)
MIT