Skip to content

@theme-kit/cli

`theme-kit migrate`

text
theme-kit migrate <file> [options]

Options

OptionDescription
--file <path>Legacy theme file to migrate (or pass positionally).
--output <file>Write the migrated theme to a new file.

Examples

bash
1# Migrate a single legacy theme
2theme-kit migrate themes/legacy.json
3
4# Migrate and write the current format to a new file
5theme-kit migrate \
6  themes/legacy.json \
7  --output themes/current.json

Without --output, the migrated JSON is printed to stdout — use it to diff what changed before overwriting the original.

What migrations cover

The migration layer understands source and target versions, token renames, color remapping, and arbitrary transforms. migrate runs every registered migration between the file's version and the current schema. Back up your themes before a bulk migration.

Exit codes

CodeMeaning
0Migrated (file written or printed).
1Migrating the file failed.
2No theme file supplied.

Next: export.

CLI migrate — Theme Kit