# convert

Convert an existing npm repository into a planned Megamono workspace


## When to use it

Review the conversion plan and unresolved choices before accepting it. Conversion is not an invitation to replace the existing application, lockfile, or release workflow without review.

## Usage

```sh
npm exec -- nx generate @megamono/plugin:convert --appName="<appName>" --dry-run
```

Replace angle-bracket placeholders with reviewed values. Nx's `--dry-run` previews generator writes; remove it only after reviewing the plan. Examples use npm; use your workspace's package manager if it differs.

## Options

Use these options with `@megamono/plugin:convert`. Nx uses the camelCase names shown here; the [CLI reference](/docs/cli) describes command-line aliases. Some options are required only for particular choices.

| Option | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| `appName` | Yes | string | — | What should the existing application be called? |
| `source` | No | string | "." | Workspace-relative source package root. |
| `destination` | No | string | — | Workspace-relative application destination; defaults to apps/<appName>. |
| `interactive` | No | boolean | true | Emit interactive-oriented plan guidance; mutation still requires explicit plan acceptance. |
| `acceptPlan` | No | boolean | false | Explicitly approve the rendered conversion plan for mutation. |
| `verify` | No | string | "config" | Post-flush verification depth. Allowed: "none", "config", "build". |
| `extract` | No | array | [] | Explicit <source>:<destination> library extraction mappings. |
| `resolutions` | No | object | {} | Explicit ownership for otherwise unclassified source-root entries. |
| `report` | No | string | — | Optional workspace-relative path for the Markdown analysis report. |
| `scope` | No | string | "shared" | Nx scope tag and extracted-library import scope. |
| `dryRun` | No | boolean | false | Print the complete plan without changing the virtual tree. |

## Next steps

Review changed files and run the affected project's checks. For options that accept structured values, run the generator's `--help` or consult the schema in the installed package.

- [All generators](/docs/generators)
- [CLI overview](/docs/cli)
- [Adopt an existing workspace](/docs/workflows/adoption)
