Metaplex JS → Umi Migration Codemod
Automated migration tool for upgrading from @metaplex-foundation/js to the modern @metaplex-foundation/umi framework.
What it does
This codemod handles the following transformations:
1. Initialization
typescript
2. Finding NFTs
typescript
3. Creating NFTs
typescript
4. Updating NFTs
typescript
5. Uploading Metadata
typescript
6. PublicKey Handling
typescript
Usage
Run this codemod on your project:
bash
Or with a specific path:
bash
Migration Strategy
The codemod uses a 3-stage pipeline:
- AST Transform (80-90% automation) - Deterministic pattern matching and replacement
- AI Fixups (10-20% remaining) - GPT-4o handles complex edge cases
- Prettier - Code formatting
Package Updates
After running the codemod, update your package.json:
bash
Known Limitations
- Custom plugin configurations may need manual adjustment
- Complex wallet adapters might require manual intervention
- Some advanced Metaplex patterns may need review
Test Fixtures
See tests/fixtures/ for before/after examples covering:
- Basic NFT lookup
- NFT creation
- NFT updates
- Metadata uploads
- Class-based patterns
Author
Ayan Uali ayanuali@gmail.com
License
MIT