# piral-cli-bun

> Provides debug and build capabilities for pilets and Piral instances using Bun.

Latest version **1.1.0** (published 2026-03-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install piral-cli-bun
pnpm add piral-cli-bun
yarn add piral-cli-bun
bun add piral-cli-bun
```

## Health

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

Positive: has types; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2026-03-18 |
| First published | 2023-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=16.0 |
| Dependencies | 7 |
| Unpacked size | 57.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1 |
| Author | smapiot |
| Maintainers | florianrappl |
| Keywords | piral-cli, piral, plugin, bun, build, debug, bundle |

## Links

- npm: https://www.npmjs.com/package/piral-cli-bun
- Repository: https://github.com/smapiot/piral-cli-bun
- Homepage: https://piral.io
- Issues: https://github.com/smapiot/piral-cli-bun/issues
- Funding: https://github.com/sponsors/smapiot
- npm.io page: https://npm.io/package/piral-cli-bun

## Dependencies (7)

- [cheerio](https://npm.io/package/cheerio.md) 1.0.0
- [debounce](https://npm.io/package/debounce.md) ^2.0.0
- [@babel/cli](https://npm.io/package/@babel/cli.md) ^7.15.7
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.15.8
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.15.8
- [bun-codegen-loader](https://npm.io/package/bun-codegen-loader.md) 2.1.0
- [esbuild-auto-path-plugin](https://npm.io/package/esbuild-auto-path-plugin.md) ^1.0.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

- 1.1.0 (latest) — 2026-03-18
- 1.1.0-beta.edf5a93 (next) — 2026-08-08
- 1.0.0-beta.b61120c — 2026-03-18
- 1.0.0-beta.8621 — 2026-03-17
- 1.0.0-beta.7699 — 2024-12-26
- 1.0.0-beta.7698 — 2024-12-26
- 1.0.0 — 2024-03-15
- 1.0.0-beta.6872 — 2024-03-15
- 1.0.0-beta.6496 — 2024-01-19
- 1.0.0-beta.6334 — 2023-12-06
- 1.0.0-beta.6333 — 2023-12-06
- 1.0.0-beta.6332 — 2023-12-06
- 1.0.0-beta.6329 — 2023-12-05
- 1.0.0-beta.6327 — 2023-12-05
- 1.0.0-beta.6185 — 2023-10-25

## README

[![Piral Logo](https://github.com/smapiot/piral/raw/main/docs/assets/logo.png)](https://piral.io)

# [Piral CLI bun](https://piral.io) &middot; [![GitHub License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/smapiot/piral-cli-bun/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/piral-cli-bun.svg?style=flat)](https://www.npmjs.com/package/piral-cli-bun) [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://jestjs.io) [![Community Chat](https://img.shields.io/discord/1222632475449229352)](https://discord.gg/kKJ2FZmK8t)

This plugin enables using [bun](https://bun.sh) as the bundler for Piral instances and pilets.

## Installation

```sh
bun add piral-cli-bun --dev
```

**Note**: The plugin has to be installed to tell the `piral-cli` to use bun as the default bundler.

## Using

There is nothing to do. Standard commands such as `piral build` or `pilet debug` will now work with bun as the bundler.

This plugin comes with batteries included. You don't need to install or specify your bun version - it will use what you have installed.

### Customizing

If you want to customize the given config (e.g., to add more plugins) then create a file *bun.config.js* in your root directory.

In the most trivial version the file looks as follows:

```js
module.exports = function(options) {
  return options;
};
```

This would just receive the original build options and return them, i.e., essentially not doing anything. If you want to add some plugin you could do:

```js
const { somePlugin } = require('bun-some-plugin');

module.exports = function(options) {
  options.plugins.push(somePlugin());
  return options;
};
```

There are no overrides applied afterwards. Therefore, what you modify will remain in the options.

## License

Piral is released using the MIT license. For more information see the [license file](./LICENSE).

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