buna
v1.1.2
Published
Fast Bun installer for all platforms
Readme
buna
Fast Bun installer for all platforms. Downloads and installs Bun via npm registry mirror with progress bar, binary verification, and automatic PATH setup.
Install
npm i -g bunaUsage
# Install latest version
buna
# Install canary version
buna -cWhat it does
- Detects your OS, architecture, and CPU features (AVX2, Rosetta 2)
- Downloads the matching Bun binary from npm mirror
- Extracts and installs to
~/.bun/bin/bun - Verifies the binary runs correctly
- Falls back to baseline build if CPU is incompatible
- Configures PATH in your shell (zsh / bash / fish / Windows registry)
- Cleans quarantine attributes on macOS
Supported Platforms
| OS | Arch | Variants | |---|---|---| | macOS | arm64 | aarch64 | | macOS | x64 | x64, x64-baseline | | Linux | arm64 | aarch64 | | Linux | x64 | x64, x64-baseline | | Windows | x64 | x64, x64-baseline |
Project Structure
src/
cli.ts — CLI entry point
platform.ts — OS/arch detection and platform matching
registry.ts — npm registry tarball URL resolution
download.ts — HTTP streaming download with progress bar
tar.ts — Minimal tar parser
extract.ts — Binary extraction, chmod, xattr cleanup
verify.ts — Post-install binary verification
shell.ts — PATH configuration for all shells
version.ts — Local version management
path.ts — Install path utilitiesDevelopment
# Install dependencies
bun install
# Build
bun run build
# Run tests
bun test
# Lint
npx oxlint