Add stateless headless CLI - #3668
Draft
nkmlombardi wants to merge 1 commit into
Draft
Conversation
✅ Deploy Preview for blockbench-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds a one-shot, stateless headless CLI to the desktop app:
Project,Cube,Group,Mesh,Texture,Undo,Canvas, codecs, etc.)..bbmodeloutput throughCodecs.project.--eval, trailing script arguments,--force, and a configurable timeout.Why
Automation currently requires either raw file transformations, which bypass Blockbench's runtime behavior, or a long-lived interactive/plugin server with shared project state. This provides a direct process boundary: one input, one action against the actual renderer APIs, one output, then exit.
Independent invocations do not share
Project,Undo, scene, codec, profile, port, or plugin state, so batch workers and coding agents can safely operate on different model files in parallel.Validation
npm run build-electronnpx tsc --project tsconfig.json --noEmitnpm run test-headless-cli— 5 parser/profile testsnode --test tests/headless_cli.e2e.test.js— help, preflight failure, live-global edit/save, and script failure testsBLOCKBENCH_HEADLESS_CONCURRENCY=24 node --test tests/headless_cli.concurrent.test.js— 24 independent actions completed in 8.2s; same-output collision test passedelectron-builder --dir --win --x64 --config.win.signAndEditExecutable=falseThe existing non-headless startup path remains the default and retains its normal profile, plugins, updater, backups, recent-project handling, and visible window behavior.