Reference Bun official documentation by cloning the repo locally when agents need to understand Bun runtime, APIs, CLI commands, or configuration
When you need to understand how Bun works — its runtime, APIs, CLI commands, configuration, or any other aspect — I point you to the authoritative source: the Bun repository's documentation.
Clone the Bun repo (if not already cloned):
git clone --depth 1 https://github.com/oven-sh/bun.git /tmp/bun
Documentation lives at:
/tmp/bun/docs/
Files are in markdown (.md) format organized by topic.
Read the relevant docs using local file tools (Read, Grep, Glob) to find accurate answers.
For CLI reference, check:
/tmp/bun/docs/cli/ — command-line interface docs/tmp/bun/docs/runtime/ — runtime documentation/tmp/bun/docs/api/ — API referenceFor implementation details, also check the source code in:
/tmp/bun/src/ — core implementation/tmp/bun/packages/ — npm packages and additional toolingReuse existing clone — if /tmp/bun already exists, don't re-clone.
github.com/oven-sh/bunmain branch