For AI / AgentsAI / Agent entry point
AI / Agent entry point
Complete Bun tasks accurately with the smallest useful context
Last updated on
Reading order for agents
- Read
/en/llms.txtfor routing metadata only. - Select the relevant page and append
.mdto its URL. - Read
/en/llms-full.txtonly for genuinely cross-cutting work. - Before edits, inspect
package.json,bun.lock,bunfig.toml,tsconfig.json, and existing scripts. - After edits, run tests proportional to risk. Do not replace verification with inference.
Task router
| User goal | Required page | Add when needed |
|---|---|---|
| Run or debug TypeScript | Runtime | CLI and config |
| Install packages or repair a lockfile | Package manager | Node.js migration |
| Change workspaces or a task graph | Monorepos and workspaces | Package manager |
| Add or migrate tests | Test runner | Agent rules |
| Produce a deployment artifact | Bundler | The target framework's official docs |
| Implement WebSocket / realtime push | WebSocket and realtime | Serverless & edge |
| Set up frontend development | Frontend with HTML imports | Ecosystem decisions |
| Connect SQL, Redis, or S3 | Data and storage | The target service's official docs |
| Build an AI service | Build AI apps with Bun | Serverless & edge |
| Use vibe coding or a coding agent | Vibe coding workflow | Paste-ready rules |
| Establish CI and production gates | Production baseline | Containers & Kubernetes |
| Choose a backend or full-stack framework | Ecosystem decisions | The framework's official docs |
| Choose between Bun, Node.js, and Deno | Runtime comparison | Version matrix |
| Deploy to a cloud platform | Cloud deployment decisions | Platform guides (Lambda, Vercel, Workers) or the platform's official docs |
| Move a Node.js project to Bun | Node.js migration | Load core pages by boundary |
Invariants
- Bun can execute TypeScript, but that does not replace static type checking.
- Do not replace framework build commands unless the framework supports the replacement.
- Treat trusted dependency install scripts as code execution; review before `bun pm trust`.
- Keep exactly one authoritative lockfile after migration is approved.
- Never assume Node.js compatibility for native addons or edge-case loaders; test them.
- Use argument arrays with Bun.spawn when input may be untrusted.Query, do not guess
Check current primary sources for patch-version defaults, framework and deployment support, native packages, bunfig.toml keys, Node.js API compatibility, test matchers, and security-sensitive installation behavior.
Machine-readable endpoints
Use AGENT=1 bun test to reduce passing-test noise in a large suite. Preserve failure details, exit status, and complete CI logs.
| URL | Purpose |
|---|---|
/en/llms.txt | English routing index |
/llms.txt | Chinese routing index |
/en/llms-full.txt | Full English corpus |
/en/docs/core/runtime.md | One English page as Markdown |
/docs/core/runtime.md | One Chinese page as Markdown |
Context is not authorization
Seeing a command does not authorize destructive changes. Deleting lockfiles, making major upgrades, changing production entrypoints, or accessing secrets still requires explicit scope.