logo
0
0
WeChat Login

feat: auto-extract and save App ID from environment#38

Merged
created 4 days ago
main
feat/auto-extract-app-id
Edit
OverviewCommits
1
Files changed
2
Attachments

功能说明

实现 App ID 自动提取和保存,用户不再需要每次手动传 --app-id

自动提取机制

首次运行时,CLI 自动:

  1. 调用 API 获取环境信息
  2. 从默认域名提取 App ID
  3. 保存到 ~/.tcb-user/config.json
  4. 后续命令自动使用

用户体验

改进前:

tcb-user collection query todos --app-id 1328860866 --env-id test-xxx

改进后:

tcb-user collection query todos --env-id test-xxx
# 首次运行会提示:✅ Auto-extracted and saved App ID: 1328860866

代码变更

  • 新增 initConfigAsync() 支持异步提取
  • 修改 CLI 命令使用异步 createClients()
  • 更新 README FAQ 说明自动提取机制

兼容性

  • ✅ 仍支持 --app-id 参数
  • ✅ 手动传入优先级最高
  • ✅ 无破坏性变更

Closes #36

is using the merge method to merge into1100e51a
合并来自 feat/auto-extract-app-id 的合并请求 #38

Successfully merged and closed

branch can be safely deleted
Reviewer
None yet
Assignee
None yet
Label
None yet
Participant