extensions/cli/BUILD.md
The Continue CLI uses esbuild to bundle the application along with local packages (@continuedev/config-yaml and @continuedev/openai-adapters) into a single distributable file. This ensures that users who install the CLI from npm don't need to worry about local file references.
cd ../../ && node ./scripts/build-packages.jsnpm installnpm run build
The build.mjs script uses esbuild to:
@continuedev/config-yaml, @continuedev/openai-adapters) directly in the bundle@sentry/profiling-node, winston, express)dist/cn.js) with the proper shebang for CLI executionfile: reference issuesreact-devtools-core is stubbed to prevent runtime errorscreateRequire to support packages that use dynamic requiresdist/meta.json with bundle analysis informationRun smoke tests to verify the build:
npm run test:smoke
The smoke tests verify:
build.mjsdist/meta.json and consider marking large packages as externalAfter building, check dist/meta.json to see:
When publishing to npm:
dist/ are includednpm install -g @continuedev/clicn command becomes available globally