bfi-cli 0.1.1 → 0.1.3

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +71 -79
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -7899,88 +7899,75 @@ function showBanner() {
7899
7899
  }
7900
7900
  function showHelp() {
7901
7901
  console.log(`
7902
- ${BOLD}Usage:${RESET} bfi <command> [options]
7902
+ ${BOLD}bfi — 用友大业财BFI统一命令行工具${RESET}
7903
7903
 
7904
- ${BOLD}Manage Skills:${RESET}
7905
- skills add <source> Add a skill package
7906
- skills use <source> Generate a prompt for using one skill without installing it
7907
- skills remove [skills] Remove installed skills
7908
- skills list, ls List installed skills
7909
- skills search [query] Search for skills interactively
7904
+ ${BOLD}Usage:${RESET} bfi <command> [options]
7910
7905
 
7911
- ${BOLD}Search Options:${RESET}
7912
- --owner <owner> Search only repositories from a GitHub owner
7906
+ ${BOLD}━━━ 认证 ━━━${RESET}
7907
+ auth login --token <token> 登录 SkillHub
7908
+ auth logout 登出
7909
+ auth whoami 查看当前用户
7913
7910
 
7914
- ${BOLD}Updates:${RESET}
7915
- skills update [skills...] Update skills to latest versions
7911
+ ${BOLD}━━━ 技能管理 ━━━${RESET}
7912
+ skills search <query> 搜索技能(默认 SkillHub,--marketplace 搜 skills.sh)
7913
+ skills info <ref> 查看技能详情
7914
+ skills add <source> 安装技能(SkillHub / GitHub / GitLab / URL / 本地)
7915
+ skills use <source> 试用技能(不安装,生成 prompt)
7916
+ skills list 列出已安装技能
7917
+ skills install 从 bfi-lock.json 恢复安装
7918
+ skills remove [skills] 卸载技能
7919
+ skills update [skills] 更新技能
7920
+ skills init [name] 创建新 SKILL.md
7921
+ skills log <ref> [summary] 记录技能调用
7916
7922
 
7917
- ${BOLD}Update Options:${RESET}
7918
- -g, --global Update global skills only
7919
- -p, --project Update project skills only
7920
- -y, --yes Skip scope prompt (auto-detect: project if in a project, else global)
7923
+ ${BOLD}━━━ 发布 ━━━${RESET}
7924
+ skills publish <path> 从目录发布
7925
+ skills publish <path> --from zip 从 .zip 发布
7926
+ skills publish <url> --from git 从 Git 仓库发布
7927
+ --namespace <ns> 目标命名空间
7928
+ --visibility <v> 可见性: public | private
7929
+ --branch <b> Git 分支(默认 main)
7930
+ --skill <name> 筛选技能(默认全选)
7931
+ --yes 跳过确认
7921
7932
 
7922
- ${BOLD}Project:${RESET}
7923
- init [name] Initialize a skill (creates <name>/SKILL.md or ./SKILL.md)
7933
+ ${BOLD}━━━ 技能包管理 ━━━${RESET}
7934
+ skills package list [--namespace <ns>] 列出技能包
7935
+ skills package info <ref> 查看包详情
7936
+ skills package create <slug> [--name] [--description] 创建包
7937
+ skills package add <pkg> <skill...> 添加技能到包
7938
+ skills package remove <pkg> <skill...> 从包移除技能
7924
7939
 
7925
- ${BOLD}Add Options:${RESET}
7926
- -g, --global Install skill globally (user-level) instead of project-level
7927
- -a, --agent <agents> Specify agents to install to (use '*' for all agents)
7928
- -s, --skill <skills> Specify skill names to install (use '*' for all skills)
7929
- -l, --list List available skills in the repository without installing
7930
- -y, --yes Skip confirmation prompts
7931
- --copy Copy files instead of symlinking to agent directories
7932
- --metadata <json> Attach valid JSON to the install telemetry event
7933
- --subagent <names> Install to Eve subagents (use 'root' for the root agent)
7934
- --all Shorthand for --skill '*' --agent '*' -y
7935
- --full-depth Search all subdirectories even when a root SKILL.md exists
7940
+ ${BOLD}━━━ 文档 ━━━${RESET}
7941
+ docs upload <file> 上传文档
7942
+ docs list 列出文档
7943
+ docs info <id> 查看文档详情
7936
7944
 
7937
- ${BOLD}Use Options:${RESET}
7938
- -s, --skill <skill> Specify the skill to use
7939
- -a, --agent <agent> Start one supported agent interactively
7940
- --full-depth Search all subdirectories even when a root SKILL.md exists
7941
- --dangerously-accept-openclaw-risks
7942
- Allow unverified OpenClaw community skills
7945
+ ${BOLD}━━━ 配置 ━━━${RESET}
7946
+ config get [key] 查看配置
7947
+ config set <key> <value> [--global] 设置配置
7943
7948
 
7944
- ${BOLD}Remove Options:${RESET}
7945
- -g, --global Remove from global scope
7946
- -a, --agent <agents> Remove from specific agents (use '*' for all agents)
7947
- -s, --skill <skills> Specify skills to remove (use '*' for all skills)
7948
- -y, --yes Skip confirmation prompts
7949
- --all Shorthand for --skill '*' --agent '*' -y
7950
-
7951
- ${BOLD}List Options:${RESET}
7952
- -g, --global List global skills (default: project)
7953
- -a, --agent <agents> Filter by specific agents
7954
- --json Output as JSON (machine-readable, no ANSI codes)
7955
-
7956
- ${BOLD}Options:${RESET}
7957
- --help, -h Show this help message
7958
- --version, -v Show version number
7949
+ ${BOLD}━━━ 全局选项 ━━━${RESET}
7950
+ --token <token> API Token(或 BFI_TOKEN 环境变量)
7951
+ --registry <url> API 地址(默认 https://bfi.yyuap.com:811)
7952
+ --namespace <ns> 默认命名空间
7953
+ --help, -h 显示帮助
7954
+ --version, -v 显示版本
7959
7955
 
7960
- ${BOLD}Examples:${RESET}
7961
- ${DIM}$${RESET} bfi skills add vercel-labs/agent-skills
7962
- ${DIM}$${RESET} bfi skills use vercel-labs/agent-skills@vercel-optimize | claude
7963
- ${DIM}$${RESET} bfi skills use vercel-labs/agent-skills --skill vercel-optimize --agent claude-code
7964
- ${DIM}$${RESET} bfi skills add vercel-labs/agent-skills -g
7965
- ${DIM}$${RESET} bfi skills add vercel-labs/agent-skills --agent claude-code cursor
7966
- ${DIM}$${RESET} bfi skills add vercel-labs/agent-skills --skill pr-review commit
7967
- ${DIM}$${RESET} bfi skills remove ${DIM}# interactive remove${RESET}
7968
- ${DIM}$${RESET} bfi skills remove web-design ${DIM}# remove by name${RESET}
7969
- ${DIM}$${RESET} bfi skills rm --global frontend-design
7970
- ${DIM}$${RESET} bfi skills list ${DIM}# list project skills${RESET}
7971
- ${DIM}$${RESET} bfi skills ls -g ${DIM}# list global skills${RESET}
7972
- ${DIM}$${RESET} bfi skills ls -a claude-code ${DIM}# filter by agent${RESET}
7973
- ${DIM}$${RESET} bfi skills ls --json ${DIM}# JSON output${RESET}
7974
- ${DIM}$${RESET} bfi skills search ${DIM}# interactive search${RESET}
7975
- ${DIM}$${RESET} bfi skills search typescript ${DIM}# search by keyword${RESET}
7976
- ${DIM}$${RESET} bfi skills search react --owner vercel ${DIM}# search within an owner${RESET}
7977
- ${DIM}$${RESET} bfi skills update
7978
- ${DIM}$${RESET} bfi skills update my-skill ${DIM}# update a single skill${RESET}
7979
- ${DIM}$${RESET} bfi skills update -g ${DIM}# update global skills only${RESET}
7980
- ${DIM}$${RESET} bfi init my-skill
7956
+ ${BOLD}━━━ 技能引用格式 ━━━${RESET}
7957
+ @namespace/slug 从 SkillHub 安装指定技能
7958
+ namespace--slug 兼容格式
7959
+ owner/repo 从 GitHub 安装
7981
7960
 
7982
- Discover more skills at ${TEXT}https://skills.sh/${RESET}
7983
- and at ${TEXT}https://skillhub.skillhub.woa.com/${RESET}
7961
+ ${BOLD}━━━ 示例 ━━━${RESET}
7962
+ ${DIM}$ bfi auth login --token sk-xxx${RESET}
7963
+ ${DIM}$ bfi skills search react${RESET}
7964
+ ${DIM}$ bfi skills add @myteam/db-explore${RESET}
7965
+ ${DIM}$ bfi skills add vercel-labs/agent-skills --skill pr-review${RESET}
7966
+ ${DIM}$ bfi skills publish . --namespace myteam --visibility public${RESET}
7967
+ ${DIM}$ bfi skills publish https://github.com/owner/repo.git --from git${RESET}
7968
+ ${DIM}$ bfi skills package create frontend-kit --namespace myteam${RESET}
7969
+ ${DIM}$ bfi docs upload README.md${RESET}
7970
+ ${DIM}$ bfi config set registry https://bfi.yyuap.com:811 --global${RESET}
7984
7971
  `);
7985
7972
  }
7986
7973
  function showRemoveHelp() {
@@ -8097,13 +8084,17 @@ async function dispatchSkillSubcommand(args, globalOpts) {
8097
8084
  await runList(subArgs);
8098
8085
  break;
8099
8086
  case "find":
8100
- case "search":
8101
8087
  case "f":
8102
- case "s":
8103
8088
  showLogo();
8104
8089
  console.log();
8105
8090
  await runFind(subArgs);
8106
8091
  break;
8092
+ case "search":
8093
+ case "s":
8094
+ showLogo();
8095
+ console.log();
8096
+ await runSearch(subArgs, globalOpts);
8097
+ break;
8107
8098
  case "update":
8108
8099
  case "check":
8109
8100
  case "upgrade":
@@ -8131,9 +8122,6 @@ async function dispatchSkillSubcommand(args, globalOpts) {
8131
8122
  case "info":
8132
8123
  await runInfo(subArgs, globalOpts);
8133
8124
  break;
8134
- case "search-registry":
8135
- await runSearch(subArgs, globalOpts);
8136
- break;
8137
8125
  case "config":
8138
8126
  case "cfg":
8139
8127
  await runConfig(subArgs, globalOpts);
@@ -8253,13 +8241,17 @@ async function main() {
8253
8241
  await dispatchSkillSubcommand(restArgs, globalOpts);
8254
8242
  break;
8255
8243
  case "find":
8256
- case "search":
8257
8244
  case "f":
8258
- case "s":
8259
8245
  showLogo();
8260
8246
  console.log();
8261
8247
  await runFind(restArgs);
8262
8248
  break;
8249
+ case "search":
8250
+ case "s":
8251
+ showLogo();
8252
+ console.log();
8253
+ await runSearch(restArgs, globalOpts);
8254
+ break;
8263
8255
  case "init":
8264
8256
  showLogo();
8265
8257
  console.log();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bfi-cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "用友大业财BFI统一命令行工具,支持技能,技能包,元数据,UI元数据等",
5
5
  "type": "module",
6
6
  "bin": {