byteplan-cli 1.3.4 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "byteplan-cli",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "BytePlan CLI - Command line tool for BytePlan API",
5
5
  "keywords": [
6
6
  "byteplan",
package/src/api.js CHANGED
@@ -115,7 +115,7 @@ function saveCredentials(data) {
115
115
  const lines = [];
116
116
  lines.push('BP_ENV=' + currentEnv);
117
117
  lines.push('BP_USER=' + data.username);
118
- lines.push('BP_PASSWORD=' + data.password);
118
+ lines.push('BP_PASSWORD="' + data.password + '"'); // 用双引号包裹,防止 # 等特殊字符被解析为注释
119
119
  if (data.accessToken) {
120
120
  lines.push('ACCESS_TOKEN=' + data.accessToken);
121
121
  }
package/src/cli.js CHANGED
@@ -113,9 +113,23 @@ program
113
113
  // Login command
114
114
  program
115
115
  .command('login')
116
- .description('Login to BytePlan (use saved credentials if not provided)')
117
- .option('-u, --user <phone>', 'Phone number (optional if already configured)')
118
- .option('-p, --password <password>', 'Password (optional if already configured)')
116
+ .description('Login to BytePlan and save credentials')
117
+ .option('-u, --user <phone>', 'Phone number')
118
+ .option('-p, --password <password>', 'Password')
119
+ .addHelpText('after', `
120
+ Usage:
121
+ byteplan login # 使用已保存的凭据刷新 Token(无需参数)
122
+ byteplan login -u <phone> -p <pwd> # 新登录或覆盖已有凭据
123
+
124
+ 说明:
125
+ - 首次使用需要提供账号密码: byteplan login -u 18256485741 -p yourpassword
126
+ - 登录成功后凭据保存到 ~/.byteplan/.env
127
+ - 后续可直接运行 byteplan login 刷新 Token(无需参数)
128
+ - 提供新账号密码会覆盖已有配置
129
+
130
+ 检查配置状态:
131
+ byteplan config
132
+ `)
119
133
  .action(async (options) => {
120
134
  try {
121
135
  const existingConfig = checkExistingConfig();
@@ -204,15 +204,21 @@ Commands:
204
204
  skills list List all available skills
205
205
  skills installed List installed skills
206
206
 
207
+ 说明:
208
+ - 所有命令会自动检查配置状态(~/.byteplan/.env)
209
+ - 如未配置,会提示先运行: byteplan login -u <phone> -p <password>
210
+ - --check-config 仅检查配置不执行安装
211
+
207
212
  Platforms:
208
213
  claude-code (claude) ~/.claude/commands
209
214
  codex ~/.codex
210
215
  openclaw ~/.openclaw/skills
211
216
 
212
217
  Examples:
213
- byteplan skills install -p claude-code
214
- byteplan skills install -p claude-code,codex,openclaw
215
- byteplan skills list
218
+ byteplan skills list # 查看 skills 并显示配置状态
219
+ byteplan skills install -p claude-code # 安装到 claude-code
220
+ byteplan skills install -p claude-code,codex # 安装到多个平台
221
+ byteplan skills install --check-config # 仅检查配置
216
222
  `);
217
223
 
218
224
  // skills install 子命令 - 安装全部
@@ -223,12 +229,13 @@ skillsCmd
223
229
  Options (from parent):
224
230
  -p, --platform Target platform(s): claude-code, codex, openclaw
225
231
  -d, --dir Custom target directory
226
- --check-config Check configuration status first
232
+ --check-config 仅检查配置状态,不执行安装
227
233
 
228
234
  Examples:
229
235
  byteplan skills install -p claude-code
230
236
  byteplan skills install -p claude-code,codex
231
237
  byteplan skills install -d ~/.claude/commands
238
+ byteplan skills install --check-config
232
239
  `)
233
240
  .action(() => {
234
241
  try {