# @voltiso/script

> NPM scripts as code.

Latest version **3.0.0** (published 2026-03-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @voltiso/script
pnpm add @voltiso/script
yarn add @voltiso/script
bun add @voltiso/script
```

Provides the commands `v`, `voltiso`.

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2026-03-26 |
| First published | 2022-09-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 18 |
| Dependencies | 5 |
| Unpacked size | 118.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | atablash |

## Links

- npm: https://www.npmjs.com/package/@voltiso/script
- Repository: https://github.com/voltiso/mono
- Homepage: https://github.com/voltiso/mono#readme
- Issues: https://github.com/voltiso/mono/issues
- npm.io page: https://npm.io/package/@voltiso/script

## Dependencies (5)

- [esbuild](https://npm.io/package/esbuild.md) ^0.27.3
- [pidtree](https://npm.io/package/pidtree.md) ^0.6.0
- [picocolors](https://npm.io/package/picocolors.md) ^1.1.1
- [esbuild-register](https://npm.io/package/esbuild-register.md) ^3.5.0
- [@voltiso/util.node](https://npm.io/package/@voltiso/util.node.md) ^1.0.6

## Recent versions

- 3.0.0 (latest) — 2026-03-26
- 2.2.1 — 2026-02-24
- 2.2.0 — 2026-02-22
- 2.1.2 — 2025-05-17
- 2.1.1 — 2025-05-17
- 2.1.0 — 2024-11-27
- 2.0.10 — 2024-11-27
- 2.0.9 — 2024-11-27
- 2.0.8 — 2023-04-24
- 2.0.7 — 2023-02-25
- 2.0.6 — 2023-02-06
- 2.0.5 — 2023-02-06
- 2.0.4 — 2023-02-06
- 2.0.3 — 2023-02-06
- 2.0.2 — 2023-02-06
- … 13 more at https://npm.io/package/@voltiso/script/versions

## README

# `@voltiso/script`

NPM scripts as code.

# Use in _YOUR_ project

```sh
pnpm add -D @voltiso/script
```

## Define some scripts

Create `scripts.ts` files in your project directory, or any directory above it,
e.g.:

```ts
// scripts.ts
import { parallel } from '@voltiso/script'

export const build = 'tsc -b'

export const lintBiome = 'biome lint'
export const lintTsc = 'tsc --noEmit'

export const lint = parallel(lintBiome, lintTsc)

export const check = [build, lint] // sequential

export const custom = async () => {
	console.log('custom script')
	return 'pnpm publish' // optional return
}
```

## CLI Usage

```sh
pnpm exec v [command]
```

...or - longer version:

```sh
pnpm exec voltiso-script [command]
```

The script is searched for in this order:

1. `package.json` scripts
2. `scripts.ts` file in the current directory
3. `scripts.ts` file in the parent directory, and so on

Even if the script is found in a directory above, the `cwd` does _NOT_ change.
This allows defining common scripts in a parent directory, instead of
duplicating them in every project.

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