Bun Single-file executable
Generate standalone executables from TypeScript or JavaScript files with Bun
Skill by jarle
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jarle-bun-single-file-executable
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/bun-single-file-executable
What's inside
- Skill name
Bun Single-file executable- Description
- Generate standalone executables from TypeScript or JavaScript files with Bun
- License
- MIT
- Instructions
- 1,298 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- name: only lowercase letters, digits and single hyphens allowed
- name: "Bun Single-file executable" does not match folder "bun-bundler-executables"
- body: 1298 lines (spec recommends under 500)
- body: contains an absolute path from the author's machine
Files (1)
- SKILL.md
SKILL.md (first lines)
# Single-file executable
> Generate standalone executables from TypeScript or JavaScript files with Bun
Bun's bundler implements a `--compile` flag for generating a standalone binary from a TypeScript or JavaScript file.
<Tabs>
<Tab title="CLI">
```bash terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
bun build ./cli.ts --compile --outfile mycli
```
</Tab>
<Tab title="JavaScript">
```ts build.ts icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}
await Bun.build({
entrypoints: ["./cli.ts"],
compile: {
outfile: "./mycli",
},
});
```
</Tab>
</Tabs>
```ts cli.ts icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}
console.log("Hello world!");
```
This bundles `cli.ts` into an executable that can be executed directly:
```bash terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
./mycli
```
```txt theme={"theme":{"light":"github-light","dark":"dracula"}}
Hello world!
```
All imported files and packages are bundled into the executable, along with a copy of the Bun runtime. All built-in Bun and Node.js APIs are supported.
***
## Cross-compile to other platforms
The `--target` flag lets you compile your standalone executable for a different operating system, architecture, or version of Bun than the machine you're running `bun build` on.
To build for Linux x64 (most servers):
<Tabs>
<Tab title="CLI">
```bash icon="terminal" terminal theme={"theme":{"light":"github-light","dark":"dracula"}}
bun build --compile --target=bun-linux-x64 ./index.ts --outfile myapp
# To support CPUs from before 2013, use the baseline version (nehalem)
bun build --compile --target=bun-linux-x64-baseline ./index.ts --outfile myapp
# To explicitly only support CPUs from 2013 and later, use the modern version (haswell)
# modern is faster, but baseline is more compatible.
bun build --compile --target=bun-linux-x64-modern ./index.ts --outfile myapp
```
</Tab>
<Tab title="JavaScript">
```ts build.ts icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}
// Standard Linux x64
await Bun.build({
entrypoints: ["./index.ts"],
compile: {
target: "bun-linux-x64",
outfile: "./myapp",
},
});
// Baseline (pre-2013 CPUs)
await Bun.build({
entrypoints: ["./index.ts"],
compile: {
target: "bun-linux-x64-baseline",
outfile: "./myapp",
},
});
// Modern (2013+ CPUs, faster)
await Bun.build({
entrypoints: ["./index.ts"],
compile: {
target: "bun-linux-x64-modern",
outfile: "./myapp",
},
});
```
</Tab>
</Tabs>
To build for Linux ARM64 (e.g. Graviton or Raspberry Pi):
<Tabs>
<Tab title="CLI">
```bash icon="terminal" terminal theme={"theme":{"light":"github-light","dark":"dracula"}}
# Note: the default architecture is x64 if no architecture is specified.
bun build --compile --target=bun-linux-arm64 ./index.ts --outfile myapp
```
</Tab>
<Tab title="JavaScript">
```ts build.ts icon="https://mintcdn.com/bun-1dd33a4e/nIz6GtMH5K-dfXeV/icons/typescript.svg?fit=max&auto=format&n=nIz6GtMH5K-dfXeV&q=85&s=5d73d76daf7eb7b158469d8c30d349b0" theme={"theme":{"light":"github-light","dark":"dracula"}}
await Bun.build({
entrypoints: ["./index.ts"],
compile: {
target: "bun-linux-arm64",
outfile: "./myapp",
},
});
```
</Tab>
</Tabs>
To build for Windows x64:From jarle/bun-skills, MIT.
More from jarle/bun-skills
- 0.459score
Bun Standalone HTML
jarle
Bundle a single-page app into a single self-contained .html file with no external dependencies
SkillDFreshness: D★ 9Claude Code +9 - 0.459score
Bun Plugins
jarle
Universal plugin API for extending Bun's runtime and bundler
SkillDFreshness: D★ 9Claude Code +9 - 0.459score
Bun Bytecode Caching
jarle
Speed up JavaScript execution with bytecode caching in Bun's bundler
SkillDFreshness: D★ 9Claude Code +9 - 0.459score
Bun HTML & static sites
jarle
Build static sites, landing pages, and web applications with Bun's bundler
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Convert an ArrayBuffer to a Uint8Array
jarle
Convert an ArrayBuffer to a Uint8Array
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Hot reloading
jarle
Hot Module Replacement (HMR) for Bun's development server
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Loaders
jarle
Built-in loaders for the Bun bundler and runtime
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Convert an ArrayBuffer to an array of numbers
jarle
Convert an ArrayBuffer to an array of numbers
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun esbuild
jarle
Migration guide from esbuild to Bun's bundler
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Feedback
jarle
Share feedback, bug reports, and feature requests
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Macros
jarle
Run JavaScript functions at bundle-time with Bun macros
SkillDFreshness: D★ 9Claude Code +9 - 0.456score
Bun Convert an ArrayBuffer to a Blob
jarle
Convert an ArrayBuffer to a Blob
SkillDFreshness: D★ 9Claude Code +9
Signals
- Stars
- 9
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Feb 21, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/jarle/bun-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from jarle
- 0.559score
service-components
jarle
How to design application services with the Service Component pattern.
SkillBFreshness: B★ 3Claude Code +9 - 0.553score
service-component-testing
jarle
How to write tests for services built with Service Components.
SkillBFreshness: B★ 3Claude Code +9 - 0.459score
Bun Plugins
jarle
Universal plugin API for extending Bun's runtime and bundler
SkillDFreshness: D★ 9Claude Code +9 - 0.459score
Bun HTML & static sites
jarle
Build static sites, landing pages, and web applications with Bun's bundler
SkillDFreshness: D★ 9Claude Code +9 - 0.459score
Bun Bytecode Caching
jarle
Speed up JavaScript execution with bytecode caching in Bun's bundler
SkillDFreshness: D★ 9Claude Code +9 - 0.459score
Bun Standalone HTML
jarle
Bundle a single-page app into a single self-contained .html file with no external dependencies
SkillDFreshness: D★ 9Claude Code +9
Cite this page
Bun Single-file executable skill. Agent Mart. https://agentmart.dev/skills/jarle-bun-single-file-executable (last updated 2026-10-24)