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

folderholds
src/coreparsing, rendering, linting, palettes, stages and scene building; pure and synchronous, so it also runs in the browser
src/servicesEffect services for files, the game jar, the live server and the headless browser
src/clione module per command, and the MCP server
src/viewerthe 3D page that view serves and shoot screenshots
src/guardthe 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
Copyright © 2026