Introduction¶
When debugging profiles, plugins, and toolchains on DeepSeek Harness (DSH), configuration files are often scattered across $DSH_HOME, ~/.dsh, ~/.config/dsh, and various directories belonging to editors and other software. When switching computers, reinstalling the system, or aligning environments across a local network for a second machine, manual copying of paths often results in missed files, and it is difficult to maintain the correspondence between “original absolute paths” and the manifest.
Here we introduce the community plugin dsh-conf-sync (Maintainer: 6027-gthb). It packages selected paths into standard .tar.gz snapshots and migrates them between devices via local files, LAN HTTP, or WebDAV. Upon import, it writes files back to their original paths according to the manifest, with optional backup for existing files. The current version of the plugin is 0.1.0, licensed under MIT. The DSH ecosystem adheres to the principle that “everything is a plugin”; the SkillHub directory page is a community collection site and has no official affiliation with DeepSeek or High-Flyer.
What is this¶
dsh-conf-sync is a configuration synchronization plugin for DSH. It collects files according to the targets (glob paths) declared in your profile, generates an archive containing dsh-conf-sync-manifest.json, and then exports or imports it via three transport channels. Models can also directly invoke tools such as dsh_conf_export and dsh_conf_import to perform operations.
Core Features¶
Three Transport Channels¶
| Channel | Description | Typical Scenarios |
|---|---|---|
local |
Write to/read from a local .tar.gz snapshot |
USB drives, mobile hard drives, or direct file copying |
http |
Local temporary HTTP service with URL output | Transferring between two devices on the same LAN |
webdav |
Push to / pull from WebDAV services like Alist, Nextcloud | Cloud drive relay, cross-network transfer |
The three channels only change the method of transporting the snapshot; the archive format remains consistent and interoperable (e.g., Machine A pushes to WebDAV, and Machine B pulls via HTTP then imports via local).
Export and Import Behavior¶
- Export: Expands globs according to
targets, copies files to a temporary directory, generates a manifest (including original absolute path mappings), and then packages them usingtar+ gzip. - Import: Unpacks the archive, reads the manifest, and writes
files/<i>back tooriginalPath. By default, existing files are first backed up as<path>.bak-<timestamp>. Thetarcommand rejects..directory traversal paths. - HTTP Management:
dsh_conf_closecan shut down temporary services initiated bychannel=httpexports. Uninstalling the plugin or exiting DSH will also automatically shut them down.
Extensible Configuration Targets¶
By default, it covers DSH’s own configuration directories; you can append arbitrary path patterns, such as VS Code settings.json, in the configuration.
Installation and Activation¶
Prerequisites: Node.js ^22.19.0 || >=24, and pnpm (npm install -g pnpm). Installation from GitHub fetches the source code and allows DSH to execute prepare/build to compile lib/. If pnpm ≥ 10 refuses build scripts on first installation, you need to add allowBuilds in the pnpm-workspace.yaml within the profile as per the error message. For security, it is recommended to pin the commit: github:your-username/dsh-conf-sync#<full-commit-sha>.
# ① Install from GitHub repository (Recommended · Reusable across multiple devices, requires commit to GitHub)
dsh plugin --profile web add github:your-username/dsh-conf-sync
# ② Install from local tarball (No publication needed, fastest for single machine)
dsh plugin --profile web add ./dsh-conf-sync-0.1.0.tgz
# ③ Install as an npm package (If published)
dsh plugin --profile web add dsh-conf-sync
# Verify mounted
dsh --profile web --dump-config
Configure the plugin assembly in the profile (or $DSH_HOME/cordis.patch.yml), for example:
- id: dsh-conf-sync
config:
targets:
- name: DeepSeek Harness
patterns:
- C:\Users\you\.dsh
- C:\Users\you\.config\dsh
- name: VS Code
patterns:
- C:\Users\you\AppData\Roaming\Code\User\settings.json
- C:\Users\you\AppData\Roaming\Code\User\keybindings.json
outputDir: D:\backups\conf
httpPort: 3088 # Optional, 0=random port
webdav:
url: https://alist.example.com/dav/snapshots/
username: admin
password: 'your-token'
noBackup: false # If true, overwrite directly on import without backup
For debugging, you can temporarily overlay configurations without modifying the formal profile:
dsh --profile web --patch ./overlay.yml <task>
Typical Usage¶
Export¶
# 1) Write to a local file
dsh_conf_export channel="local" output="D:\backups\conf\snap.tar.gz"
dsh_conf_export channel="local" # Omit output, auto-generate to outputDir
# 2) Start LAN HTTP server and get a sharing URL
dsh_conf_export channel="http" port=0
# 3) Push to cloud drive (Alist WebDAV)
dsh_conf_export channel="webdav" name="my-machine"
The return result includes the location, file count, and source hostname. The HTTP channel will print a sharing URL.
Import¶
Execute on the target device; paths are located by originalPath in the manifest, no need to manually modify paths within the archive:
dsh_conf_import channel="local" source="D:\backups\conf\snap.tar.gz"
dsh_conf_import channel="http" source="http://192.168.1.5:3088/snapshot-xxx.tar.gz"
dsh_conf_import channel="webdav" source="my-machine"
# Restore only matching paths (Regex, optional)
dsh_conf_import channel="local" source="...tar.gz" pattern="settings.json"
# Overwrite import (no backup)
dsh_conf_import channel="local" source="...tar.gz" backup=false
Close HTTP Sharing¶
dsh_conf_close
Scenarios and Notes¶
Who it is for: Developers who need to align DSH profiles and plugin configurations across multiple machines, or back up editor and other software configuration files together; users who prefer using LAN instant transfer or private WebDAV relay rather than plaintext propagation via public cloud drives.
Path Alignment: Import writes back to the absolute paths used during export. When the directory layouts of two machines differ, ensure the target paths exist beforehand or plan the mapping yourself; the README does not provide automatic remapping.
WebDAV: The target directory must be writable; Alist requires WebDAV to be enabled and the directory to be created.
Permissions & Security: The plugin reads and writes files with the current dsh process permissions. Please read the GitHub source code and the MIT license before installation. Snapshots are plaintext .tar.gz. If they contain tokens, they should be transferred via private WebDAV or LAN, not via untrusted public networks. DSH is in Developer Preview, interfaces may change; refer to the actual output of dsh --dump-config.
Conclusion¶
dsh-conf-sync consolidates “Configuration Collection → Standard Snapshot → Multi-channel Transport → Write-back via Manifest” into a set of DSH tools, making it suitable for migration and backup in multi-device DSH environments and hybrid software configurations.
- Directory Page: https://www.skillhub.cn/plugins/6027-gthb/dsh-conf-sync
- Repository: https://github.com/6027-gthb/dsh-conf-sync