Local Git plus the four GitHub remote tabs in the official DSH right sidebar: Changes (per-file staging, line diffs, and commit messages written by the model already configured in DSH), History, then Code, Issues, Pull requests and Actions proxied by the host half. The token stays in the host half through ctx.credentials and /dsh-git/* accepts loopback requests only.
Install
# from npm (prebuilt)
dsh plugin --profile web add @linxueyuan/dsh-git
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:LinXueyuanStdio/dsh-git
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
简体中文 | English
Local Git, inside the official DeepSeek Harness sidebar: a multi-repo picker, local Changes / History work, Code / Issues / Pull requests / Actions tabs for the remote, and commit messages written by any model already configured in your DSH model list.
What you get
These are shared by every tab:
- Multi-repo picker — the local repositories you explicitly added; once you sign in to GitHub it can also list remote repositories you have access to.
- Sync and branches — fetch / pull / push. A force push is only ever
--force-with-lease(there is no bare--forceanywhere). Switch, create and rename branches; check out a commit (detached HEAD) or cherry-pick it. - Usable without a remote — on a local-only repository the Code tab degrades to a local working-tree view rather than an empty page; Issues / PR / Actions need a remote and say so in plain language instead of erroring.
- Commit messages come from the model — the host half reads the diff and goes through
ctx.llm, so it uses whichever provider you already configured in DSH. - Findable in settings — sidebar Plugins page ▸ Installed ▸
@linxueyuan/dsh-git▸ the configuration section on its detail page: interface scale, diff check marks, notifications and a few confirmation prompts, plus the plugin's own config document (Pulls auto-refresh interval). The ported GitHub Desktop preference pages stay behind the gear in the right sidebar.
How it works
One npm package contains two halves. The browser half only draws UI (it registers the official sidebar tab; local actions go over /dsh-git/*). The host half runs in the same process as dsh: it runs git, registers routes, holds the token, and calls the model. Remote tabs never talk to GitHub directly — the host half proxies them, so the token never enters the browser.
/dsh-git/*accepts loopback requests only; LAN and remote access get a 403.- git can only touch paths from the list of repositories you explicitly added (anything else returns
workspace-unknown). clonedisablesprotocol.ext.*.- The token lives in the host only, with a single read / write / log site:
src/host/credential-bridge.ts.
Install
# from npm (the npm package name is scoped: @linxueyuan/dsh-git)
dsh plugin --profile <profile> add @linxueyuan/dsh-git
# from a local directory (development)
dsh plugin --profile <profile> add /path/to/dsh-git
Note it is @linxueyuan/dsh-git, not the unscoped dsh-git — the latter was taken by someone else (a 0.0.1 placeholder package whose repository link 404s).
After installing, restart DSH and hard-refresh the page (the host half is a Node module and does not reload with a page refresh).
GitHub sign-in and tokens
Two ways to sign in: click Sign in to GitHub.com for device flow (works out of the box — the app ships with the package), or paste a Personal Access Token (a fine-grained token needs Contents R / Issues RW / Pull requests RW / Actions RW; a classic token needs repo).
⚠️ The built-in app is a GitHub App: install it on your account / organization first — without an installation you sign in successfully but see no repositories. Its user tokens expire after 8 hours; the plugin refreshes them automatically.
To bring your own app, set clientId in the profile's cordis.patch.yml, or provide the DSH_GIT_CLIENT_ID environment variable (off disables device flow).
- id: dsh-git
name: '@linxueyuan/dsh-git'
config:
clientId: 'Ov23li…' # Client ID of your own app
The token lives in the host only, the browser sees just its last 4 digits, and at rest it is plaintext with 0600 permissions — no encryption.
Known limits (M1)
- Remote tabs are GitHub-only. And the Code tree is the remote's view: local commits that have not been pushed do not show up there as files.
- The built-in app is a GitHub App, so its repository access requires installing it first, and its user tokens expire after 8 hours (the plugin refreshes them automatically). Bringing your own OAuth App avoids the install step.
Development
npm install # deps: esbuild (bundling) + typescript / eslint / sass (gates)
npm run build # lib/index.js (host, esm) + lib/client.js (browser, ModuleLoader-wrapped)
npm run check # artifact syntax check (node --check)
npm run lint # ESLint
npm run typecheck # type gate
npm run check:static # every static gate in one command (check-all discovers and summarises)
CI only checks the published artifact (build → artifact syntax → package usability: manifest self-consistency, the host can load it, every runtime dependency is declared, and the tarball is complete and carries no source):
npm run build && npm run check && node scripts/verify-plugin.mjs
The gates below are local source-hygiene tools, not CI — they look at how this repository is written rather than at whether an install works, and some of them carry long-standing ratchet debt:
| Gate | Silent failure it catches |
|---|---|
check-integration |
artifact not promoted / mirror unreachable / missing class names |
check-generated |
generated files out of sync with sources (npm run check:generated:rebuild re-runs the build and compares byte for byte) |
check-base-recipes |
the class exists but its real style recipe is outside the compiled closure |
check-scope-roots |
a scope root appearing twice in one selector ⇒ it can never match |
check-sass-leaks |
an unencoded $var left in the artifact ⇒ browsers silently drop the whole declaration |
check-unreachable-ancestors |
the rule exists but the ancestor element it requires never renders |
check-lint / check-types / check-scripts-types |
ESLint / client types / types of scripts/** itself |
Exit-code contract: 0 = pass (registered ratchet debt is allowed), 1 = an unregistered defect, 2 = skipped.
License
MIT · third-party notices: THIRD-PARTY-NOTICES.md
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-git-graph★ 10686
Git branch selector and Git graph for the dsh web GUI: switch branches and explore branch-lane and commit history from the conversation header. Retired by the author in favour of the official workspace-changes plugin: the published npm package stays installable but is no longer developed.
Akimiya-z/codex-guard#dsh★ 131
Pre-submit pull-request hygiene checks inside DeepSeek Harness: scans the current diff for TODO leftovers, hardcoded secrets, and non-conventional commit subjects.
xbzbing/dsh-git-panel★ 65
IDE-style Git panel in the DSH Web GUI: a resident tab with a three-column overview (branch/tag list, searchable commit-history graph, commit detail with changed-file tree and message) and a changes page (stats bar, uncommitted list with per-file stage/unstage/discard, commit box with amend); side-by-side diffs carry lazy highlight.js syntax highlighting, on-demand between-hunk context expansion and word-level intra-line emphasis, with image files shown as before/after panes; plus a zsh-style branch marker in the input bar. Every git command runs as an argv array through the host subprocess service, cwd locked to the repo root.
Cerbur/clutch-dsh#clutch-dsh-worktree★ 49
Adds a Worktree view to DSH Web UI that groups Sessions by Git worktree while keeping DSH as the source of truth.
KannaKuron/dsh-ide-git★ 41
JetBrains-style Git tool window for the sidebar: branch tree with ahead/behind badges, commit graph with text/author/date/path filters, per-file line diff, changes list and commit box, plus branch, tag and stash actions, merge, rebase, cherry-pick, reset and fetch/pull/push.
Lenonss/DSH_VsCodeMode★ 36
VSCode-style editing experience for DeepSeek Harness: a Monaco-based central file editor (tabs, Ctrl+P quick open, status bar) and interactive diff review of agent edit/write results with per-change Keep/Undo, rollback and archiving, persisted across restarts.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.