dsh-lark: Operate Lark via Natural Language in DSH Sessions

Preface

When building agents in DeepSeek Harness (dsh), a common requirement is to “check schedules, send group messages, or write cloud documents”—tasks typically centered around Feishu / Lark. Relying solely on generating text in the conversation, which humans then copy to Feishu, involves multiple steps and easily breaks context continuity.

The community plugin dsh-lark (npm package name dsh-lark-cli, repository aminuoshi-378/dsh-lark) bridges the official lark-cli into dsh. The model calls the CLI via a single tool, lark_cli, and utilizes nine lark-* skills to perform operations such as sending messages, writing documents, and checking calendars using natural language within the session. Login status and keys are managed by lark-cli; the plugin neither stores nor forwards tokens.

What is this

Maintained by aminuoshi-378 and categorized as a “Network Tool” on SkillHub, its positioning in one sentence is: Allowing AI assistants to operate Feishu directly within dsh—sending messages, writing documents, checking schedules, managing tasks, and organizing spreadsheets without leaving the conversation window.

The design principle is “Official lark-cli handles execution + Skills teach the model how to use it,” separating execution from knowledge:

  • One Tool: lark_cli, taking argv (command tokens, excluding the leading lark-cli) and optional stdin as parameters; it bypasses the shell to avoid issues with quotes, escaping, and injection.
  • Nine Skills: lark-shared, lark-doc, lark-im, lark-calendar, lark-task, lark-drive, lark-sheets, lark-base, lark-wiki, distributed with the plugin and loaded by the model as needed.
  • Zero-Credential Configuration: Login status and keys are managed by lark-cli (~/.lark-cli/config.json and system keychain); the plugin stores and forwards no tokens.

Environment Requirements

Item Requirement
dsh ≥ 0.2.0-rc.2 (Must support defineTool / ctx.subprocess / ctx.skills.registerProvider and dsh.profile.bundles)
OS Windows 10/11 is the primary verified platform; macOS / Linux are theoretically available (lark-cli is cross-platform) but not verified individually
Node.js ≥ 22.0.0
lark-cli ≥ 1.0.96
Network Must be able to access Feishu OpenAPI and open.feishu.cn

Prerequisites

Before installing the plugin, complete the installation and login for lark-cli in the terminal first; the plugin itself does not handle login, nor does it store appId / appSecret for you.

  1. Install the CLI globally:
npm install -g @larksuite/cli
  1. First-time configuration and login (run each once):
lark-cli config init
lark-cli auth login
lark-cli auth status

Installation and Activation

It is recommended to use dsh’s built-in dsh plugin for installation: it automatically handles dependency registration, dsh.profile.bundles registration, and cordis.yml merging. This package does not contain pre-built dist/ files. After installing from a tarball or git source, you need to run npm install && npm run build once in the plugin directory. The following examples use the web profile; replace the --profile parameter according to your actual profile.

dsh plugin --profile web add https://github.com/aminuoshi-378/dsh-lark/archive/refs/tags/v0.1.0.tar.gz
cd ~/.dsh/profiles/web/node_modules/dsh-lark-cli
npm install && npm run build

The version number can be replaced with the target tag from the Releases page.

Method 2: Git Repository

dsh plugin --profile web add dsh-lark-cli@github:aminuoshi-378/dsh-lark#v0.1.0
cd ~/.dsh/profiles/web/node_modules/dsh-lark-cli
npm install && npm run build

After the #, you can specify a tag (e.g., #v0.1.0) or a branch (e.g., #main).

Verification

After the build is complete, restart dsh web and use the following command to confirm that lark-cli related entries appear in the configuration:

dsh --profile web --dump-config | grep lark-cli

If there are no did not activate warnings in the startup logs, lark_cli and the nine lark-* skills can be used within the session. To roll back, execute: dsh plugin --profile web remove dsh-lark-cli, and restart after cleaning up cordis.patch.yml as described in the README.

Typical Usage

The correspondence in the README serves as a reproducible expectation: you describe your intent in the conversation, and the model decomposes it into lark_cli argv calls (refer to the lark-shared skill for specific syntax).

What you say Model-side Action (Conceptually)
“Send the meeting minutes to the product group” lark-im sends a message to the specified group
“Write a PRD based on this material and save it to a cloud document” lark-doc creates a document and writes content
“What meetings do I have next week?” lark-calendar queries the schedule
“Organize the to-dos in this sheet into tasks” lark-sheets reads data → lark-task creates tasks
“Add a page explaining xx to the knowledge base” lark-wiki creates a node → lark-doc writes content

Before using any lark skill for the first time, the model usually reads lark-shared first: identity selection (--as user / --as bot), authentication troubleshooting, JSON output parsing, confirmation for high-risk write operations, and the rules for “calling without shell in dsh”.

The remaining eight skills cover cloud documents, instant messaging, calendar, tasks, cloud space, spreadsheets, multi-dimensional tables, and knowledge bases respectively; the references/ directory under each skill folder provides more detailed command and scenario instructions.

Use Cases and Notes

Who it is for: Developers who are already using dsh (≥ 0.2.0-rc.2), have their team workflows on Feishu, and wish to complete IM, documents, calendars, tasks, spreadsheets, and other OpenAPI capability calls within the session.

Permissions and Security: The plugin runs with the permissions of the current dsh process; it is recommended to read the repository source code and the MIT license before installation. All Feishu write operations remain subject to lark-cli and Feishu app permission constraints; the skills contain descriptions of confirmation gates for high-risk write operations.

Platform: Windows is the primary verified environment; other systems require self-verification of whether lark-cli and plugin builds meet requirements.

Ecosystem Note: DSH adopts an “everything is a plugin” extension method; SkillHub is a community directory site with no official affiliation with DeepSeek / High-Flyer.

Conclusion

dsh-lark connects the official Feishu CLI with dsh’s tools and skills mechanisms: one lark_cli channel, nine sets of domain skills, with credentials remaining on the lark-cli side. If you want to create a closed loop between conversation and Feishu productivity within the Harness, you can follow the steps above to complete lark-cli login and plugin installation, then start testing with lark-shared and the scenario tables in the README.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye