Introduction¶
When developing agents or workflows in DSH (DeepSeek Harness), the environment is often scattered across the profile’s plugin manifest, individual plugin versions, configuration overrides in cordis.patch.yml, plugin-managed data directories, and global workspace settings. Manual copying during computer switches or reinstallations easily leads to missing items; missing even one item can cause DSH on the new machine to fail to start or behave inconsistently with the old environment.
The community plugin dsh-config-sync (Maintainer: huihui0927, Category: Workflow) consolidates the above into a portable .zip archive, supports preview-before-restore batch operations, and automatically creates a restore point before applying changes. This article covers its positioning, capabilities, and installation usage; facts are subject to the GitHub Repository and SkillHub Catalog Page.
What is this¶
dsh-config-sync is a backup and cross-machine sync tool for DSH: it packages all plugin-related configurations and plugin data (excluding credentials and sessions by default) into a .zip with one click. On a new computer, you can verify, preview, and then choose whether to write. The plugin registers 5 tools to the agent and provides a standalone CLI with zero runtime dependencies, allowing operation even when DSH cannot start. The current package version is 1.0.0, license MIT, requiring Node >= 20.
The DSH ecosystem emphasizes “Everything is a plugin”; community directories like SkillHub are independent of DeepSeek / High-Flyer, and this plugin is not an official built-in capability.
Core Features¶
Backup and Restore Scope¶
| Decision | Description |
|---|---|
Do not back up node_modules |
Large size and reproducible via package.json and pnpm-lock.yaml; archive records versions, and dependencies are reinstalled according to the manifest after restore. |
| Do not back up runtime / Electron / logs / cache | These are locally rebuildable contents; avoiding copying old machine runtimes prevents corrupting the new environment. |
| Credentials excluded by default | .credentials.yaml, workbuddy-vault/, etc., are not included in the archive by default; AES-256-GCM encrypted export is available with a password when needed. |
| Restore defaults to preview only | Explicit apply: true (or --apply in CLI) is required to actually write. |
| Automatic restore point before application | Snapshots the current profile configuration to a timestamped directory before writing, facilitating rollback. |
| Extra plugins on target machine | Execution is refused by default to avoid accidental deletion of local-only plugin configurations; overwritePlugins: true is required. |
Backup Categories¶
| Category | Default | Content |
|---|---|---|
profile-config |
Included | package.json, pnpm-lock.yaml, cordis.yml, cordis.patch.yml, etc. |
home-config |
Included | storages/workspace.json, telemetry/, and other global settings. |
plugin-state |
Included | State directories for each plugin under DSH_HOME. |
credentials |
Not included | Login credentials, requires password, AES-256-GCM encryption. |
sessions |
Not included | Session records, large size. |
Agent Tools (5 total)¶
Once installed, these can be driven via natural language in DSH sessions or by referencing the tool names directly:
| Tool | Function |
|---|---|
dsh_config_status |
View installed plugins, number of config files, and what the backup will include. |
backup_dsh_config |
Generate backup archive (supports dryRun preview). |
restore_dsh_config |
Preview or apply restore. |
verify_dsh_config |
Verify archive integrity (checks sha256 per member). |
list_dsh_backups |
List existing archives. |
Example commands (from README): “See what plugins and settings are on my computer right now”, “Back up plugins and settings”, “Restore this backup to the new computer”.
Standalone CLI¶
The entry point is bin/dsh-config-sync.mjs. Both ZIP and encryption are implemented using Node’s built-in modules with no additional npm dependencies, making it suitable for use on a machine “where you are currently fixing the environment.”
Installation and Activation¶
Installation example from the README (paths need to be adjusted according to your local DSH and plugin directories):
D:\Dsh\resources\runtime\cli\bin\dsh.cmd plugin --profile desktop add D:\Dsh\Sync\dsh-config-sync
After installation, restart DSH so the agent registers the above tools. This command writes to the profile directory (e.g., C:\Users\<User>\.dsh\profiles\desktop); EPERM errors may occur in restricted sandboxes, requiring appropriate file system permissions.
It is recommended to review the repository source code and MIT license before installing; the plugin runs with the current DSH process privileges. Archive files may be copied to USB drives or cloud drives; decide whether to include the encrypted credentials category based on your security policy.
Typical Usage¶
In DSH Session (Recommended)¶
After installation and restart, trigger dsh_config_status, backup_dsh_config, restore_dsh_config, etc., via conversation without needing to memorize all parameters.
Command Line (When DSH won’t start)¶
$cli = "D:\Dsh\resources\runtime\cli\bin\dsh.cmd" # Only for installing plugins
node D:\Dsh\Sync\dsh-config-sync\bin\dsh-config-sync.mjs <command>
Check status:
node bin\dsh-config-sync.mjs status
Default backup (excluding credentials and sessions):
node bin\dsh-config-sync.mjs backup --output D:\backup\dsh.zip
Backup with encrypted login credentials included (requires specifying category and password):
node bin\dsh-config-sync.mjs backup --output D:\backup\dsh.zip `
--categories profile-config,home-config,plugin-state,credentials --password YourPassword
Verify archive:
node bin\dsh-config-sync.mjs verify --input D:\backup\dsh.zip
Restore: Default is preview only, confirm then --apply:
node bin\dsh-config-sync.mjs restore --input D:\backup\dsh.zip --profile desktop
node bin\dsh-config-sync.mjs restore --input D:\backup\dsh.zip --profile desktop --apply
Switching Computers Flow (README Standard)¶
Old Computer: Generate archive.
node bin\dsh-config-sync.mjs backup --output D:\dsh-backup.zip
New Computer (Install DSH main body first):
- Verify transport integrity:
verify --input D:\dsh-backup.zip - Preview plugin additions/removals and files to be written:
restore(without--apply) - Apply after confirmation:
restore ... --apply - Install plugins one by one using
dsh.cmd plugin --profile desktop add <plugin@version>based on the list output in step 3 (Archive does not containnode_modules) - Restart DSH
For detailed step-by-step instructions, rollback, and FAQs, refer to the repository’s Usage Guide.md.
Security and Suitability Notes¶
- Plain text credentials will not enter the archive; if a member name matches the credential pattern, it will error out and abort rather than silently writing.
workbuddy-vault/will be automatically excluded with a prompt if it appears inplugin-state.- Encryption uses scrypt (N=2¹⁵) for key derivation and AES-256-GCM; incorrect passwords or archive tampering will result in decryption failure. If the password is forgotten, credentials cannot be recovered from the archive, and re-login on the new computer is required.
Suitable for: Developers who need to migrate DSH plugins and configurations between multiple machines, or who wish to periodically create verifiable and rollback-able configuration snapshots. Not suitable for treating archives as full backups of session history (sessions are excluded by default and are large in size).
Conclusion¶
dsh-config-sync consolidates scattered DSH plugins and settings into a single .zip, using preview, verification, restore points, and optional encryption to reduce risks during machine switching and misoperation. Directory and documentation: