CLI commands

master-css migrate

Preview migration from the saved Master CSS v2 RC manifest.

Invocation and options

Invocation
master-css migrate [options] [paths...]

Upgrade a project from its saved v2 RC language contract. Choose --from rc-legacy before named tokens or --from rc-named after named tokens and before the final conditions/modes contract, or --from rc-native after explicit modes and before simple-query/source-lifecycle changes. Record the actual original package version with --source-version; the example version must be replaced if it differs. Save the resolved original manifest before upgrading; RC versions can differ. See Migrating from Master CSS v2 RC.

paths
path[]Optional

Source files, directories, or glob patterns

--from <profile>
valueOptional

Saved RC language profile. (choices: "rc-legacy", "rc-named", "rc-native", "rc-managed", "rc-utilities", "rc-sizing")

--source-version <version>
valueOptional

Actual saved RC package version, unless present in the manifest metadata.

--manifest <path>
valueOptional

Original resolved RC manifest, saved before upgrading. (default: "master.rc.manifest.json")

--entry <path>
valueOptional

Master CSS entry for generated migration variants; required when multiple entries exist.

--target-manifest <path>
valueOptional

Compiled migrated project manifest for custom utilities.

--write
flagOptional

Apply safe edits only when the selected files have no review diagnostics.

-h, --help
flagOptional

display help for command

Complete command help
TEXT
Usage: master-css migrate [options] [paths...]Preview migration from the saved Master CSS v2 RC manifest.Arguments:  paths                       Source files, directories, or glob patternsOptions:  --from <profile>            Saved RC language profile. (choices: "rc-legacy",                              "rc-named", "rc-native", "rc-managed",                              "rc-utilities", "rc-sizing")  --source-version <version>  Actual saved RC package version, unless present in                              the manifest metadata.  --manifest <path>           Original resolved RC manifest, saved before                              upgrading. (default: "master.rc.manifest.json")  --entry <path>              Master CSS entry for generated migration variants;                              required when multiple entries exist.  --target-manifest <path>    Compiled migrated project manifest for custom                              utilities.  --write                     Apply safe edits only when the selected files have                              no review diagnostics.  -h, --help                  display help for command

Effects and lifecycle

The default operation only proposes edits. --write applies verified edits only when the entire selected batch has no review diagnostics. Dynamic classes, selector references, ambiguous names, and uncertain cascade changes require manual review. Missing or invalid original configuration stops the command before writing. Complex queries can produce stable custom-variant definitions; select --entry when more than one CSS entry is available.

Output and errors

JSON stdout contains version: 2, from, sourceVersion, configurationCSS, notes, mode, manifest, and per-file edits, review, and written results. Read all review diagnostics. --manifest selects the saved RC manifest; --target-manifest supplies a migrated manifest for custom utilities. Without a target file, the new preset is combined with original project token resources for equivalence checking.

Example

Run from the project root after installing the CLI:

Preview an upgrade using the saved original manifest:

SH
master-css migrate src app.css --from rc-legacy --source-version 2.0.0-rc.87 --manifest master.rc.manifest.json

Apply a reviewed batch with no unresolved diagnostics:

SH
master-css migrate src app.css --from rc-legacy --source-version 2.0.0-rc.87 --manifest master.rc.manifest.json --write

Verify custom definitions against their migrated manifest:

SH
master-css migrate src app.css --from rc-legacy --source-version 2.0.0-rc.87 --manifest master.rc.manifest.json --target-manifest master.v2.manifest.json

See the CLI guide for setup.


© 2026 Aoyue Design LLC.MIT License
Trademark Policy