4 Commits
Author SHA1 Message Date
diguaandCursor 36a221e644 fix(cli): pin prebuild-install runtime to system Node
An ambient npm_config_runtime=electron (common in Electron dev shells
and CI) makes bare prebuild-install "succeed" with an Electron-ABI
binding, bypassing the source-build fallbacks and leaving the CLI
unable to start. Pin -r node -t to the current system Node instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 15:51:19 +08:00
diguaandCursor 9503fc18cb fix(cli): download official prebuilds when preparing better-sqlite3
prebuild-install was invoked with -r napi, but better-sqlite3 only
publishes per-ABI node/electron prebuilds, so the download branch always
failed and every run fell back to a ~1.5min node-gyp source build.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-10 15:51:19 +08:00
digua 04427a98d8 chore(cli): prepare npm release docs 2026-05-22 10:20:39 +08:00
digua 78e41a65b5 refactor: migrate CLI from packages/server to apps/cli
Move the CLI application from packages/server/ to apps/cli/ to align
with the monorepo convention (apps/ for deployable applications,
packages/ for shared libraries). Rename package to @openchatlab/chatlab.

Also fix a bug in ensureToken() that used raw string manipulation to
write config.toml, causing duplicate token fields that corrupted the
TOML file. This led to config parse failures and user_data_dir being
overwritten with defaults. Now uses writeConfigField() for safe writes.
2026-05-19 21:33:00 +08:00