feishu-cli-platform

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

飞书平台能力

Feishu Platform Capabilities

先判断意图,再读取对应工作流。不要一次加载全部 reference。 加载后,将工作流中的
references/
scripts/
templates/
examples/
相对路径按该
workflow.md
所在目录解析;执行脚本时使用解析后的实际路径,不要依赖当前 shell 目录。
First determine the intent, then read the corresponding workflow. Do not load all references at once. After loading, resolve the relative paths
references/
,
scripts/
,
templates/
,
examples/
in the workflow according to the directory where the
workflow.md
is located; use the resolved actual path when executing scripts, do not rely on the current shell directory.

路由

Routing

意图读取文件
登录、登出、scope 预检、Token、profile、config、doctor
references/workflows/auth/workflow.md
调任意 OpenAPI、
--as
、分页和 dry-run
references/workflows/api/workflow.md
查询本地 OpenAPI path、参数和 scope
references/workflows/schema/workflow.md
搜索文档、消息或应用
references/workflows/search/workflow.md
查询用户、邮箱、手机号、部门
references/workflows/directory/workflow.md
Schema 只负责发现接口;API 负责执行请求。通常先查 schema,再调用 api。
IntentFile to Read
Login, logout, scope pre-check, Token, profile, config, doctor
references/workflows/auth/workflow.md
Call any OpenAPI,
--as
, pagination and dry-run
references/workflows/api/workflow.md
Query local OpenAPI path, parameters and scope
references/workflows/schema/workflow.md
Search documents, messages or apps
references/workflows/search/workflow.md
Query users, emails, phone numbers, departments
references/workflows/directory/workflow.md
Schema is only responsible for discovering interfaces; API is responsible for executing requests. Usually, check the schema first, then call the api.

执行规则

Execution Rules

  1. 优先运行仓库当前编译产物
    ./feishu-cli
    ;安装环境才使用 PATH 中的
    feishu-cli
  2. User Token 操作先执行
    auth check --scope
    。不要在输出、文件或命令历史中暴露真实 Token。
  3. 多 Bot / 不确定当前是哪个应用时,先
    profile list --json
    ;单次目录/Token 选择用
    --profile <name>
    ,不要为一条命令去
    profile use
    。若
    env_overrides.app_id/app_secret=true
    ,环境变量仍覆盖 App 凭证,需先提示用户 unset 对应变量。
  4. 写请求先用
    --dry-run
    ;API 不支持 dry-run 的端点需明确告知用户副作用。
  5. 搜索与通讯录结果默认只读取;用户要求后续写操作时再切换到对应领域 Skill。
  1. Prioritize running the current compiled product
    ./feishu-cli
    in the repository; use
    feishu-cli
    in PATH only for environment installation.
  2. Execute
    auth check --scope
    first for User Token operations. Do not expose real Tokens in output, files or command history.
  3. When there are multiple Bots / unsure which application is currently in use, run
    profile list --json
    first; use
    --profile <name>
    for single directory/Token selection, do not use
    profile use
    for a single command. If
    env_overrides.app_id/app_secret=true
    , environment variables still override App credentials, you need to prompt the user to unset the corresponding variables first.
  4. Use
    --dry-run
    first for write requests; for endpoints that do not support dry-run, clearly inform users of side effects.
  5. Search and address book results are read-only by default; switch to the corresponding domain Skill only when the user requests subsequent write operations.

领域边界

Domain Boundaries

  • 文档读写与导入导出:
    feishu-cli-docs
  • 云盘、知识库、评论和权限:
    feishu-cli-storage
  • 消息、群聊、卡片和事件:
    feishu-cli-messaging
  • Sheet/Bitable:
    feishu-cli-data
  • Document read/write and import/export:
    feishu-cli-docs
  • Cloud disk, knowledge base, comments and permissions:
    feishu-cli-storage
  • Messages, group chats, cards and events:
    feishu-cli-messaging
  • Sheet/Bitable:
    feishu-cli-data