ts-runtime-bun

Configure and run TypeScript natively on Bun with bunfig.toml, bun test, and Bun.build.

1|Updated Jul 29, 2026
One-click install
npx skills add https://github.com/fusengine/kimi-code --skill ts-runtime-bun-fusengine
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: ts-runtime-bun
Source: https://github.com/fusengine/kimi-code/tree/main/plugins/typescript-expert/skills/ts-runtime-bun
Command: npx skills add https://github.com/fusengine/kimi-code --skill ts-runtime-bun-fusengine

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill includes references (resource) components.

What problem does it solve? Running TypeScript on Bun involves several distinct concerns โ€” bunfig.toml configuration, the bun:test runner, bundling with Bun.build, single-file executables, and workspaces monorepos โ€” and it is easy to make wrong assumptions, such as expecting Bun to type-check or down-convert modern syntax. This Skill provides verified guidance for Bun 1.3.x so projects are configured correctly the first time. ## Core Features & Use Cases - bunfig.toml and bun test setup: Configure coverage thresholds, JUnit reporters, and preload scripts for CI pipelines using the Jest-compatible bun:test API. - Bundling and compilation: Bundle TS/TSX with Bun.build or bun build, and produce cross-compiled single-file executables with --compile --target for Linux, Windows, and macOS. - Workspaces monorepos: Structure Bun workspaces with the workspace: protocol, --filter commands, and shared dependency catalogs. - Use Case: You are starting a Bun-based CLI in a monorepo. Use this Skill to scaffold package.json scripts, a bunfig.toml with an 85% coverage gate and JUnit output, a strict tsconfig, and a compile script that emits a standalone binary โ€” while keeping tsc --noEmit in CI since Bun never type-checks. ## Quick Start Ask the agent to set up a Bun 1.3 TypeScript project with bun test coverage thresholds, a JUnit reporter, and a compile script for a single-file executable.

Frequently Asked Questions about ts-runtime-bun

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run TypeScript on Bun without a build step?โ–ผ

Bun runs .ts and .tsx files natively through its built-in transpiler with no configuration, supporting JSX, enums, and decorators at runtime. However, Bun does not type-check, so keep tsc --noEmit in your CI pipeline.

How do I configure bun test coverage thresholds in bunfig.toml?โ–ผ

Add a [test] section to bunfig.toml with coverage = true and coverageThreshold as a single number or per-metric object for line, function, and statement coverage. If the suite misses the threshold, bun test exits non-zero, making it an effective CI gate.

Bun vs Node for TypeScript: which runtime should I choose?โ–ผ

Choose Bun when you want one tool for runtime, test, bundler, and package manager, or need .tsx, decorators, enums, and tsconfig paths honored at runtime. Choose Node for the LTS-backed default runtime when scripts use only erasable type syntax.

Does Bun type-check TypeScript when bundling or running code?โ–ผ

No, neither Bun's runtime nor its bundler performs type checking or generates .d.ts files. You must run tsc --noEmit (or bun x tsc) separately in CI to catch type errors.

How do I build a single-file executable with Bun?โ–ผ

Run bun build ./src/cli.ts --compile --outfile mycli to bundle your app with the Bun runtime into one binary. Use --target=bun-linux-x64, bun-windows-x64, or bun-darwin-arm64 to cross-compile for other platforms from any machine.

When should I not use Bun for a TypeScript project?โ–ผ

Avoid Bun when deployment targets standardize on Node, when you rely on native addons or niche node: APIs that Bun does not fully support, or when a framework like Next.js owns its build pipeline. Node runtime setup belongs to the ts-runtime-node skill.