chore: make bun optional for source builds
This commit is contained in:
@@ -91,7 +91,7 @@ Mapping options (summary):
|
||||
- `hooks.mappings` lets you define `match`, `action`, and templates in config.
|
||||
- `hooks.transformsDir` + `transform.module` loads a JS/TS module for custom logic.
|
||||
- Use `match.source` to keep a generic ingest endpoint (payload-driven routing).
|
||||
- TS transforms require a TS loader (e.g. `bun`) or precompiled `.js` at runtime.
|
||||
- TS transforms require a TS loader (e.g. `bun` or `tsx`) or precompiled `.js` at runtime.
|
||||
- `clawdbot hooks gmail setup` writes `hooks.gmail` config for `clawdbot hooks gmail run`.
|
||||
See [`docs/gmail-pubsub.md`](https://docs.clawd.bot/automation/gmail-pubsub) for the full Gmail watch flow.
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ read_when:
|
||||
|
||||
# Bun
|
||||
|
||||
Goal: run this repo with **Bun** (preferred) without losing pnpm patch behavior.
|
||||
Goal: run this repo with **Bun** (optional) without losing pnpm patch behavior.
|
||||
|
||||
## Status
|
||||
|
||||
- Bun is the preferred local runtime for running TypeScript directly (`bun run …`, `bun --watch …`).
|
||||
- `pnpm` is still fully supported (and used by some docs tooling).
|
||||
- Bun is an optional local runtime for running TypeScript directly (`bun run …`, `bun --watch …`).
|
||||
- `pnpm` is the default for builds and remains fully supported (and used by some docs tooling).
|
||||
- Bun cannot use `pnpm-lock.yaml` and will ignore it.
|
||||
|
||||
## Install
|
||||
|
||||
@@ -14,7 +14,7 @@ read_when:
|
||||
Script: [`scripts/bench-model.ts`](https://github.com/clawdbot/clawdbot/blob/main/scripts/bench-model.ts)
|
||||
|
||||
Usage:
|
||||
- `source ~/.profile && bun scripts/bench-model.ts --runs 10`
|
||||
- `source ~/.profile && pnpm tsx scripts/bench-model.ts --runs 10`
|
||||
- Optional env: `MINIMAX_API_KEY`, `MINIMAX_BASE_URL`, `MINIMAX_MODEL`, `ANTHROPIC_API_KEY`
|
||||
- Default prompt: “Reply with a single word: ok. No punctuation or extra text.”
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ If you want the deeper reference pages, jump to: [Wizard](/wizard), [Setup](/set
|
||||
## 0) Prereqs
|
||||
|
||||
- Node `>=22`
|
||||
- `bun` (preferred) or `pnpm`
|
||||
- `pnpm` (recommended) or `bun` (optional)
|
||||
- Git
|
||||
|
||||
macOS: if you plan to build the apps, install Xcode / CLT. For the CLI + gateway only, Node is enough.
|
||||
@@ -32,13 +32,13 @@ macOS: if you plan to build the apps, install Xcode / CLT. For the CLI + gateway
|
||||
```bash
|
||||
git clone https://github.com/clawdbot/clawdbot.git
|
||||
cd clawdbot
|
||||
bun install
|
||||
pnpm install
|
||||
```
|
||||
|
||||
Note: `pnpm` is also supported:
|
||||
Note: Bun is optional if you prefer running TypeScript directly:
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
bun install
|
||||
```
|
||||
|
||||
## 2) Build the Control UI (recommended)
|
||||
@@ -46,9 +46,9 @@ pnpm install
|
||||
The Gateway serves the browser dashboard (Control UI) when assets exist.
|
||||
|
||||
```bash
|
||||
bun run ui:install
|
||||
bun run ui:build
|
||||
bun run build
|
||||
pnpm ui:install
|
||||
pnpm ui:build
|
||||
pnpm build
|
||||
```
|
||||
|
||||
If you skip UI build, the gateway still works — you just won’t get the dashboard.
|
||||
@@ -56,7 +56,7 @@ If you skip UI build, the gateway still works — you just won’t get the dashb
|
||||
## 3) Run the onboarding wizard
|
||||
|
||||
```bash
|
||||
bun run clawdbot onboard
|
||||
pnpm clawdbot onboard
|
||||
```
|
||||
|
||||
What you’ll choose:
|
||||
@@ -98,7 +98,7 @@ https://github.com/oven-sh/bun/issues/5951
|
||||
### WhatsApp (QR login)
|
||||
|
||||
```bash
|
||||
bun run clawdbot login
|
||||
pnpm clawdbot login
|
||||
```
|
||||
|
||||
Scan via WhatsApp → Settings → Linked Devices.
|
||||
@@ -118,8 +118,8 @@ Default posture: unknown DMs get a short code and messages are not processed unt
|
||||
Approve:
|
||||
|
||||
```bash
|
||||
bun run clawdbot pairing list --provider telegram
|
||||
bun run clawdbot pairing approve --provider telegram <CODE>
|
||||
pnpm clawdbot pairing list --provider telegram
|
||||
pnpm clawdbot pairing approve --provider telegram <CODE>
|
||||
```
|
||||
|
||||
Pairing doc: [Pairing](/pairing)
|
||||
@@ -129,8 +129,8 @@ Pairing doc: [Pairing](/pairing)
|
||||
In a new terminal:
|
||||
|
||||
```bash
|
||||
bun run clawdbot health
|
||||
bun run clawdbot send --to +15555550123 --message "Hello from Clawdbot"
|
||||
pnpm clawdbot health
|
||||
pnpm clawdbot send --to +15555550123 --message "Hello from Clawdbot"
|
||||
```
|
||||
|
||||
If `health` shows “no auth configured”, go back to the wizard and set OAuth/key auth — the agent won’t be able to respond without it.
|
||||
|
||||
@@ -71,21 +71,21 @@ Paste the token into the UI settings (sent as `connect.params.auth.token`).
|
||||
The Gateway serves static files from `dist/control-ui`. Build them with:
|
||||
|
||||
```bash
|
||||
bun run ui:install
|
||||
bun run ui:build
|
||||
pnpm ui:install
|
||||
pnpm ui:build
|
||||
```
|
||||
|
||||
Optional absolute base (when you want fixed asset URLs):
|
||||
|
||||
```bash
|
||||
CLAWDBOT_CONTROL_UI_BASE_PATH=/clawdbot/ bun run ui:build
|
||||
CLAWDBOT_CONTROL_UI_BASE_PATH=/clawdbot/ pnpm ui:build
|
||||
```
|
||||
|
||||
For local development (separate dev server):
|
||||
|
||||
```bash
|
||||
bun run ui:install
|
||||
bun run ui:dev
|
||||
pnpm ui:install
|
||||
pnpm ui:dev
|
||||
```
|
||||
|
||||
Then point the UI at your Gateway WS URL (e.g. `ws://127.0.0.1:18789`).
|
||||
|
||||
@@ -101,6 +101,6 @@ Open:
|
||||
The Gateway serves static files from `dist/control-ui`. Build them with:
|
||||
|
||||
```bash
|
||||
bun run ui:install
|
||||
bun run ui:build
|
||||
pnpm ui:install
|
||||
pnpm ui:build
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user