code-transmute
Version:
Convert any codebase into any language โ without changing its brain.
106 lines (79 loc) โข 2.35 kB
Markdown
# ๐ง code-transmute
**Convert any codebase into any language โ without changing its brain.**
[](https://badge.fury.io/js/code-transmute)
[](https://opensource.org/licenses/MIT)
## ๐งฐ Core Idea
code-transmute is a CLI tool and npm package that:
- Uses the OpenAI API to review, plan, and translate codebases into a target language
- Ensures logic parity โ the converted code behaves identically
- Automatically generates review reports, migration plans, executable conversions, tests, and API collections
- Guides the user entirely via interactive CLI prompts
## ๐ Quick Start
```bash
# Install globally
npm install -g code-transmute
# Or use with npx
npx code-transmute init
```
## โ๏ธ CLI Commands
### ๐ง Initialization
```bash
npx code-transmute init
```
Prompts for OpenAI API key, project path, target language, and test options.
### ๐ง Code Review
```bash
npx code-transmute review
```
Generates comprehensive code analysis and architecture mapping.
### ๐ช Migration Planning
```bash
npx code-transmute plan
```
Creates AI-generated step-by-step migration strategy.
### ๐ Code Conversion
```bash
npx code-transmute convert [--dry-run] [--with-tests]
```
Executes the migration plan with optional dry-run mode.
### ๐งช Testing & Reports
```bash
npx code-transmute test
```
Runs generated tests and creates QA documentation.
### ๐ฆ Export
```bash
npx code-transmute export
```
Packages final converted project with all documentation.
## ๐ฎ Example Use Cases
- **Express.js โ FastAPI**: Convert REST APIs to Python with identical endpoints
- **React โ Svelte**: Convert components with no logic change
- **Flask โ NestJS**: Translate Python backend into TypeScript
- **Monolith โ Microservices**: Split modules intelligently
## ๐ Output Structure
```
/converted-project
โโ src/
โโ tests/
โโ docs/
โ โโ review.md
โ โโ migration_plan.md
โ โโ manual_testing.md
โโ api_collection/
โโ test_report.json
โโ conversion_log.json
```
## ๐ ๏ธ Development
```bash
# Install dependencies
npm install
# Development mode
npm run dev
# Build
npm run build
# Test
npm test
```
## ๐ License
MIT ยฉ Parallaxis Innovations