Bun runs TypeScript natively — no tsc compilation, no ts-node, no build step. Run any .ts file directly with bun file.ts. Use Bun's native APIs instead of Node.js equivalents — they're faster, more ergonomic, and require no additional dependencies.
Critical: In a Bun project (has bun.lock, bun.lockb, bunfig.toml, or @types/bun in devDependencies), always use Bun to run scripts (bun file.ts, not node file.ts) and prefer Bun-native APIs over Node.js equivalents. Mixing runtimes causes subtle bugs and unnecessary retries.
Built-in HTTP server — replaces Express, Fastify, or http.createServer.
Справочник по API среды выполнения Bun для сценариев TypeScript. Охватывает Bun.file(), Bun.write(), оболочку Bun.$(), Bun.spawn(), Bun.Glob, Bun.env, Bun:sqlite, Bun.hash, Bun.password, сжатие и утилиты для создания файлов, обработки данных и создания сценариев. Источник: dmythro/agent-skills.