Introduction

The design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When developing agents or debugging code, frequently switching between the local terminal, the browser, and the DSH interface can interrupt your flow. The dsh-git plugin provides local Git operations and GitHub remote tabs in DSH’s official right sidebar, reducing the overhead of window switching and allowing Git workflows to be completed directly within the DSH environment.

Core Features

The plugin combines browser-side UI with host-side logic through a single npm package and provides the following capabilities:

  1. Local Git Workbench: provides “Changes” and “History” tabs. In “Changes”, you can view file diffs, stage modifications, and generate commit messages using the model configured in DSH; in “History”, you can view commit history and specific changes.
  2. Multi-repository Management: supports an explicitly added list of local repositories, and after signing in to GitHub, can list remote repositories you have access to.
  3. Remote GitHub Tabs: integrates Code (file tree), Issues, Pull Requests, and Actions tabs. If a repository has no remote, the Code tab falls back to a local workspace view, while Issues/PR/Actions tabs display explanatory messages instead of errors.
  4. Intelligent Commit Generation: uses DSH’s ctx.llm interface to automatically generate convention-compliant commit messages based on staged diffs.
  5. Security and Architecture: local operations access the Host via loopback routing; tokens are stored only on the Host side, and the browser UI displays only the last 4 characters of the token; force-push operations are allowed only with --force-with-lease.

Installation and Activation

Use DSH’s plugin manager to install the plugin.

dsh plugin --profile <profile> add @linxueyuan/dsh-git

After installation, you must restart DSH and hard-refresh the browser, because host-side modules are not automatically reloaded when the page refreshes.

Login and Permission Setup

The plugin supports two ways to sign in to GitHub:

  • Device Code: Sign in through the built-in GitHub App, out of the box. However, ensure that the GitHub App has been installed to your account or organization; otherwise, sign-in may succeed while repositories cannot be seen. Tokens generated by this method expire after 8 hours, and the plugin automatically renews them.
  • Personal Access Token (PAT): Enter a PAT manually. Classic tokens must have the repo permission, while fine-grained tokens must include Contents (R), Issues (RW), Pull requests (RW), and Actions (RW) permissions.

Typical Usage

  1. Add a Repository: Add the path of the local repository you want to manage in the right-sidebar plugin UI.
  2. Sign in to GitHub: Click “Sign in to GitHub.com”, then choose Device Code or enter a PAT.
  3. Stage and Commit: In the “Changes” tab, select files, click “✨ Generate” to let the model write a summary, and click “Commit”.
  4. View History: In the “History” tab, view commit records, including diff viewing and cherry-pick operations.
  5. Manage Remotes: Use the “Code”, “Issues”, “PR”, or “Actions” tab to browse files, manage Issues, or control Workflow runs.

Notes

  • Token Security: Tokens exist only on the Host side; the browser cannot see the full content. The file is stored as plaintext with permissions of 0600.
  • Force-Push Restriction: To prevent accidental operations, the plugin requires --force-with-lease for force pushes and does not support bare --force.
  • Code Tree View: Local unpushed commits do not appear in the file tree of the “Code” tab; this view is based on the GitHub remote.
  • Environment Requirements: Node.js must satisfy ^22.19.0 || >=24.0.0.

Conclusion

By moving Git workflows and GitHub tabs into DSH’s right sidebar and combining LLM-assisted commit message generation, dsh-git provides developers with a highly integrated entry point for code management. For more details and the source code, refer to its GitHub repository.