These files give an AI coding assistant complete knowledge of the Bitbybit TypeScript API, so it writes code that compiles against the version you actually have installed instead of guessing. Attach one to ChatGPT, Claude, Copilot, Cursor or any other assistant that accepts file context. Everything on this page is generated from the shipped type declarations of release v1.6.1, so it never drifts from the packages on npm.
Prefer the MCP servers when your tool can connect to one
Claude Code, Codex, Cursor, VS Code, claude.ai, ChatGPT and the Claude API can connect to the free Bitbybit CAD MCP and look up the exact API while they work, without spending any context window until a question is asked. With an API key, the Bitbybit CAD Cloud MCP lets the agent run the geometry on CAD Cloud and hand you the files. The files on this page are for assistants that cannot speak MCP, for a one-off conversation, or for working offline.
claude mcp add --transport http bitbybit https://mcp.bitbybit.dev/mcpClaude Code, the free docs servernpx -y @bitbybit-dev/mcpThe same server locally, serving the version your project has installed
Two formats are published for each engine. The Markdown context is written for the model to read: it explains the API, the conventions and the project setup. The TypeScript declarations are written for your editor and for assistants that work better from real types. Lite variants strip the doc comments, which roughly halves the token count and leaves more of the context window for your own code.
New to Bitbybit
Start here if you write your scripts in the online TypeScript editor at bitbybit.dev/app. Covers the editor runtime, the BitByBit global, and the patterns that work inside a hosted script rather than a bundled application.
BabylonJS
For applications built on @bitbybit-dev/babylonjs, where geometry is drawn into a BabylonJS scene.
- Full contextMarkdown · 527 KBThe complete API surface with commentary, best practices and project setup guidance. Use this when the assistant has room for it.
- Lite contextMarkdown · 494 KBFunction definitions only, comments stripped. Loads faster and leaves more of the context window for your own code.
- Type declarationsTypeScript .d.ts · 3.92 MBThe generated declaration file. Drop it into your project so the assistant and your editor share one source of truth for every signature.
- Type declarations, liteTypeScript .d.ts · 928 KBThe same declarations with doc comments removed, for tighter context budgets.
Three.js
For applications built on @bitbybit-dev/threejs, where geometry is drawn into a Three.js scene.
- Full contextMarkdown · 438 KBThe complete API surface with commentary, best practices and project setup guidance. Use this when the assistant has room for it.
- Lite contextMarkdown · 391 KBFunction definitions only, comments stripped. Loads faster and leaves more of the context window for your own code.
- Type declarationsTypeScript .d.ts · 3.29 MBThe generated declaration file. Drop it into your project so the assistant and your editor share one source of truth for every signature.
- Type declarations, liteTypeScript .d.ts · 761 KBThe same declarations with doc comments removed, for tighter context budgets.
PlayCanvas
For applications built on @bitbybit-dev/playcanvas, where geometry is drawn into a PlayCanvas scene.
- Full contextMarkdown · 416 KBThe complete API surface with commentary, best practices and project setup guidance. Use this when the assistant has room for it.
- Lite contextMarkdown · 390 KBFunction definitions only, comments stripped. Loads faster and leaves more of the context window for your own code.
- Type declarationsTypeScript .d.ts · 3.28 MBThe generated declaration file. Drop it into your project so the assistant and your editor share one source of truth for every signature.
- Type declarations, liteTypeScript .d.ts · 760 KBThe same declarations with doc comments removed, for tighter context budgets.
How to use a context file
- Pick the engine you are building on, or the Monaco context if you write scripts in the online editor.
- Download the file and attach it to your assistant's conversation, project or workspace. Most assistants accept it as an uploaded file; some read it from the repository if you commit it.
- Ask for what you want in plain language. The assistant now knows every class, method and input type, so it can name the right call rather than inventing one.
- If you hit the context limit, switch to the Lite variant, or attach only the type declarations.
Related
- Bitbybit for AI coding agentsThe two MCP servers, context files and where geometry should run
- TypeScript API referenceEvery class, method and input type
- CAD Cloud APIRun the kernels server-side over HTTP, with the Pro algorithms that exist only there