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. 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 -fsSL https://bun.aphrody.app/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: Recent releases have 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 -c "irm https://bun.aphrody.app/install.ps1|iex"
Bun requires Windows 10 version 1809 or later.
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 from the dist.aphrody.app mirror (or GitHub when the mirror does not answer), check it against the release's SHA256SUMS.txt, and install bun and bunx into $BUN_INSTALL/bin (default ~/.bun/bin). On Windows, the script also adds that directory to the user Path unless you pass -NoPathUpdate. Set GITHUB_TOKEN to authenticate requests to GitHub.
To check that Bun was installed successfully, open a new terminal window and run:
bun --version
# Output: 1.x.y
# See the release and the commit of aphrody-labs/bun that you're using
bun --revision
# Output: 1.x.y+<commit>
Bun.version and process.versions.bun report the same version as bun --version.
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 release:
bun upgrade
Installing Older Versions
Pass a version (1.4.5) or an exact release tag (bun-v1.4.5, aphrody-v1.4.3-aphrody.2) to the install script.
curl -fsSL https://bun.aphrody.app/install.sh | bash -s 1.4.5
curl -fsSL https://bun.aphrody.app/install.sh | bash -s aphrody-v1.4.3-aphrody.2
& ([scriptblock]::Create((irm https://bun.aphrody.app/install.ps1))) -Version 1.4.5
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).
| Archive | Platform |
|---|---|
bun-linux-x64.zip | Linux x64, glibc |
bun-linux-x64-musl.zip | Linux x64, musl (Alpine) |
bun-windows-x64.zip | Windows x64 |
The archives available for each release are listed on its release page. aphrody-v1.4.3-aphrody.2 also has macOS, Linux ARM64 and Windows ARM64 archives (aarch64 in the archive name).
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.
| Platform | Intel Requirement | AMD Requirement |
|---|---|---|
| x64 | Nehalem (1st gen Core) or newer | Bulldozer 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).
rm -rf ~/.bun
Remove-Item -Recurse -Force "$env:USERPROFILE\.bun"
npm uninstall -g @aphrody/bun-runtime