Repository navigation
perf(start): run the published max from an esbuild bundle (cli-dev bundle) - #856
Merged
Merged
Conversation
…ndle) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
Results (cli-core 0.469.0, cli-base 0.65.0)Installed from
🤖 Generated with Claude Code |
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.
Task
Ship
maxas an esbuild bundle built by cli-base's sharedcli-dev bundle(0.65.0), as tg does since 0.100.0 (owner-approved rollout).Why
A command imports about a thousand module files before it does any work; the bundle loads a few dozen. tg's start halved (cli-testing tg-bundle).
What
build:tsc --build --force && cli-dev bundle --bin dist/bin/max.js --external ws;esbuild0.28.2 as a devDependency (cli-base's optional peer).dist/bin/max.jsbecomes the loader: it answers--version, turns the compile cache on, and forserve,watchandmcp serve(also after a flag) preloads every chunk so an in-place upgrade cannot pull one from under a running server.--versionequals the bundle's, skills and document readers are found, and the store opens where a read needs no account.smoke:node(new) runs in CI;smoke:bunruns it under Bun.Testing
Results follow in a comment: identity under npm and pnpm, the upgrade test with and without a flag before
mcp serve, timings.🤖 Generated with Claude Code