Installation
Install a v1.16.0 binary, or build from source
Quick Install (Recommended)
On macOS or Linux, run the official one-line install script in your terminal:
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):
irm https://bee.zhanghe.dev/install.ps1 | iex
Homebrew (formula in the Beejs repo; tap hashes are filled after each GitHub Release):
brew install zh30/tap/bee
What the Install Script Does
- Detects Environment: Automatically identifies your OS (macOS / Linux) and CPU architecture (Apple Silicon
arm64or Intelx86_64). - Fetches Prebuilt Archive: Downloads the release archive optimized with
-O3and verifies binary integrity. - Deploys Binary: Unpacks the
beeexecutable into~/.bee/bin/bee. - Configures PATH: Updates your active shell profile (
~/.zshrc,~/.bashrc, etc.) withexport 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:
# Print version info
bee --version
# Evaluate a quick JavaScript snippet
bee eval "1 + 1"
You should see output similar to:
bee 1.16.0
2
Supported Platforms & Requirements
| Operating System | Architecture | Minimum Requirements | Prebuilt Release |
|---|---|---|---|
| macOS (Apple Silicon) | arm64 (M1–M4) | macOS 12.0+ (Monterey or later) | ✅ Yes |
| macOS (Intel) | x86_64 | macOS 12.0+ | ✅ Yes |
| Linux | x86_64 | Kernel 4.18+, glibc 2.28+ | ✅ Yes |
| Linux (ARM64) | aarch64 | Kernel 4.18+, glibc 2.28+ | ✅ Yes |
| Windows | x86_64 | Windows 10+ | ✅ install.ps1 zip |
[!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:
sudo apt update && sudo apt install -y build-essential clang llvm git curl cmake python3
On macOS:
xcode-select --install
2. Clone and Build
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
sudo cp ./target/release/bee /usr/local/bin/
bee --version
Environment Variables
| Variable | Default | Purpose |
|---|---|---|
BEE_WORKERS | 1 | Default number of worker threads for parallel HTTP execution |
BEE_HOME | ~/.bee | Base directory for package caches and downloads |
BEE_AUDIT_LOG | None | File path for writing JSONL security sandbox audit records |
BEE_LOG | info | Log verbosity (error, warn, info, debug, trace) |
Example for ~/.zshrc or Dockerfile:
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:
# 1. Remove binary and caches
rm -rf ~/.bee
# 2. Remove the PATH export line from ~/.zshrc or ~/.bashrc