The Rust rewrite (morph) introduces a cleaner CLI with direct file morphing and a simplified command structure.
morph app.ts # → app.cpp (default target: C++)
morph app.ts --to cpp # → app.cpp
morph app.ts --to rust # → app.rs (experimental)
morph app.ts --to cpp # → app.cpp (intent-based codegen).ts / .js files allowed (.tsx/.jsx/.mx rejected — use morph build for projects)<basename>.cpp or <basename>.rs with trailing newlinemorph::str, morph::dev_log)int main()| Command | Description |
|---|---|
morph new [name] |
Scaffold a new .mx or .tsx project |
morph install |
Download runtime sources from GitHub |
morph update [--runtime/--self] |
Update runtime or morph binary |
morph dev [--entry] |
Start dev mode with hot reload |
morph build [--static/--no-upx/--output] |
Compile production binary |
morph run [binary] [--static] |
Build and run |
morph check [PATH] [--migrate] |
Lint source files |
morph doctor [-v/-y] |
Verify system dependencies |
morph cache |
Manage fetched CSS cache |
morph new (replaces morph init)
morph new my-app
morph new my-app --width 1024 --height 768 --title "My App" --ext mx -y
morph new . --ext tsx # scaffold into current directorymorph install — Downloads C++ runtime matching morph.config.json runtime.version into ~/.morph/cache/runtimes/cpp/vX.Y.Z/ and symlinks to .morph/runtime/. Creates/updates morph.lock.
morph update
morph update # show current + available versions
morph update --runtime # upgrade runtime (downloads from GitHub Releases)
morph update --self # upgrade morph (downloads the release tarball)morph dev — 100ms debounce, loopback TCP IPC (port 39573, ephemeral fallback on collision), morph_devrt hot reload.
morph build — Fingerprinting incremental builds, UPX/static flags, feature detection.
morph check — Exit code 0 = clean (warnings only don't fail), 1 = errors (CI-friendly).
morph doctor — Reports required tools (g++, cmake, make, pkg-config), mandatory graphics/text libs (GLFW, FreeType, HarfBuzz), and project state. -v shows verbose version info. Missing packages can be auto-installed via -y (no prompt) or an interactive prompt.
Two independent versions:
v0.3.0)v0.2.0)morph --version
# morph 0.3.0 (CLI)
# Runtime: cpp v0.2.0 (from morph.lock)morphPython morph |
Rust morph |
|---|---|
morph init |
morph new |
morph translate file.ts |
morph file.ts --to cpp |
pip install levizr-morph |
cargo install morphc |
| Python runtime + pip deps | Single Rust binary, C++ runtime downloaded by morph install |
See the Migration Guide for full details.