dsh-run-environment: Run Your Project Directly in Harness

In the plugin architecture of DeepSeek Harness (DSH), plugins are the core of extensibility. A common pain point for developers is that after opening a project in a Session, they often need to switch to a terminal or manually type startup commands to run the project, which disrupts the current context. dsh-run-environment aims to solve this problem. It is a client plugin that allows you to run commands for the currently open project directly from the Session header without leaving the conversation.

Plugin Positioning

dsh-run-environment is a DeepSeek Harness plugin maintained by albertgranados. Its core philosophy is detection-based rather than configuration-based. The plugin identifies project environments via an adapter model (currently supporting Node.js package.json) and provides run controls in the Session header. It does not require manually writing manifests or configuring paths, and supports running any environment via custom commands.

Core Features

Automatic Detection & Adapters

The plugin utilizes an adapter model for environment detection. As long as the project has a package.json containing scripts, the plugin will identify it without additional configuration. Future adapters will extend support to other environments (e.g., Makefiles). Detected commands are grouped by source and displayed in a menu.

Command Management & Display

  • Rename & Customize: You can rename commands, add descriptions, and customize icons. For detected commands, these operations only modify the display and do not alter the original scripts.
  • Smart Ordering & Defaults: By default, the play button prioritizes the dev script, followed by start, and finally the first script defined in the manifest. You can also set any command as the default via the menu.
  • Interactive Management: Supports hiding/showing commands (hidden commands sink to the bottom and can be restored) and drag-and-drop sorting. The order is remembered per project.

Run & Stop Controls

  • Process Group Termination: Running a command launches a process group. When stopping, the plugin terminates the entire process group (e.g., from npm to sh to the specific dev server), not just the parent process.
  • Status Feedback: Running command lines display a green status dot. If a command fails, the line turns red, and the last line of output is shown in the tooltip.
  • Integrated Console: Running a command automatically opens a corresponding tab in the Harness sidebar for streaming log output. Each command has an independent tab; running it again will focus on the existing tab.

Technical Characteristics

The plugin features zero runtime dependencies. The Host side uses only Node.js built-in modules and Harness’s own packages, while the Browser side is directly provided by the Harness. This makes the installation process very simple, requiring no build steps.

Installation & Activation

Run the following command in your terminal to install:

dsh plugin --profile web add github:albertgranados/dsh-run-environment

After installation, you need to restart the Harness and refresh the browser page for the plugin to take effect.

Typical Usage

  1. Run Detected Scripts: Click the play button in the Session header; by default, it runs the dev script.
  2. Execute Custom Commands: Add custom commands in the menu (e.g., docker compose up -d or python manage.py runserver) and click to execute them within the project directory.
  3. Manage Command Lists: Set default commands, edit names and icons, or hide unwanted commands via the menu.

Notes

  • Environment Requirements: Node.js version 20 or higher is required.
  • Dependencies: The plugin relies on peer dependencies, including @deepseek-ai/cordis, @deepseek-ai/dsh-home-paths, and @deepseek-ai/schemastery.
  • Permissions & Security: The plugin runs with the permissions of the current DSH process. It is recommended to review the source code before installation.

dsh-run-environment simplifies the project running workflow within Harness through its adapter model and zero-dependency design. It integrates the development environment startup process directly into the conversation interface, making it suitable for developers who need to frequently switch projects and check logs.

Plugin Directory
GitHub Repository

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

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

Xiaoye