Bun Single File Executable

Generate standalone executables from TypeScript or JavaScript files with Bun

9 stars 1 forksSoftware Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add jarle/bun-skills --skill Bun Single-file executable
Manual install
git clone --depth 1 https://github.com/jarle/bun-skills.git /tmp/bun-skills
mkdir -p ~/.claude/skills
cp -r /tmp/bun-skills/skills/bun-bundler-executables ~/.claude/skills/Bun-Single-file-executable

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# 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.

***
Read the full skill on GitHub

Details

Skill name
Bun Single-file executable
Path
skills/bun-bundler-executables/SKILL.md
License
MIT
Repo updated
24 February 2026

FAQ

What does the Bun Single File Executable skill do?

Generate standalone executables from TypeScript or JavaScript files with Bun

How do I install the Bun Single File Executable skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add jarle/bun-skills --skill Bun Single-file executable. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Bun Single File Executable popular?

It lives in jarle/bun-skills, which has 9 GitHub stars and 1 forks.

Related skills

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.