dsh-plugin-profile-sync: Syncing DSH Plugins and Settings Across Multiple Machines

Introduction

When using DeepSeek Harness (DSH) across multiple machines, you end up reinstalling plugins and reconfiguring settings repeatedly. Manual alignment is not only time-consuming but also prone to missed configurations. DSH itself does not provide a cross-device state synchronization mechanism, meaning plugin manifests and allowlist settings must be configured one by one.

The dsh-plugin-profile-sync plugin syncs your “installed DSH plugins” and “allowlist plugin settings” via a private repository or cloud storage directory. A new machine only needs to pull once to align its environment and get back to work.

Plugin Overview

The plugin was written by maintainer kasshuang and is categorized under admin-security. It is not a general-purpose configuration tool but a dedicated configuration synchronization solution for the DSH plugin ecosystem.

Core Features

The plugin provides two storage backends and two core capabilities:

  • Backends: Private GitHub repository (recommended), local/cloud storage folder (OneDrive, iCloud, etc.)
  • Synced content:
  • Name, version, and enabled status of installed DSH plugins
  • JSON values of allowlist setting namespaces
  • Non-synced content:
  • Credentials (tokens, passwords, etc.)
  • Chat history
  • Any plugin-private data

Installation & Activation

Enter dsh-plugin-profile-sync in the DSH UI under Settings → Plugins → Install, or run the following command in the terminal:

dsh plugin add dsh-plugin-profile-sync

After installation, navigate to Settings → Cloud Sync to configure it.

The GitHub method requires only a one-time authorization; no further configuration is needed afterward.

  1. Open Settings → Cloud Sync, select Private GitHub Repository as the backend, and click Connect to GitHub.
  2. A dialog appears with an 8-character code and a link. Open the link, enter the code, and click Authorize.
  3. Once authorization is complete, the plugin automatically:
    - Creates or reuses a private repository <your-username>/dsh-profile-sync-data
    - Saves the token to DSH’s credentials service (~/.dsh/.credentials.yaml)
    - Populates the repository URL, branch, and file path

Afterward, the settings page only requires two buttons: Push to Cloud and Pull from Cloud.

Using a Cloud Storage Folder

Select Local/Cloud Storage Folder as the backend and enter a directory that is synced by your cloud storage (e.g., C:\Users\you\OneDrive\dsh). No account is required; multiple machines sync the same dsh-profile-sync.json via the cloud storage. Conflicts are resolved in favor of the file with the more recent modification time.

Restoring from the Cloud

  1. Click Pull from Cloud. The plugin will list plugins that exist in the cloud but not locally, along with setting differences.
  2. Check the items you want to restore and click Apply Selected. This action only installs or overwrites the checked items and will not delete plugins that are unique to the local machine.

State & Configuration

The state file is located at:

%DSH_HOME%\profile-sync\state.json

The default path is C:\Users\<you>\.dsh\profile-sync\state.json.

Field Description
adapter repo or folder
repo GitHub repository address, format owner/repo
branch / docPath Defaults: main / dsh-profile-sync.json
folder Absolute path to the cloud storage directory
autoSync Reserved field
lastPushAt / lastPullAt / lastError Timestamp and error info of the most recent operation

The allowlist settings directory is located at:

%DSH_HOME%\plugin-settings\<namespace>.json

Privacy & Security

  • Tokens are managed via DSH’s credentials service and are never written into the sync document.
  • The sync document contains only the plugin manifest and allowlist namespace setting values.
  • The device authorization code is held in memory for only one polling cycle and is discarded immediately upon authorization completion or cancellation.
  • The plugin’s own HTTP routes (/plugins/profile-sync/*) first pass through DSH’s request gate ctx.connection.requestRejection:
  • Host guard
  • Session cookie validation when logged in via browser
  • If validation fails, a 401/403 is returned immediately without executing route logic
  • Any arbitrary web page in the browser cannot leverage your cookies to read or write the sync state.

For Plugin Authors: Registering an OAuth App

The plugin uses the OAuth Device Flow and requires a one-time OAuth App registration.

  1. In GitHub, navigate to Settings → Developer settings → OAuth Apps → New OAuth App.
  2. Fill in the details:
    - Application name: DSH Profile Sync
    - Homepage URL: Your repository URL
    - Authorization callback URL: http://127.0.0.1:1/callback (not used by Device Flow; only required to pass validation)
  3. After creation, go to the app’s settings and check Enable Device Flow.
  4. Copy the Client ID and place it in the DEFAULT_CLIENT_ID constant at the top of index.js. During development, you can also override it via the environment variable DSH_PROFILE_SYNC_GITHUB_CLIENT_ID.

The Client ID is a public value and can be committed with the package. Do not put the Client Secret into the code. The required scope is only repo (creating private repos + reading/writing content).

Use Cases & Notes

This plugin is suitable for developers who need to share plugins and allowlist configurations across multiple machines, such as for team collaboration, dev/test environment alignment, and similar scenarios.

Notes:
- The plugin runs with the permissions of the current DSH process. Review the source code and license before installation.
- Synced content is limited to the plugin manifest and allowlist settings; credentials, chat history, and similar data are never synced.

Summary

dsh-plugin-profile-sync syncs DSH’s plugin manifest and allowlist settings across multiple machines via a private repository or cloud storage directory, reducing repetitive configuration work. Maintained by kasshuang, categorized under admin-security.

  • Directory page: https://www.skillhub.cn/plugins/kasshuang/dsh-plugin-profile-sync
  • GitHub: https://github.com/kasshuang/dsh-plugin-profile-sync
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye