> lfy-cli 是 LFY 提供的命令行程序,所有操作通过 lfy-cli <品类> <方法名> ' 完成;鉴权由后端注入,需先完成 授权与登录(lfy-cli login)。
完整使用说明、常见问题与操作指引见飞书文档:LFY-CLI 帮助手册。
references/ 侧重命令参数与 Agent 执行细节;更全面的图文说明以飞书手册为准。lfy-cli 命令回答(即使用户未说 LFY/lfy),必须使用本技能。lfy-cli),或明显在问 LFY 销售业务(客户、商机、报表、日程、销售目标等),必须使用本技能。以下说法常不含 LFY 字眼,但只要意图落在对应能力,即适用上文「能力命中」,禁止跳过本技能:
| 品类 | 示例说法(节选) | 命令 |
|---|---|---|
| --------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| user(身份/组织) | 我是哪个企业、我是谁、我属于哪家公司、当前登录用户、我的组织/企业名称 | user get_self |
| user | 销售有哪些、销售团队、业务员名单 | user get_sales |
| ops | 第几周、本周日期、当前财年 | ops get_current_week / ops get_fiscal_year |
| schedule | 本周安排、最近有什么任务、指定日期任务、创建任务/日程 | schedule get_current_week / get_recent_tasks / get_tasks_anytime / create_task |
| customer | 我的客户清单、搜客户、客户详情、GTM 列表 | 见 customer.md |
| pipeline | 搜商机、待签单、商机列表/详情/阶段 | 见 pipeline.md |
| report | 销售目标、销售大局观、财务报表 | 见 report.md |
| contact / base | 联系人列表、客户状态下拉选项等 | 见 contact.md、base.md |
更全触发词见「品类路由表」与各 references/<品类>.md。
SKILL.md)为技能入口;references/ 下的文档仅在执行对应品类/命令需要细节时由 Agent 自动读取(渐进式披露)。lfy-cli:执行任何品类命令前,先检查 lfy-cli 是否可用(如 lfy-cli --version)。若未安装,先安装:```bash
npm install -g @6fy/cli
```
安装后第一步是完成 LFY 系统授权(申请 user key / user secret 并 lfy-cli login),详见 auth.md。
lfy-cli 前,执行一次升级以扩展最新能力(同一天后续命令无需重复):```bash
lfy-cli upgrade
```
Error: 开头或 JSON 含 error_message 时,按原文向用户说明,勿编造数据。missing <字段>(如 missing start_date)→ 补齐该必填字段或向用户追问后再调用missing gtm_id / 缺少 gtm_id(含 report get_financial_statements 等必填 gtm_id 命令)→ 先 customer get_gtms 取 gtm_id(名称匹配不到或多义时向用户确认 GTM)再调用;禁止用 {} 原样重试日期区间不能超过60天 → 缩短区间或分段多次调用结束日期不能早于开始日期 → 交换/修正日期后重试customer/pipeline 的 create/update)返回 参数错误 → 自检是否「把名称当 id」或「用错键名」(如改客户状态误用 customer_status 应为 status_id)→ 先 base get_options(客户字段)或 pipeline get_sales_stage(商机阶段)换成 id 再重试一次,禁止原样重试Error: → 原文转述,不编造*_id、week_no、status_value 等技术字段默认不展示,面向业务用户展示业务字段。YYYY-MM-DD HH:mm:ss。open,Linux xdg-open),不要在对话中贴大段 Markdown 表格。处理某类任务前,Agent 按需自动读取 references/<品类>.md 获取接口清单与详细工作流(无需用户手动打开文件)。
| 品类 | 能力 | 触发词 | 指南 |
|---|---|---|---|
| -------- | ---------------------------------------- | ---------------------------------------------------- | ------------------------------------- |
| customer | 客户搜索/清单/详情/GTM/创建/修改 | 客户、我的客户清单、GTM、创建客户、改客户 | customer.md |
| pipeline | 商机搜索/阶段/详情/待签单/列表/创建/修改 | 商机、pipeline、待签单、商机阶段 | pipeline.md |
| report | 销售目标/大局观/GTM 财务报表 | 销售目标、大局观、财务报表 | report.md |
| user | 本人信息/销售名单 | 我的用户信息、销售人员、销售团队 | user.md |
| ops | 财年/当前周 | 财年、第几周、本周日期 | ops.md |
| schedule | 最近任务/本周任务/区间任务/创建任务 | 最近任务、本周日程、指定日期任务、创建任务、工作安排 | schedule.md |
| contact | 联系人列表 | 联系人、联系人列表 | contact.md |
| base | 客户/商机编辑下拉选项 | 客户状态/标签/区域/行业可选项 | base.md |
user get_self:用户问企业/组织/公司/我是谁/当前账号等(含「我是哪个企业」)→ 禁止猜测或编造 → 执行 lfy-cli user get_self '{}' → 面向用户展示 {org_name} - {user_name}(不展示 user_id)→ 失败按 Error: 原文说明,必要时引导 lfy-cli login(见 auth.md)。customer get_list,禁止用 search:用户说「我的客户列表 / 我的客户清单 / LFY 我的客户清单 / 我有哪些客户 / 列出我负责的客户」时,必须用 get_list;search 仅用于明确「搜索关键字、快速找客户 ID」。详见 customer.md。schedule create_task;用户要「改/删/完成/取消/延期 已有 task_id 的任务」→ 说明 CLI 不支持,引导 Web 详情页 https://app.6fenyi.com/tasks/{task_id};禁止因「不支持修改已有任务」而拒绝 create_task。详见 schedule.md。get_recent_tasks(参数固定 {},最稳)get_current_weekget_tasks_anytimestart_date 与 end_date 时,禁止调用 get_tasks_anytime(会报 missing start_date),改用 get_recent_tasks 或先向用户追问;不要用 {} 试探带必填参的命令。gtm_id 命令禁止 {} 试探:report get_financial_statements(以及 pipeline get_sales_stage、customer create_customer、pipeline create_pipeline 等 gtm_id 必填命令)在拿到 gtm_id 前,禁止用 {} 调用(会报 缺少 gtm_id 参数);必须先 customer get_gtms 取 gtm_id,或向用户确认 GTM 后再调。| 工作流 | 命令 | 详见 | |||
|---|---|---|---|---|---|
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | |||
| 首次使用引导 | 见下方三步,无单条命令 | getting_started.md | |||
| 搜索客户 | lfy-cli customer search '{"keywords":" | customer.md | |||
| 我的客户列表 | lfy-cli customer get_list '{...}' | customer.md | |||
| 客户详情 | lfy-cli customer get_details '{"customer_id":123}' | customer.md | |||
| GTM 列表 | lfy-cli customer get_gtms '{}' | customer.md | |||
| 创建客户 | lfy-cli customer create_customer '{...}' | customer.md | |||
| 修改客户 | lfy-cli customer update_customer '{...}' | customer.md | |||
| 搜索商机 | lfy-cli pipeline search '{"keywords":" | pipeline.md | |||
| 商机阶段 | lfy-cli pipeline get_sales_stage '{"gtm_id": | pipeline.md | |||
| 商机详情 | lfy-cli pipeline get_pipeline_info '{"pipeline_id": | pipeline.md | |||
| 待签单商机 | lfy-cli pipeline get_pending_signature '{...}' | pipeline.md | |||
| 商机列表 | lfy-cli pipeline get_list '{...}' | pipeline.md | |||
| 创建商机 | lfy-cli pipeline create_pipeline '{...}' | pipeline.md | |||
| 修改商机 | lfy-cli pipeline update_pipeline '{...}' | pipeline.md | |||
| 销售财年目标 | lfy-cli report sales_target '{"sales_id": | report.md | |||
| 销售大局观 | lfy-cli report get_sales_overall '{...}' | report.md | |||
| GTM 财务报表 | lfy-cli report get_financial_statements '{"gtm_id": | report.md | |||
| 本人信息 | lfy-cli user get_self '{}' | user.md | |||
| 销售名单 | lfy-cli user get_sales '{}' | user.md | |||
| 财年信息 | lfy-cli ops get_fiscal_year '{}' | ops.md | |||
| 当前周 | lfy-cli ops get_current_week '{}' | ops.md | |||
| 最近任务 | lfy-cli schedule get_recent_tasks '{}' | schedule.md | |||
| 本周任务 | lfy-cli schedule get_current_week '{"gtm_id":0,"sales_ids":[],"customer_ids":[],"limit":50}' | schedule.md | |||
| 区间任务 | lfy-cli schedule get_tasks_anytime '{"start_date":"2026-05-01","end_date":"2026-05-18","gtm_id":0,"sales_ids":[],"customer_ids":[],"limit":50}' | schedule.md | |||
| 创建任务 | lfy-cli schedule create_task '{...}' | schedule.md | |||
| 联系人列表 | lfy-cli contact get_list '{...}' | contact.md | |||
| 下拉选项 | `lfy-cli base get_options '{"object_id": | customer_tags\ | customer_region\ | customer_industry","cli":true}'` | base.md |
用户新手入门时 Agent 按需读取 getting_started.md 并逐步执行:
npm install -g @6fy/cli,lfy-cli --version 确认 lfy-cli login → lfy-cli status(细节见 auth.md) lfy-cli upgrade(当日首次)→ lfy-cli schedule get_current_week '{"gtm_id":0,"sales_ids":[],"customer_ids":[],"limit":50}' → 按 schedule.md 表格展示 许多操作需先取 ID 再执行,统一约定:
user get_sales 拿 sales_id。customer get_gtms 拿 gtm_id。base get_options(客户字段)或 pipeline get_sales_stage(商机阶段)拿可选 id。customer search / pipeline search 拿 customer_id / pipeline_id,再 get_details / update_*。用户需要联系客服或反馈问题时,用浏览器打开客服二维码页面供用户扫码查看,无需任何前置条件(不要求先完成安装、授权、lfy-cli login、lfy-cli upgrade 或阅读 auth.md 等)。
触发场景(满足任一即打开客服页面):
不触发: 用户仅在查询业务数据且未提及客服/反馈时,不要主动打开客服页面。
展示方式(必须执行):
/tmp/lfy-wechat-support-<时间戳>.htmlopen "<绝对路径>";Linux 执行 xdg-open "<绝对路径>"展示话术(固定):
遇到任何问题,可以联系 LFY 官方客服 反馈问题。已在浏览器为您打开「LFY 官方客服」页面,请使用微信扫一扫页面中的二维码。
每天使用 SKILL 前进行一次更新检查,按照如下的步骤执行:
skill_version 填上一步 frontmatter 的 version;cli_version 填 lfy-cli --version 输出(去掉 v 前缀)curl -sS -X POST 'https://open-api.6fenyi.com/cli/version' \
-H 'Content-Type: application/json' \
-d '{
"skill_version": "1.0.0",
"cli_version": "0.18.0"
}'
JSON 返回:
skill_latest_version: 最新版本号(MAJOR.MINOR.PATCH)cli_latest_version: 最新版本号(MAJOR.MINOR.PATCH)release_note: 发布说明skill_version / cli_version 低于 skill_latest_version / cli_latest_version,分别执行 npx skills add https://gitee.com/lfy-team/lfy-cli.git -y -g 与 npm install -g @6fy/cli@latest && lfy-cli upgrade,或提示用户更新。必要时,请自动完成升级。共 4 个版本