No package.json needed. Just declare your npm packages in comments and run. Inspired by PEP 723 and uv.
#!/usr/bin/env buns
import chalk from "chalk";
console.log(chalk.green("Hello from buns!"));
Everything you need to run standalone TypeScript scripts without the ceremony.
Declare npm packages directly in your script comments. They're automatically installed and cached the first time you run.
Pin specific Bun versions per script. Missing versions are automatically downloaded from official releases.
Dependencies are stored in a content-addressed cache. Same packages across scripts share a single installation.
No package.json. No tsconfig.json. No node_modules. Just write your script and run it.
Run untrusted scripts safely with built-in sandboxing. Control filesystem access, network, and resource limits.
Restrict read and write access to only the paths your scripts need
Block all network access or allow only specific hosts with wildcards
Set memory, CPU time, and execution timeout limits per script
Uses sandbox-exec on macOS, bubblewrap on Linux
Choose your preferred installation method.
brew install eddmann/tap/buns
curl -fsSL https://raw.githubusercontent.com/eddmann/buns/main/install.sh | sh
$ buns hello.ts
Hello from buns!