> ## Documentation Index
> Fetch the complete documentation index at: https://agdiai-597e782f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Bun (Experimental)

# Bun (Experimental)

> [!WARNING]
>
> Bun is **not recommended for gateway runtime** (known issues with WhatsApp and Telegram). Use Node for production.

Bun is an optional local runtime for running TypeScript directly (`bun run ...`, `bun --watch ...`). The default package manager remains `pnpm`, which is fully supported and used by docs tooling. Bun cannot use `pnpm-lock.yaml` and will ignore it.

## Install

**1. Install dependencies**

```sh theme={"theme":{"light":"min-light","dark":"min-dark"}}
bun install
```

`bun.lock` / `bun.lockb` are gitignored, so there is no repo churn. To skip lockfile writes entirely:

```sh theme={"theme":{"light":"min-light","dark":"min-dark"}}
bun install --no-save
```

**2. Build and test**

```sh theme={"theme":{"light":"min-light","dark":"min-dark"}}
bun run build
bun run vitest run
```

## Lifecycle Scripts

Bun blocks dependency lifecycle scripts unless explicitly trusted. For this repo, the commonly blocked scripts are not required:

* `@whiskeysockets/baileys` `preinstall` -- checks Node major >= 20 (Agdi defaults to Node 24 and still supports Node 22 LTS, currently `22.14+`)
* `protobufjs` `postinstall` -- emits warnings about incompatible version schemes (no build artifacts)

If you hit a runtime issue that requires these scripts, trust them explicitly:

```sh theme={"theme":{"light":"min-light","dark":"min-dark"}}
bun pm trust @whiskeysockets/baileys protobufjs
```

## Caveats

Some scripts still hardcode pnpm (for example `docs:build`, `ui:*`, `protocol:check`). Run those via pnpm for now.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.