{"id":49294,"library":"schemashift-cli","title":"SchemaShift CLI","description":"TypeScript schema migration CLI that converts between Zod, Yup, Joi, io-ts, Valibot, ArkType, Superstruct, and Effect Schema using AST-based transformations. Current stable version is 0.17.0, released monthly. Supports single-step and chain migrations, dry-run previews, compatibility checks, and integration testing scaffolding. Requires Node >=22.0.0. Differentiator: preserves comments and formatting via AST; includes behavioral difference warnings, bundle size estimation, and performance impact analysis.","status":"active","version":"0.17.0","language":"javascript","source_language":"en","source_url":"https://github.com/jdmay2/schemashift","tags":["javascript","typescript","schema","migration","zod","yup","joi","codemod"],"install":[{"cmd":"npm install schemashift-cli","lang":"bash","label":"npm"},{"cmd":"yarn add schemashift-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add schemashift-cli","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package name is schemashift-cli, not schemashift. Install globally or use npx.","wrong":"npm install -g schemashift && schemashift <command>","symbol":"default (binary)","correct":"npx schemashift-cli <command>"},{"note":"Position of path matters: path is first positional argument, options follow.","wrong":"schemashift --from yup --to zod src/","symbol":"CLI usage","correct":"schemashift migrate src/ -f yup -t zod"},{"note":"Tier features require a license key. Free tier supports basic analyze and migrate.","wrong":"npx schemashift license --activate <key>","symbol":"License file","correct":"scheamsift license activate <key>"}],"quickstart":{"code":"# Initialize config\nnpx schemashift-cli init --force\n\n# Analyze Zod schemas in src/\nnpx schemashift-cli analyze ./src --json --complexity\n\n# Migrate Yup to Zod with dry-run\nnpx schemashift-cli migrate ./src -f yup -t zod -d -v\n\n# Perform migration with backup and git branch\nnpx schemashift-cli migrate ./src -f yup -t zod --git-branch --git-commit --yes\n\n# Rollback if needed\nnpx schemashift-cli rollback --list\nnpx schemashift-cli rollback <backupId>","lang":"bash","description":"Initialize configuration, analyze schemas, run a migration with dry-run, perform migration with git integration, and rollback using backup IDs."},"warnings":[{"fix":"Use `npx schemashift-cli` or reinstall with new package name.","message":"CLI binary was renamed from 'schemashift' to 'schemashift-cli' in v0.15.0. Running 'schemashift' will fail.","severity":"breaking","affected_versions":">=0.15.0"},{"fix":"Upgrade Node.js to v22 or later, or use nvm to switch.","message":"Node version requirement is >=22.0.0. Older Node versions will cause runtime errors.","severity":"gotcha","affected_versions":">=0.17.0"},{"fix":"Use `--advisor` instead, which provides behavioral guidance plus migration advice.","message":"The '--behavioral' flag in analyze command is deprecated since v0.16.0 and will be removed in v1.0.0.","severity":"deprecated","affected_versions":">=0.16.0"},{"fix":"Always specify source version: `-f zod-v3` for Zod v3, `-f zod` for v4.","message":"Migration from 'zod' without specifying version may incorrectly map v4 schemas. Use 'zod-v3' explicitly for Zod v3.","severity":"gotcha","affected_versions":">=0.10.0"},{"fix":"Purchase a Pro+ license and activate with `schemashift-cli license activate <key>`, then add `--cross-file`.","message":"Cross-file schema resolution requires '--cross-file' flag (Pro+ feature) and a license key. Without it, complex dependencies may be missed.","severity":"gotcha","affected_versions":">=0.12.0"},{"fix":"Run `schemashift-cli rollback --clean` periodically to remove old backups.","message":"Backup creation is enabled by default. Use '--no-backup' to suppress. Backups can accumulate and bloat disk space.","severity":"gotcha","affected_versions":">=0.8.0"},{"fix":"Use `-d` flag to preview changes and verify manually before committing.","message":"Migration may produce incorrect output for deeply nested union/discriminated union types. Always review via dry-run first.","severity":"gotcha","affected_versions":"0.x"}],"env_vars":null,"search_vec":"'0.17.0':31 '22.0.0':53 'analysi':71 'arktyp':17 'ast':24,60 'ast-bas':23 'base':25 'behavior':62 'bundl':65 'chain':39 'check':46 'cli':2,6 'codemod':79 'comment':56 'compat':45 'convert':8 'current':27 'differ':63 'differenti':54 'dri':42 'dry-run':41 'effect':20 'estim':67 'format':58 'impact':70 'includ':61 'integr':48 'io':14 'io-t':13 'javascript':72 'joi':12,78 'migrat':5,40,75 'month':33 'node':52 'perform':69 'preserv':55 'preview':44 'releas':32 'requir':51 'run':43 'scaffold':50 'schema':4,21,74 'schemashift':1 'singl':36 'single-step':35 'size':66 'stabl':28 'step':37 'superstruct':18 'support':34 'test':49 'transform':26 'ts':15 'typescript':3,73 'use':22 'valibot':16 'version':29 'via':59 'warn':64 'yup':11,77 'zod':10,76","created_at":"2026-06-07T17:01:01.787705+00:00","updated_at":"2026-06-07T17:01:01.787705+00:00","problems":[{"fix":"Run `npm install -g schemashift-cli` and use `schemashift-cli` instead of `schemashift`.","cause":"Using old binary name or package not installed as 'schemashift-cli'.","error":"Error: Cannot find module 'schemashift'"},{"fix":"Purchase a license and activate it with `schemashift-cli license activate YOUR_KEY`.","cause":"Trying to use a feature that is not available in your current license tier.","error":"Error: This feature requires a Pro+ license. Visit https://schemashift.dev/pricing to purchase."},{"fix":"Review migration output carefully; consider using `--advisor` to get warnings.","cause":"Behavioral difference: Yup's date() coerces strings, Zod's date() does not.","error":"TypeError: yup.date() resulted in a 'string' output instead of 'Date'"},{"fix":"Use `-f zod` for Zod v4, `-f zod-v3` for Zod v3, or check docs for supported libraries.","cause":"Invalid source library specifier.","error":"Error: Unsupported source type 'zod-v4'. Use '-f zod' for version 4 or '-f zod-v3' for version 3."},{"fix":"Run `schemashift-cli init` to create a configuration file, then retry.","cause":"Configuration file missing when required (e.g., when using chain migration or tier features).","error":"Error: ENOENT: no such file or directory, open '.schemashiftrc.json'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://schemashift.qwady.app","github":"https://github.com/jdmay2/schemashift","docs":null,"changelog":null,"pypi":null,"npm":"schemashift-cli","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}