From 4b1326a44812a33c5a2ae45ef93821f8e030fd68 Mon Sep 17 00:00:00 2001 From: xu91102 <17309584214@163.com> Date: Thu, 9 Jul 2026 15:28:29 +0800 Subject: [PATCH] docs: guide agents to reuse installed CLI --- README.md | 12 +++++++++++- README.zh.md | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0d6fc24c22..45bf64e220 100644 --- a/README.md +++ b/README.md @@ -96,12 +96,22 @@ lark-cli calendar +agenda > The following steps are for AI Agents. Some steps require the user to complete actions in a browser. -**Step 1 — Install** +**Step 1 — Detect or install** + +First check whether `lark-cli` is already available in the current shell. AI Agents should reuse an existing installation instead of asking the user to reinstall every session: + +```bash +command -v lark-cli && lark-cli --version +``` + +If the command is missing or cannot run, install it: ```bash npx @larksuite/cli@latest install ``` +An MCP server is not required for normal `lark-cli` usage. The CLI is a regular terminal command; the bundled Skills teach the Agent when and how to call it. + **Step 2 — Configure app credentials** > Run this command in the background. It will output an authorization URL — extract it and send it to the user. The command exits automatically after the user completes the setup in the browser. diff --git a/README.zh.md b/README.zh.md index 74b7064051..b5dab96d8a 100644 --- a/README.zh.md +++ b/README.zh.md @@ -96,12 +96,22 @@ lark-cli calendar +agenda > 以下步骤面向 AI Agent,部分步骤需要用户在浏览器中配合完成。 -**第 1 步 — 安装** +**第 1 步 — 检测或安装** + +先检查当前 shell 是否已经能直接使用 `lark-cli`。AI Agent 应优先复用已有安装,不要每个会话都要求用户重新安装: + +```bash +command -v lark-cli && lark-cli --version +``` + +如果命令不存在或无法运行,再执行安装: ```bash npx @larksuite/cli@latest install ``` +正常使用 `lark-cli` 不需要额外配置 MCP。CLI 是普通终端命令;随包安装的 Skills 会告诉 Agent 何时以及如何调用它。 + **第 2 步 — 配置应用凭证** > 在后台运行此命令,命令会输出一个授权链接,提取该链接并发送给用户,用户在浏览器中完成配置后命令会自动退出。