Explanation
Architecture
How the source is organised, for contributors.
TextureScript is written in TypeScript and runs on Bun. It uses Effect for its services and command line and deepslate to draw Minecraft block models.
Layers
| folder | holds |
|---|---|
src/core | parsing, rendering, linting, palettes, stages and scene building; pure and synchronous, so it also runs in the browser |
src/services | Effect services for files, the game jar, the live server and the headless browser |
src/cli | one module per command, and the MCP server |
src/viewer | the 3D page that view serves and shoot screenshots |
src/guard | the vanilla check behind the pre-commit hook |
skill/ | the authoring skill, shipped inside the binary |
Keeping src/core pure means the server and the viewer share the same scene code, and most
tests need no files, game jar or network.
The binary
bun run build compiles everything, including the viewer and the skill, into one executable per
platform. bun scripts/build.ts --all builds every release target; pushing a v* tag runs the
release workflow, which tests, builds and publishes them.
Developing
bun install # also enables the pre-commit hook in .githooks/
bun test
bun run typecheck
bun src/cli/main.ts --help