AphrodyBun GitHub

Runtime docs · Runtime · Get Started

Installation

Install the Aphrody runtime with the install script, npm, or a release archive.

Overview

The Aphrody runtime ships as a single executable, bun. Inside an Aphrody installation, the distribution installs and updates it. Elsewhere, install it with the install script, npm, or a release archive from GitHub releases.

After installation, verify with bun --version and bun --revision.

Installation

curl
curl -fsSL https://bun.aphrody.com/install.sh | bash

Linux users: You need the unzip package to install Bun (sudo apt install unzip). The script picks the musl archive on Alpine and other musl systems.

macOS users: The latest release has no macOS binary. Install aphrody-v1.4.3-aphrody.2, the last release with macOS builds (bash -s aphrody-v1.4.3-aphrody.2), or build from source.

PowerShell
powershell -c "irm https://bun.aphrody.com/install.ps1|iex"

Bun requires Windows 10 version 1809 or later.

npm
npm install -g @aphrody/bun-runtime

@aphrody/bun-runtime installs the binary for the current platform through optional dependencies. It is published after the GitHub release, so its version can lag behind.

The scripts are scripts/aphrody/install.sh and install.ps1. They download the release archive for the current platform, check it against the release's SHA256SUMS.txt, and install bun and bunx into $BUN_INSTALL/bin (default ~/.bun/bin). Set GITHUB_TOKEN to authenticate the release lookup.

To check that Bun was installed successfully, open a new terminal window and run:

bun --version
# Output: 1.4.3-aphrody.4

# See the release and the commit of aphrody-labs/bun that you're using
bun --revision
# Output: 1.4.3-aphrody.4+86ad19e8c

bun --version prints the component version. Bun.version and process.versions.bun keep the upstream Bun base version (1.4.3).

If you've installed Bun but are seeing a command not found error, you may have to manually add the installation directory (~/.bun/bin) to your PATH.

Add Bun to your PATH

Determine which shell you're using

echo $SHELL
# /bin/zsh  or /bin/bash or /bin/fish

Open your shell configuration file

  • For bash: ~/.bashrc
  • For zsh: ~/.zshrc
  • For fish: ~/.config/fish/config.fish

Add the Bun directory to PATH

Add these lines to your configuration file:

export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"

Reload your shell configuration

source ~/.bashrc  # or ~/.zshrc

Determine if the bun binary is properly installed

& "$env:USERPROFILE\.bun\bin\bun" --version

If the command runs successfully but bun --version is not recognized, bun is not in your system's PATH. To fix this, open a PowerShell terminal and run the following command:

[System.Environment]::SetEnvironmentVariable(
  "Path",
  [System.Environment]::GetEnvironmentVariable("Path", "User") + ";$env:USERPROFILE\.bun\bin",
  [System.EnvironmentVariableTarget]::User
)

Restart your terminal

Restart your terminal and test with bun --version.

bun --version

Upgrading

Once installed, the binary can upgrade itself to the latest aphrody-v* release:

bun upgrade

Installing Older Versions

Pass an upstream base version (the newest aphrody.<n> release of that base) or an exact release tag to the install script.

curl -fsSL https://bun.aphrody.com/install.sh | bash -s 1.4.3
curl -fsSL https://bun.aphrody.com/install.sh | bash -s aphrody-v1.4.3-aphrody.2
PowerShell
& ([scriptblock]::Create((irm https://bun.aphrody.com/install.ps1))) -Version aphrody-v1.4.3-aphrody.2

Direct Downloads

Release archives are attached to each release on the releases page, with a SHA256SUMS.txt. Archive names follow upstream Bun: bun-<os>-<arch>[-musl].zip, each containing bun-<os>-<arch>[-musl]/bun (bun.exe on Windows).

ArchivePlatform
bun-linux-x64.zipLinux x64, glibc
bun-linux-x64-musl.zipLinux x64, musl (Alpine)
bun-windows-x64.zipWindows x64

The targets of each release are listed in RELEASES.md. aphrody-v1.4.3-aphrody.2 also has macOS, Linux ARM64 and Windows ARM64 archives.

A glibc binary needs the glibc version of the system it was built on, or newer. The glibc requirement of each release is in its notes. If bun fails with GLIBC_... not found, use an older release or build from source.


CPU Requirements

Bun ships a single x64 binary per platform. It targets the Nehalem microarchitecture (SSE4.2) and selects AVX2/AVX-512 code paths at runtime when the CPU supports them, so there is no separate "baseline" download to choose.

PlatformIntel RequirementAMD Requirement
x64Nehalem (1st gen Core) or newerBulldozer or newer

Bun does not support x64 CPUs without the SSE4.2 extension.


Uninstall

The install scripts only write to $BUN_INSTALL (default ~/.bun). Delete that directory, then remove its bin directory from your PATH (on Windows, the user Path).

macOS & Linux
rm -rf ~/.bun
Windows
Remove-Item -Recurse -Force "$env:USERPROFILE\.bun"
npm
npm uninstall -g @aphrody/bun-runtime