AST-based transforms between Zod, Yup, Joi, io-ts, Valibot, ArkType, Superstruct, and Effect Schema. Backup everything. Rollback anything.
npm install -g schemashift-cli
import * as yup from 'yup';
const userSchema = yup.object({
name: yup.string().required(),
email: yup.string().email().required(),
age: yup.number().min(0).max(150),
});
import { z } from 'zod';
const userSchema = z.object({
name: z.string(),
email: z.string().email(),
age: z.number().min(0).max(150).optional(),
});
One command. Full AST transformation. Type helpers, imports, and method chains all converted.
Supports
Scan your project. Detect schema libraries, patterns, and migration complexity.
schemashift analyze ./src
Transform schemas with AST precision. Imports, types, and method chains are all rewritten.
schemashift migrate ./src -f yup -t zod
Contract-test migrated schemas. Every backup is timestamped for instant rollback.
schemashift verify ./src -f yup -t zod
Uses ts-morph for real TypeScript AST manipulation. Handles nested schemas, chained methods, and string-literal safety — not fragile regex.
Every migration creates a timestamped backup. Restore originals instantly with schemashift rollback.
Handles 20+ breaking changes: .merge(), .superRefine(), z.nativeEnum(), error params, .pipe(), and more.
Auto-rewrites @hookform/resolvers imports. Detects react-hook-form, Formik, and Mantine and warns about adapter changes.
Detects coercion, validation order, and error format differences between libraries before you migrate.
Auto-detects npm/Yarn/pnpm workspaces with topological ordering for correct migration order across packages.
SARIF for GitHub Code Scanning, JUnit test reporting. Templates for GitHub Actions, GitLab CI, and Azure DevOps.
Verify migrated schemas produce the same validation results as originals with sample generation and parity scoring.
$ schemashift migrate ./src -f yup -t zod --dry-run
SchemaShift v0.10.0
Analyzing 24 schema files...
src/schemas/user.ts +12 -14 0 warnings
src/schemas/product.ts +8 -9 0 warnings
src/schemas/order.ts +15 -18 1 warning
src/schemas/auth.ts +6 -7 0 warnings
... 20 more files
Summary: 24 files, 41 added, 48 removed, 1 warning
Dry run complete. No files were modified.
Run without --dry-run to apply changes.
| Migration Path | Free | Individual | Pro | Team |
|---|---|---|---|---|
| Yup → Zod | ✓ | ✓ | ✓ | ✓ |
| Joi → Zod | ✓ | ✓ | ✓ | ✓ |
| Zod v3 → v4 | — | ✓ | ✓ | ✓ |
| io-ts → Zod | — | — | ✓ | ✓ |
| Zod ↔ Valibot | — | — | ✓ | ✓ |
| Zod → Yup | — | — | ✓ | ✓ |
| Valibot → Zod | — | — | ✓ | ✓ |
| Zod ↔ ArkType | — | — | ✓ | ✓ |
| Zod ↔ Superstruct | — | — | ✓ | ✓ |
| io-ts → Effect Schema | — | — | ✓ | ✓ |
Start free. Upgrade when you need more.
Beyond basic migration. Deep analysis and enterprise-grade controls.
Step-by-step guides with before/after code, conversion tables, and edge cases.