morphir ir migrate
- Usage:
morphir ir migrate [FLAGS] <INPUT>
Migrate IR between versions
Converts Morphir IR between Classic (V1-V3) and V4 formats. Supports local files, URLs, and GitHub shorthand sources.
Examples:
# Migrate to file
morphir ir migrate ./morphir-ir.json -o ./morphir-ir-v4.json --target-version v4
# Migrate from URL
morphir ir migrate https://lcr-interactive.finos.org/server/morphir-ir.json -o ./lcr-v4.json
# Display in console with syntax highlighting (no -o)
morphir ir migrate ./morphir-ir.json
# Downgrade V4 to Classic
morphir ir migrate ./morphir-ir-v4.json -o ./morphir-ir-classic.json --target-version classic
See the IR Migration Guide for detailed real-world examples including the US Federal Reserve FR 2052a regulation model.
Arguments
<INPUT>
Input file, directory, or remote source (e.g., github:owner/repo, URL)
Flags
-o --output <OUTPUT>
Output file or directory (if omitted, displays in console with syntax highlighting)
--target-version <TARGET_VERSION>
Target version: latest, v4/4, classic, v3/3, v2/2, v1/1 (default: latest)
Default: latest
--force-refresh
Force refresh cached remote sources
--no-cache
Skip cache entirely for remote sources
--json
Output result as JSON (for scripting)
--expanded
Use expanded (non-compact) format for V4 output