# mono-vir

> Super simple npm based mono-repo tooling.

Latest version **2.5.1** (published 2026-07-29) · (MIT OR CC0-1.0) license · 0 weekly downloads

## Install

```sh
npm install mono-vir
pnpm add mono-vir
yarn add mono-vir
bun add mono-vir
```

Provides the command `mono-vir`.

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.5.1 |
| Published | 2026-07-29 |
| First published | 2023-05-15 |
| Weekly downloads | 0 |
| License | (MIT OR CC0-1.0) |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 7 |
| Unpacked size | 83 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | electrovir |
| Maintainers | electrovir |
| Keywords | monorepo, mono, repo, mono-repo, build, npm, tooling, for each |

## Links

- npm: https://www.npmjs.com/package/mono-vir
- Repository: https://github.com/electrovir/mono-vir
- Issues: https://github.com/electrovir/mono-vir/issues
- npm.io page: https://npm.io/package/mono-vir

## Dependencies (7)

- [tsx](https://npm.io/package/tsx.md) ^4.23.1
- [cli-vir](https://npm.io/package/cli-vir.md) ^1.0.4
- [runstorm](https://npm.io/package/runstorm.md) ^1.0.6
- [@viz-js/viz](https://npm.io/package/@viz-js/viz.md) ^3.28.0
- [@augment-vir/node](https://npm.io/package/@augment-vir/node.md) ^32.2.1
- [@augment-vir/assert](https://npm.io/package/@augment-vir/assert.md) ^32.2.1
- [@augment-vir/common](https://npm.io/package/@augment-vir/common.md) ^32.2.1

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 2.5.1 (latest) — 2026-07-29
- 2.5.0 — 2026-02-20
- 2.4.3 — 2026-01-01
- 2.4.2 — 2025-12-09
- 2.4.1 — 2025-10-08
- 2.4.0 — 2025-10-02
- 2.3.0 — 2025-09-08
- 2.2.2 — 2025-08-21
- 2.2.1 — 2025-08-20
- 2.2.0 — 2025-08-18
- 2.1.0 — 2025-08-18
- 2.0.7 — 2025-08-17
- 2.0.6 — 2025-04-21
- 2.0.5 — 2024-12-10
- 2.0.4 — 2024-11-18
- … 16 more at https://npm.io/package/mono-vir/versions

## README

# mono-vir

Super simple npm mono-repo tooling.

Uses npm workspaces and `package.json` dependencies to determine build order.

## Features

-   runs commands for each package in correct order based on each package's dependency graph
-   relies on `package.json`'s `workspaces` property: no need to duplicate this information in another config
-   [TSConfig reference paths](https://www.typescriptlang.org/docs/handbook/project-references.html) are not required
-   [TSConfig `composite` option](https://www.typescriptlang.org/tsconfig#composite) is not required
-   [TSConfig `declarationMap` option](https://www.typescriptlang.org/tsconfig#declarationMap) is not required

## Installation

```bash
npm i mono-vir
```

## Usage

Note: You must first setup [npm workspaces](https://docs.npmjs.com/cli/using-npm/workspaces) (use a `workspaces` property in your `package.json`).

```bash
mono-vir <command> <command-inputs>
```

-   `<command>`: the `mono-vir` command you wish to run.
-   `<command-inputs>`: inputs to the `mono-vir` command in the bullet above.

### `for-each`

`for-each` will run a given bash command for each workspace package. The `<command-inputs>` are considered the bash command to run. Projects will be run in order based on their dependency graph.

Examples:

-   run type checking for each workspace package:
    ```bash
    npx mono-vir for-each tsc --noEmit
    ```
-   run "npm start" for each workspace package:
    ```bash
    npx mono-vir for-each npm start
    ```

### `for-each-async`

`for-each-async` is the same as `for-each` but it runs the command for each package in parallel.

### `for-each-tree`

`for-each-tree` is the same as `for-each` but it runs the commands in dependency order with non-dependent packages running in parallel.

### `print`

`print` dumps the mono-repo's dependency graph to an SVG file. Accepts no command inputs.

## Full Example

To see an example repo setup that this package works for, go to this package's test files: https://github.com/electrovir/mono-vir/tree/main/test-files/augment-vir

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