Hoemr/dsh-better-overleaf ↗★ 2
dsh-better-overleaf
Overleaf tab for dsh-better-sidebar: account login via direct-CDP browsers (third-party Chromium supported), project list/switch, workspace mirrors under <workspace>/overleaf/, git/API sync, and file preview through the sidebar workbench 适合需要在本地工作区直接同步、编辑和预览Overleaf论文内容的用户。
설치
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Hoemr/dsh-better-overleafdsh-better-overleaf
Overleaf integration for DeepSeek Harness (DSH), built on
dsh-better-sidebar's
workbench. One Overleaf project ↔ one local git mirror under
/overleaf//, so the sidebar's explorer, editor, image/PDF
previewers, Git panel, and conversation file references (@-mention) operate
on Overleaf content directly.
How it works
Overleaf project ──┬── git bridge (git.overleaf.com/) ← two-way pull/push
└── website zip snapshot (cookie auth) ← pull-only fallback
│
▼
/overleaf// ← real git repo + .overleaf.json binding
│
▼
dsh-better-sidebar workbench ← explorer / editor / preview / Git panel / @引用
- host (
src/index.ts→lib/index.js): providesctx.overleafand the loopback-only/overleaf/*JSON routes (status / projects / bindings / login / cookie / bind / unbind / sync). - client (
src/client/index.ts→lib/client.js): registers theOverleaftab with dsh-better-sidebar when that optional peer is mounted; without it the plugin stays dormant but harmless (hot-pluggable).
Credentials never enter the browser bundle or route payloads: the host resolves
OVERLEAF_COOKIE and OVERLEAF_GIT_TOKEN through ctx.credentials.
Compatibility
0.2.2 is aligned with DSH Desktop 2.0.5 / @deepseek-ai/dsh 0.1.2-rc.1:
- peer deps are
@deepseek-ai/cordis ^4.0.2,@deepseek-ai/dsh-credentials,@deepseek-ai/dsh-host-webserver,@deepseek-ai/dsh-toolsat^0.1.2-rc.1, and `dsh-better-sidebar >=0.13.1 =0.13.1 <0.19 dsh plugin --profile desktop add dsh-better-overleaf@0.2.2
then restart the app so the host halves mount; hard-refresh the web view
dev flow:
dsh plugin --profile desktop add link:D:/Coding/dsh-better-overleaf
If pnpm reports ignored build scripts for `node-pty`, set
`allowBuilds: { node-pty: true }` in the profile's `pnpm-workspace.yaml`
(the terminal feature needs it; everything else works without it).
## Config
```yaml
- insert:
- id: overleaf
name: dsh-better-overleaf
config:
transport: auto # auto | git | api
baseUrl: https://www.overleaf.com
gitOrigin: https://git.overleaf.com
browserChannel: auto # auto | default | msedge | chrome
browserPath: '' # explicit executable, tried first
playwrightHeadless: false
loginTimeoutMs: 600000
transport: auto prefers git whenever OVERLEAF_GIT_TOKEN is stored; pulls
degrade to API snapshots when only a cookie exists. The API transport cannot
push (website endpoints are read-only for content); pushing requires the git
bridge credential (account password, or the Git-integration token for SSO
accounts).
Sync semantics
| Transport | Pull | Push | Notes |
|---|---|---|---|
git | ✅ pull --ff-only | ✅ push HEAD | full history; better-sidebar Git panel shows real diffs |
api | ✅ zip snapshot → wipe & commit | ❌ | refuses when the mirror has uncommitted changes |
Binding writes .overleaf.json inside the mirror and excludes it via
.git/info/exclude; unbind removes only the binding file, never your files.
Status / roadmap
Done: project list/switch, mirror bind/unbind, git clone/pull/push, API snapshot pull, direct-CDP login with custom browser path, manual cookie fallback, loopback-only routes, hot-pluggable optional peer.
Ideas welcome: agent-facing pull/push tool (so the model can sync itself), API push via folder/file upload endpoints, PDF compile preview.