Introduction

In DSH (DeepSeek Harness), when agents need to operate on GitHub issues, Gitea issues, or publish npm packages, they often need to handle prerequisites first, such as whether the CLI is installed, whether the login state is available, where the token comes from, and how to publish. @tommyfang/gh-tea-npm-dsh turns these workflows into a plugin tool: it detects the current environment first, then allows selection of installation, importing tokens, browser OAuth, or manual tokens based on the returned menu, and finally executes issue operations or npm publishing.

What is it

@tommyfang/gh-tea-npm-dsh is a DeepSeek Harness (dsh) plugin for GitHub CLI (gh), Gitea CLI (tea), and npm. It provides CLI detection/installation, guided authentication/configuration, issue operations, and npm package publishing tools. The plugin is maintained by TommyFang2077 and is licensed under the MIT License.

It enters dsh as a host-only bundle: cordis.patch.yml inserts the plugin entry, and dsh/index.js registers the tools and the companion skill.

Core Features

gh / tea

  • Detects the installation status, version, authentication status, and token environment variables for gh / tea; token values are masked for display.
  • One-click installation: prioritizes Homebrew, otherwise installs binaries without sudo to ~/.local/bin.
  • Guided authentication: supports importing from environment variables, browser OAuth device flow, or manual tokens.
  • Issue operations: supports listing, viewing, creating, commenting, closing, and reopening.

npm

  • Detects Node.js, npm, login status (npm whoami), and registry.
  • Guided login: supports browser OAuth device flow (npm login --auth-type=web) or using an automation token.
  • Publish npm package: uses npm publish --access public.
  • npm access tokens, including automation tokens, have a 90-day lifetime limit; the plugin provides expiration reminders and rotation guidance.

Companion Skill

The plugin registers a gh-tea-npm companion skill to explain workflows and direct specific command arguments to the respective CLI’s own --help.

Installation and Activation

Before installation, ensure the local machine meets npm tool requirements: Node.js >= 18 and npm. gh and tea are optional components; if missing, the plugin can install them.

Run the following command to install the plugin:

npx -y @deepseek-ai/dsh plugin add @tommyfang/gh-tea-npm-dsh

After installation, the plugin registers the corresponding tools and gh-tea-npm skill in dsh.

Typical Usage

The following lists the tool names and common invocation parameters provided by the plugin. The plugin does not ask open-ended questions but returns the current status and the next step menu, allowing users to select step-by-step.

Configuring gh / tea

First, check the current status and available operations:

gitclis_configure method=auto

If the CLI is not installed, you can install it first:

gitclis_install

When selecting the token source, you can import from environment variables:

gitclis_configure method=env

You can also use browser OAuth:

gitclis_configure method=web
gitclis_configure method=poll

Here, method=web returns a device code, and method=poll is used to verify the login status.

If you already have a manual token, you can write it in:

gitclis_set_token

Finally, verify the gh / tea status:

gitclis_status

Configuring npm

First, check the npm environment and the next step menu:

npm_configure method=auto

When using browser login:

npm_configure method=web
npm_configure method=poll

method=web returns the login URL, and method=poll is used for verification.

If using an automation token:

npm_configure method=token

Publishing npm Packages

You can do a dry run first:

npm_publish dry_run=true

After confirming everything is correct, publish formally:

npm_publish

The issue tool requires a provider parameter: github uses gh, and gitea uses tea.

Use Cases and Notes

Suitable for developers who need agents in DSH to handle gh/tea issues, configure login states, or publish npm packages. It is best suited for scenarios where “detection, installation, authentication, and publishing” are strung together into a fixed workflow.

Notes:

  • npm tools require Node.js >= 18 and npm.
  • gh and tea are optional, and the plugin can install missing CLIs.
  • npm access tokens, including automation tokens, have a 90-day lifetime limit and require rotation as guided.
  • The plugin runs with the current dsh process permissions, invoking local gh, tea, and npm, and using your configured tokens or browser login states. Before installation, you should check the source code, license, and the CLI operations that will be executed.

Conclusion

The value of gh-tea-npm-dsh lies in converging common prerequisite operations for GitHub, Gitea, and npm into dsh tools: detecting environments, installing CLIs, guiding authentication, operating on issues, and publishing npm packages, while also providing token rotation reminders. Repository address: https://github.com/TommyFang2077/gh-tea-npm-dsh