In the development workflow of DeepSeek Harness (DSH), different development tasks in the same repository often require frequent branch switching or handling multiple concurrent sessions. The dsh-worktree plugin integrates the Git worktree mechanism to address the need for isolated task environments in DSH.

This is a plugin maintained by alpacachen (npm package name: @alpacachen/dsh-simple-worktree), designed to connect Git worktree capabilities with DSH’s workspace system. It allows users to create a new worktree in an existing Git Workspace and register it as an independent DSH Workspace, enabling an isolated session.

Installation and Activation

To install the plugin, use the official installation command:

dsh plugin --profile web add @alpacachen/dsh-simple-worktree

After installation, you must restart the dsh web process for the changes to take effect.

Core Features

The plugin provides a complete workflow from creation to management:

  • Create Worktree: In the New Session of any Git Workspace, you can directly create a new Git worktree.
  • Branch Selection: During creation, users can select the current branch or directly use the repository’s main branch as the base.
  • Workspace Registration: After successful creation, the new worktree is automatically registered as a DSH Workspace and opens an independent session.
  • Task Branch Naming: The plugin automatically names the branch in the task/<name> format.
  • Unified Management: All linked worktrees can be managed uniformly in the Settings → Worktree Management page. This page supports scanning Git projects in all Workspaces, checking branch status and whether they are in a dirty state, and supports removing worktrees that are no longer needed.
  • Zero Configuration: No additional services or project configuration are required to use it.
  • Multilingual Support: Supports DSH themes and provides Chinese and English interfaces.

Typical Usage

  1. Open New Session in any Git Workspace.
  2. Above the composer, select the Create worktree option.
  3. Enter a task name. By default, the system selects the repository’s main branch.
  4. Click the Create and open button. The system creates the worktree, registers a new Workspace, and opens an isolated session.
  5. In Settings → Worktree Management, you can view information for all currently associated worktrees and perform cleanup operations.

Applicable Scenarios and Notes

  • Version Compatibility: The plugin is developed based on the DSH 0.1.5 client contract and only supports versions 0.1.5-rc.1 or 0.1.5-rc.2. It is only applicable to the web profile.
  • Data Safety: Deleting the corresponding Workspace in Worktree Management only removes the DSH link; it does not delete the underlying Git branch.
  • License: The plugin follows the MIT license.
  • Ecosystem Background: The DeepSeek Harness ecosystem follows the “everything is a plugin” philosophy. This plugin is maintained by a community developer, and its official catalog address is skillhub.cn, with no direct affiliation to DeepSeek.

By using dsh-worktree, you can leverage Git worktree to manage parallel multi-task development environments without leaving the DSH interface, improving local development efficiency.