# @builder.io/mitosis-cli

> mitosis CLI

Latest version **0.14.2** (published 2026-10-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @builder.io/mitosis-cli
pnpm add @builder.io/mitosis-cli
yarn add @builder.io/mitosis-cli
bun add @builder.io/mitosis-cli
```

Provides the command `mitosis`.

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score; popular repo.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.14.2 |
| Published | 2026-10-28 |
| First published | 2021-07-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 12 |
| Unpacked size | 147.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 14458 |
| Maintainers | steve8708, samijaber, teleaziz123, mrkoreye, mhevery, gustavohgs, manucorporat, sanyamkamat, bengirone, kylefowler, builderio-bot, armela, aishwarya_parab, emmaac, sidmohanty11, jcortesebuilder, vishwasgopinath, nicholaskipchumba, floating_dynamo, lihuelg, paprikaf, pabloelisseo, liamdebeasi |

## Links

- npm: https://www.npmjs.com/package/@builder.io/mitosis-cli
- Repository: https://github.com/BuilderIO/mitosis
- Issues: https://github.com/BuilderIO/mitosis/issues
- npm.io page: https://npm.io/package/@builder.io/mitosis-cli

## Dependencies (12)

- [debug](https://npm.io/package/debug.md) ^4.3.4
- [fp-ts](https://npm.io/package/fp-ts.md) ^2.12.2
- [dedent](https://npm.io/package/dedent.md) ^0.7.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [esbuild](https://npm.io/package/esbuild.md) ^0.12.16
- [gluegun](https://npm.io/package/gluegun.md) latest
- [fs-extra](https://npm.io/package/fs-extra.md) ^9.1.0
- [prettier](https://npm.io/package/prettier.md) ^2.6.1
- [ts-morph](https://npm.io/package/ts-morph.md) ^19.0.0
- [fast-glob](https://npm.io/package/fast-glob.md) ^3.2.11
- [cosmiconfig](https://npm.io/package/cosmiconfig.md) 9.0.0
- [@builder.io/mitosis](https://npm.io/package/@builder.io/mitosis.md) 0.14.2

## Recent versions

- 0.14.2 (latest) — 2026-10-28
- 0.0.0-dev-20260605060721 (dev) — 2026-06-05
- 0.14.1 — 2026-09-29
- 0.14.0 — 2026-07-21
- 0.13.2 — 2026-06-05
- 0.13.1 — 2026-06-03
- 0.13.0 — 2026-01-13
- 0.12.1 — 2025-07-18
- 0.12.0 — 2025-06-30
- 0.11.6 — 2025-06-27
- 0.11.5 — 2025-06-25
- 0.11.4 — 2025-06-16
- 0.11.3 — 2025-06-02
- 0.11.2 — 2025-05-30
- 0.11.1 — 2025-05-28
- … 354 more at https://npm.io/package/@builder.io/mitosis-cli/versions

## README

# Mitosis CLI

A CLI for Mitosis.

## Installation

```bash
npm install -g @builder.io/mitosis-cli
```

## Usage

```bash
mitosis compile --to=<format> < <input-file>
cat my-file.tsx | mitosis compile -t=<format>
mitosis compile -t=<format> <input-file>
```

Check the output from `mitosis compile --help`.

**Examples**

```bash
mitosis compile -t react component.tsx
mitosis compile -t react < component.tsx
cat component.tsx | mitosis compile -t html -
mitosis compile -t react --out-dir build -- src/**/*.tsx
```

## Options

Supported formats for `--to` are:

- `reactNative`
- `solid`
- `vue`
- `react`
- `template`
- `html`
- `customElement`
- `mitosis`
- `builder`
- `swift`
- `svelte`
- `liquid`
- `angular`

Supported formats for `--from` are:

- `mitosis`
- `builder`
- `liquid`

## Cook book

Here are some recipes for standard tasks

### Validate how Builder will transform Mitosis

```bash
cat components/postscript.lite.tsx |
  mitosis compile -t builder - |
  mitosis compile -f builder -t mitosis
```

### Run mitosis on file system change

Use a tool like [entr](https://github.com/eradman/entr) or [guard](https://github.com/guard/guard)

```
find . -name '*lite.tsx' | entr make /_
```

## Known issues

- Running `mitosis` from the root of this repository breaks due to some
  dynamic babel configuration look up
- Files that are created as the result of `--out-dir=<dir>` maintain the original
  file extension of the input file, which doesn't make any sense in the case of
  an html output.
- `--out=<file>` does not support concatenating multiple files together.

---
_Source: https://npm.io/package/@builder.io/mitosis-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
