Skip to main content
S

dsh-plugin-lark-profiles

seeyangzhi/dsh-plugin-lark-profiles

Adds a Settings page that lists every lark-cli profile on the machine with its brand (Lark or Feishu), App ID and signed-in user, and lets the owner choose the default profile. Runs lark-cli locally and adds no agent tools.

Install

dsh plugin --profile web add github:seeyangzhi/dsh-plugin-lark-profiles

README

Lark profiles for DeepSeek Harness

A DeepSeek Harness plugin that adds a Lark profiles page to Settings. The page lists every lark-cli profile on your machine, Lark and Feishu alike, and lets you choose which one is the default.

It is for people who work across several Lark or Feishu organisations and want to see, and control, which one their agents act on.

The Lark profiles page in Settings, with profile names and App IDs masked

What you get

  • One row per profile: name, brand (Lark or Feishu), App ID, and who is signed in.
  • A Set as default button on each row. The current default reads Default.
  • A warning on any profile whose sign-in has expired, with the command to fix it.
  • English and Chinese text, following the language DeepSeek Harness is set to.

The default profile is the one lark-cli uses when a command has no --profile flag. Changing it here runs lark-cli profile use <name>, so it applies to every harness and terminal on the machine. Commands that pass --profile explicitly are not affected.

Requirements

  • DeepSeek Harness with its desktop or web interface.

  • lark-cli installed, with at least one profile:

    npx @larksuite/cli@latest install
    lark-cli profile add --name my-org --brand lark --app-id cli_xxx --app-secret-stdin
    lark-cli --profile my-org auth login
    

    Use --brand feishu for a Feishu app. profile add reads the App Secret from standard input.

Install

In DeepSeek Harness, open Plugins, choose Add plugin, and enter:

github:SeeYangZhi/dsh-plugin-lark-profiles

Or from a terminal, for the profile you run:

dsh plugin --profile <profile> add github:SeeYangZhi/dsh-plugin-lark-profiles

The plugin is plain JavaScript with no dependencies and no install scripts, so nothing is built or executed during installation. To stay on an exact version, append a commit: github:SeeYangZhi/dsh-plugin-lark-profiles#<commit>.

Use

Open Settings and choose Lark profiles. Select Set as default on the profile you want. Refresh re-reads the list after you add, remove or sign in to a profile with lark-cli.

How it works

The plugin runs three lark-cli commands on the machine DeepSeek Harness runs on, and nothing else:

WhenCommand
Listinglark-cli profile list
Listing, once per profilelark-cli --profile <name> auth status --json
Choosing a defaultlark-cli profile use <name>

It never reads App Secrets or tokens, stores nothing of its own, and sends nothing anywhere itself. The page is reachable only by the owner of the Harness. There is deliberately no agent tool: which organisation unpinned commands act on is a decision for the person, not the agent.

lark-cli is looked up on the Harness's PATH, then in the usual global install directories (Homebrew, /usr/local/bin, ~/.local/bin, npm, Volta and nvm). Set the LARK_CLI_BIN environment variable to use another location.

Limits

  • Tested on macOS with DeepSeek Harness 0.2.2-rc.5 and lark-cli 1.0.100. The Linux and Windows lookup paths are written but have not been run.
  • Adding, removing, renaming and signing in to profiles stays with lark-cli.
  • Turning the plugin off removes the page and leaves lark-cli untouched.

Develop

git clone https://github.com/SeeYangZhi/dsh-plugin-lark-profiles
cd dsh-plugin-lark-profiles
npm test

The tests run against a stand-in lark-cli, so they touch no real profile. To try a checkout in the app, add its directory with Plugins > Add plugin.

FileRole
client.jsThe Settings page, registered into the settings.section slot
host.jsTwo owner-only routes the page calls
lark-cli.jsFinding and running lark-cli
cordis.patch.ymlThe plugin row DeepSeek Harness loads
locale/Plugin title and description shown in Plugins

License

MIT

Related plugins