其他

feishu-cli-auth

riba2534/feishu-cli

飞书 OAuth 认证和 User Access Token 管理(Device Flow,RFC 8628)。 支持一键创建飞书应用、按域申请推荐权限、auth check 预检 scope、auth login 登录、Token 自动刷新。 覆盖 AI Agent 两步授权(--no-wait 拿链接 → --device-code 续轮询)、JSON 事件流解析、部分 scope 未授予(missing_scopes)的判读与补授。 当用户请求登录飞书、获取 Token、OAuth 授权、用户身份授权、device flow、权限缺失、Token 过期、create-app、99991672、99991679, 或其他飞书技能遇到 User Access Token 问题时使用。 本技能同时承载两个相关子命令:doctor 做配置/网络/代理体检(错误信息不指向 scope/token 时用), profile 管理多 App / 多账号独立配置(多租户切换)。 注意:profile 指 CLI 配置切换,与邮箱 mailbox profile(feishu-cli-mail)无关。

  • 801 次安装
  • 1400 星标
  • 收录于

安装命令

npx skills add https://github.com/riba2534/feishu-cli --skill feishu-cli-auth

SKILL.md

飞书认证

本项目默认使用 App Token。只有搜索、消息历史/互动、审批任务、会议/妙记、邮箱等用户身份场景需要 User Access Token。

推荐流程(人工 / 交互终端)

# 1. 预检:缺什么 scope 一目了然(auth check 返回 missing 时先到开放平台开通)
feishu-cli auth check --scope "search:docs:read search:message"

# 2a. 按业务域登录,自动带该域推荐 scope
feishu-cli auth login --domain search --recommend

# 2b. 一次授全:对全部业务域申请推荐 scope(单独用 --recommend,不带 --domain)
feishu-cli auth login --recommend

# 2c. 精确控制:显式指定 scope(与 --domain/--recommend 互斥)
feishu-cli auth login --scope "search:docs:read search:message"