Forge is an open-source code migration engine that helps you automate large-scale code transformations across your codebase.
- 🔧 SDK - Write custom migration rules in TypeScript with a fluent API
- 🌐 Web Dashboard - Visual interface for managing migration projects
- 💻 VS Code Extension - Integrated development experience
| Package | Description |
|---|---|
| @forge/sdk | SDK for writing custom migration rules |
| @forge/web | Web dashboard for managing migrations |
| forge-vscode | VS Code extension |
- Node.js >= 18.0.0
- npm >= 10.0.0
# Clone the repository
git clone https://github.com/forge/forge-migration.git
cd forge
# Install dependencies
npm install
# Build all packages
npm run build# Start development mode
npm run dev
# Run tests
npm test
# Lint code
npm run lint
# Format code
npm run formatimport { createRule, pattern, replacement } from '@forge/sdk';
const rule = createRule('update-imports')
.name('Update Imports')
.description('Migrate import statements to new package structure')
.include('**/*.ts', '**/*.tsx')
.match(pattern('import { (.*) } from "old-package"', { type: 'regex' }))
.replace(replacement('import { $1 } from "new-package"'))
.build();
export default rule;MIT