Runtime Manual/Getting Started/Installation

Installation

Install a v1.16.0 binary, or build from source

On macOS or Linux, run the official one-line install script in your terminal:

code
curl -fsSL https://bee.zhanghe.dev/install.sh | sh

# pin a release
curl -fsSL https://bee.zhanghe.dev/install.sh | BEEJS_VERSION=v1.16.0 sh

On Windows (PowerShell):

code
irm https://bee.zhanghe.dev/install.ps1 | iex

Homebrew (formula in the Beejs repo; tap hashes are filled after each GitHub Release):

code
brew install zh30/tap/bee

What the Install Script Does

  1. Detects Environment: Automatically identifies your OS (macOS / Linux) and CPU architecture (Apple Silicon arm64 or Intel x86_64).
  2. Fetches Prebuilt Archive: Downloads the release archive optimized with -O3 and verifies binary integrity.
  3. Deploys Binary: Unpacks the bee executable into ~/.bee/bin/bee.
  4. Configures PATH: Updates your active shell profile (~/.zshrc, ~/.bashrc, etc.) with export PATH="$HOME/.bee/bin:$PATH".

After installation finishes, either restart your terminal or run source ~/.zshrc (or source ~/.bashrc) to start using bee.


Verifying Installation

Verify that bee is properly installed and accessible:

code
# Print version info
bee --version

# Evaluate a quick JavaScript snippet
bee eval "1 + 1"

You should see output similar to:

code
bee 1.16.0
2

Supported Platforms & Requirements

Operating SystemArchitectureMinimum RequirementsPrebuilt Release
macOS (Apple Silicon)arm64 (M1–M4)macOS 12.0+ (Monterey or later)✅ Yes
macOS (Intel)x86_64macOS 12.0+✅ Yes
Linuxx86_64Kernel 4.18+, glibc 2.28+✅ Yes
Linux (ARM64)aarch64Kernel 4.18+, glibc 2.28+✅ Yes
Windowsx86_64Windows 10+install.ps1 zip
NOTE

[!NOTE] Windows also works under WSL 2 with the Unix install.sh script.


Building from Source

To customize Beejs, debug internal subsystems, or build for non-standard architectures, compile directly using the Rust toolchain.

1. Prerequisites

Ensure you have the following installed:

  • Rust 1.97.1 (pinned in this repo; rustup.rs)
  • Clang / LLVM (required for V8 C++ bindings)
  • Python 3 (build helper scripts)

On Ubuntu / Debian:

code
sudo apt update && sudo apt install -y build-essential clang llvm git curl cmake python3

On macOS:

code
xcode-select --install

2. Clone and Build

code
git clone https://github.com/zh30/beejs.git
cd beejs

# Release build with full optimizations
cargo build --release

# The compiled binary is output to:
./target/release/bee --version

3. Install to Global PATH

code
sudo cp ./target/release/bee /usr/local/bin/
bee --version

Environment Variables

VariableDefaultPurpose
BEE_WORKERS1Default number of worker threads for parallel HTTP execution
BEE_HOME~/.beeBase directory for package caches and downloads
BEE_AUDIT_LOGNoneFile path for writing JSONL security sandbox audit records
BEE_LOGinfoLog verbosity (error, warn, info, debug, trace)

Example for ~/.zshrc or Dockerfile:

code
export BEE_WORKERS=8
export BEE_LOG=warn

Uninstallation

To uninstall Beejs, delete the binary directory and remove the PATH entry from your shell configuration:

code
# 1. Remove binary and caches
rm -rf ~/.bee

# 2. Remove the PATH export line from ~/.zshrc or ~/.bashrc