Bun API Reference
Use this skill when writing, reviewing, or debugging code that calls Bun runtime APIs.
Local References
Start with:
node_modules/bun-types/README.md
node_modules/bun-types/docs/
Search local docs and types with rg:
rg "Bun\\.\\$|Bun\\.file|Bun\\.write|Bun\\.spawn" node_modules/bun-types
rg "stringWidth|deepEquals|stdout|stderr" node_modules/bun-types
Prefer the local bun-types documentation over memory when checking API signatures, return types, options, and subtle behavior.
Common APIs To Verify
Bun.$Bun.file()Bun.write()Bun.spawn()Bun.argvBun.deepEquals()Bun.file().writer()Bun.stdoutBun.stderrBun.stringWidth()
If the docs are missing or node_modules is unavailable, inspect existing local usage with rg and state the gap before relying on fallback knowledge.