Skip to main content

Command

Enum Command 

Source
pub enum Command {
Show 35 variants Version, List { path: PathBuf, category: Option<String>, tag: Option<String>, }, Search { query: String, path: PathBuf, category: Option<String>, maturity: Option<String>, }, History { limit: usize, }, Init { path: PathBuf, }, Plan { path: PathBuf, tag: Option<String>, }, Explain { file: PathBuf, }, Run {
Show 22 fields args: Vec<String>, write: bool, dry_run: bool, review: bool, autofix: bool, verbose: bool, summary_only: bool, max_preview_lines: Option<usize>, allow_risky: bool, strict: bool, report_json: bool, report_md: bool, report_dir: PathBuf, format: bool, prettier: bool, no_format: bool, jobs: Option<usize>, sequential: bool, package: Option<String>, profile: Option<String>, output_style: Option<String>, tag: Option<String>,
}, Sessions, Session { id: String, }, Rollback { session_id: String, preview: bool, force: bool, }, Replay { session_id: String, write: bool, }, Resume { checkpoint: String, }, Scans, Completions { shell: Shell, }, Scan { action: Option<ScanAction>, path: PathBuf, tag: Option<String>, verbose: bool, }, Deps { path: PathBuf, }, Score { path: PathBuf, format: String, }, Simulate { recipes: Vec<String>, path: PathBuf, }, Dashboard { port: u16, }, Magic { path: PathBuf, }, ValidateRepo { path: PathBuf, }, Benchmark { path: PathBuf, }, Graph { graph_type: String, format: String, path: PathBuf, }, Preset { action: PresetAction, }, Verify { path: PathBuf, }, Watch { path: PathBuf, recipes: Vec<String>, debounce_ms: u64, }, Ai { action: AiAction, }, Manifest { action: ManifestAction, }, Plugins { action: PluginAction, }, Ignored { path: PathBuf, detailed: bool, }, DryRuns, DryRun { action: DryRunAction, }, Docs, Doctor { path: PathBuf, },
}

Variants§

§

Version

Print the current morph-cli version

§

List

List available migration recipes

Fields

§path: PathBuf
§category: Option<String>

Filter recipes by category (e.g. migration, cleanup, modernization, analysis, experimental)

§tag: Option<String>

Filter recipes by tag (e.g. safe, fast, risky, typescript, react, backend, frontend)

§

Search

Search for recipes matching a query

Fields

§query: String

Search query (matches name, description, category, tags)

§path: PathBuf
§category: Option<String>

Filter by category (e.g. migration, cleanup, modernization, analysis, experimental)

§maturity: Option<String>

Filter by maturity (e.g. stable, beta, experimental)

§

History

Show migration history summaries

Fields

§limit: usize

Limit the number of sessions to display

§

Init

Initialize a new morph-cli.toml configuration file

Fields

§path: PathBuf
§

Plan

Plan recommended migration recipes for a project

Fields

§path: PathBuf
§tag: Option<String>

Filter by file tag (e.g. commonjs, esm, react, typescript, risky, generated, ignored)

§

Explain

Explain migration detection for a file

Fields

§file: PathBuf
§

Run

Run a recipe against a target path

Fields

§args: Vec<String>
§write: bool
§dry_run: bool
§review: bool
§autofix: bool
§verbose: bool
§summary_only: bool
§max_preview_lines: Option<usize>
§allow_risky: bool
§strict: bool
§report_json: bool

Generate JSON report

§report_md: bool

Generate Markdown report

§report_dir: PathBuf

Output directory for reports

§format: bool

Enable formatting preservation

§prettier: bool

Use Prettier for formatting

§no_format: bool

Disable formatting

§jobs: Option<usize>

Number of parallel jobs (default: CPU count)

§sequential: bool

Run sequentially (disable parallelism)

§package: Option<String>

Limit execution to a workspace package by package name

§profile: Option<String>

Profile name to load config overrides from

§output_style: Option<String>

Output style (minimal, default, detailed)

§tag: Option<String>

Filter by file tag (e.g. commonjs, esm, react, typescript, risky, generated, ignored)

§

Sessions

List migration run sessions

§

Session

Show a migration run session

Fields

§

Rollback

Rollback files from a previous transformation session

Fields

§session_id: String
§preview: bool
§force: bool
§

Replay

Replay a previous transformation session with stored options

Fields

§session_id: String
§write: bool

Apply changes (write to disk), overrides stored mode if true

§

Resume

Resume migration from a saved checkpoint

Fields

§checkpoint: String

Checkpoint ID to resume from

§

Scans

List scan snapshots

§

Completions

Generate shell completion scripts

Fields

§shell: Shell

The shell to generate completions for

§

Scan

Scan project and detect technologies

Fields

§path: PathBuf
§tag: Option<String>

Filter by file tag (e.g. commonjs, esm, react, typescript, risky, generated, ignored)

§verbose: bool

Show verbose skip output

§

Deps

Analyze lightweight dependencies

Fields

§path: PathBuf
§

Score

Calculate modernization score and readiness

Fields

§path: PathBuf
§format: String

Output format (text or json)

§

Simulate

Simulate migration impact without transforming files

Fields

§recipes: Vec<String>

Recipes to simulate; repeat to select multiple recipes

§path: PathBuf
§

Dashboard

Start the local dashboard backend

Fields

§port: u16

Port to listen on (default: 8080)

§

Magic

Start a guided migration workflow

Fields

§path: PathBuf
§

ValidateRepo

Run a full validation suite on a repository (scan, detect, dry-run, verify)

Fields

§path: PathBuf
§

Benchmark

Benchmark Morph execution performance on the target path

Fields

§path: PathBuf
§

Graph

Generate visualization graphs (Mermaid or JSON)

Fields

§graph_type: String

Type of graph to generate (pipeline, workspace, deps)

§format: String

Output format (mermaid or json)

§path: PathBuf
§

Preset

Manage preset workflows

Fields

§

Verify

Verify the integrity of transformed files (syntax, imports, exports)

Fields

§path: PathBuf
§

Watch

Watch for file changes and re-run migration analysis

Fields

§path: PathBuf
§recipes: Vec<String>

Recipe to analyze; repeat to select multiple recipes

§debounce_ms: u64

Debounce delay in milliseconds

§

Ai

AI-powered suggestions and analysis

Fields

§action: AiAction
§

Manifest

Manage and run migration manifests

Fields

§

Plugins

Manage plugins

Fields

§

Ignored

View ignored and skipped files with reasons

Fields

§path: PathBuf
§detailed: bool

Show detailed list of all ignored files instead of a summary

§

DryRuns

List all dry-run execution snapshots

§

DryRun

View detailed metrics of a specific dry-run execution snapshot

Fields

§

Docs

Generate markdown documentation for Morph CLI components

§

Doctor

Check repository health and environment

Fields

§path: PathBuf

Trait Implementations§

Source§

impl Debug for Command

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Command

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Command

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Send for T
where T: ?Sized,

Source§

impl<T> Sync for T
where T: ?Sized,