mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
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.
This commit is contained in:
1 parent
9db30879d3
commit
78e41a65b5
40 files changed
+74
-69
No files matched your search
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* ChatLab CLI 入口
|
||||
*
|
||||
* 开发阶段:通过 pnpm --filter chatlab dev 运行(使用 tsx)
|
||||
* 发布阶段:构建后直接作为 Node.js 脚本运行
|
||||
*/
|
||||
|
||||
// 开发阶段占位,实际通过 package.json scripts 的 tsx 运行
|
||||
console.error('Please run via: npx tsx apps/cli/src/cli.ts')
|
||||
console.error('Or use: pnpm --filter @openchatlab/chatlab cli')
|
||||
process.exit(1)
|
||||
Reference in new issue
Block a user