How to update dsh: npx auto-update, npm update -g, or git pull

Update & UpgradePublished 2026-08-28Author: DSH Plugin Hub
DeepSeek HarnessDSH pluginupdate dshupgrade dshnpm update -glatest version
Updating dsh takes three steps: check the current version, update by install type — npx always uses the latest, global installs run npm update -g, source builds git pull and rebuild — then verify. Covers backup, update commands for all three install types, post-update checks and a troubleshooting table.

Updating dsh takes three steps: check the current version, update according to your install type — npx always uses the latest, global installs run npm update -g, source builds run git pull plus a rebuild — then verify the version. This guide covers backup before updating, the update commands for all three install types, post-update verification and a troubleshooting table.

Overview: know how you installed, then pick the update command

How you update dsh depends on how you installed it: npx stays latest automatically, npm globals use the update command, and source installs re-pull and rebuild. All three routes share the same data directory (~/.dsh), so updating the binary does not affect plugins or configs (source). Three steps overall:

  1. Check: confirm the current and the latest version;
  2. Update: run the matching command for your install type;
  3. Verify: check the version number and restart to confirm.

The update path for each install type, at a glance:

Install typeUpdate commandManual?Best for
npx one-linerNone (always pulls latest)Almost neverPeople who want zero setup
npm global installnpm update -g @deepseek-ai/dshYesHeavy terminal users of dsh
Source buildgit pull + rebuildYesDevelopers who modify source

Step 1: check the current version

First find out what version you have and what the latest is, then decide whether to update. Steps:

  1. Open a terminal and run the version command that matches your install type:
bash
# Globally installed: current version
dsh --version

# npx route: current version (same command)
npx @deepseek-ai/dsh --version
  1. Query the latest version on npm:
bash
npm view @deepseek-ai/dsh version
  1. Compare the two numbers: identical means you are up to date; otherwise move to the next step (source).

Tip: forgot how you installed it? Run which dsh — a path means global install; no output means the npx route.

Take 10 seconds to back up the data directory so you can always roll back. Everything lives in ~/.dsh:

bash
# Back up the data directory (configs, sessions and plugin list)
cp -r ~/.dsh ~/.dsh.backup-$(date +%Y%m%d)

# Confirm the backup
ls ~/.dsh.backup-*

If an update fails or plugins misbehave, compare against the backup instead of losing your setup.

Step 3: update by install type

Three install types, three update routes — pick the one you originally used.

Route 1: npx (automatic)

npx re-pulls the latest version on every run, so it updates itself — no command needed. Just make sure the npm cache does not hold a stale package:

bash
# Start directly; this already runs the latest version
npx @deepseek-ai/dsh web

If the launched version still looks old, the cache is probably stale — force a refresh:

bash
# Clean the npm cache and restart
npm cache clean --force
npx @deepseek-ai/dsh web

# More thorough: delete the npx cache directory and restart
rm -rf ~/.npm/_npx
npx @deepseek-ai/dsh web

Route 2: npm global install

If you installed with npm install -g @deepseek-ai/dsh, upgrade with npm update -g — one command. Steps:

  1. Run the global update command:
bash
npm update -g @deepseek-ai/dsh
  1. Wait for npm to download and replace the old version; output with changed or a version number means success;
  2. Confirm the version with dsh --version.

If you used pnpm or yarn, use the equivalent: pnpm add -g @deepseek-ai/dsh@latest or yarn global add @deepseek-ai/dsh.

Route 3: source build

If you cloned and built from source, pull the latest code in the repo directory and rebuild. Steps:

bash
# Enter the source repo (where you originally cloned)
cd ~/dev/deepseek-harness

# Pull the latest code
git pull

# Reinstall dependencies and rebuild (same as the initial install)
npm install
# Run the build command from the repo docs, e.g. npm run build
  1. After the build finishes, restart dsh web:
bash
npx @deepseek-ai/dsh web

Conflict fallback: if git pull fails with "local changes", stash them first, then pull:

bash
git stash        # save local changes
git pull         # pull the latest
git stash pop    # restore local changes (resolve conflicts manually if any)

Step 4: verify after the update

Do not jump straight in after updating — confirm the version and functionality first. Steps:

  1. Re-run the version command and confirm the number is now the latest (compare with the npm view result);
  2. Restart dsh web and confirm the service starts and the page opens;
  3. Open Settings → Plugin Center and confirm installed plugins load normally (with DSH Plugin Hub installed, you will see the plugin list and versions);
  4. Check Settings → System Logs for any update-related errors.
dsh-plugin-hub · confirm update
DSH Plugin Hub confirm update dialog

Update failed? Troubleshooting table

Read the error type first, then fix accordingly. Common issues:

ProblemLikely causeFix
npx still launches an old versionStale npm cachenpm cache clean --force and restart, or remove ~/.npm/_npx
npm update -g fails with EACCESNo write access to global dirsudo npm update -g @deepseek-ai/dsh, or switch to the npx route
Download timeout / slow networkDefault npm registry unreachablenpm config set registry to a mirror and retry
git pull reports conflictsLocal source changesgit stash → pull → git stash pop to restore
Plugins stop working after updatePlugin incompatible with new dshReinstall the plugin from Plugin Center, or wait for the author
Web page does not open after updatePort occupied / service not restartedRestart dsh web; check whether port 127.0.0.1:3080 is in use
Version command prints nothingNot globally installedUse npx @deepseek-ai/dsh --version, or install globally first
Unsure whether the update workedOnly watched the install outputCompare dsh --version with npm view @deepseek-ai/dsh version

Still stuck? Open Settings → System Logs for the full error and handle it accordingly.

One more thing: updating dsh vs updating plugins

This guide updates the DeepSeek Harness (dsh) core; plugins are updated separately in the Plugin Center. Do not mix them up:

  • dsh core: use one of the three routes above;
  • DSH plugin: open Settings → Plugin Center → Installed, update plugins one by one, or run dsh plugin --profile web list to check versions. If a plugin update fails, reinstall it from DSH Plugin Hub.

Quick reference

In one sentence: check with dsh --version, update by install type (npx automatic / npm update -g / git pull + build), then restart and verify. Four reminders:

  1. Back up ~/.dsh before updating so you always have a way back;
  2. The npx route barely needs manual updates — only a stale cache requires a forced refresh;
  3. Global installs are one command: npm update -g @deepseek-ai/dsh;
  4. Always verify after updating: version + restart + Plugin Center.

Sources: dsh CLI README, DeepSeek Harness docs - Quickstart, dshplugin/dsh-plugin-hub

FAQ

How do I update dsh to the latest version?

Pick the command that matches how you installed it: npx always fetches the latest on every run (force a refresh with npm cache clean --force if needed); a global install upgrades with npm update -g @deepseek-ai/dsh; a source build runs git pull and rebuilds. Then confirm with dsh --version.

How do I check the current and latest dsh version?

Run dsh --version for a global install, or npx @deepseek-ai/dsh --version for the npx route. To compare with the latest, run npm view @deepseek-ai/dsh version — matching numbers mean you are up to date.

Do I need to manually update dsh installed via npx?

No. npx pulls the latest version on every run, so it self-updates. Only a stale npm cache can block new versions — run npm cache clean --force and restart npx @deepseek-ai/dsh web, or clear the ~/.npm/_npx directory.

How do I upgrade a globally installed dsh?

Run npm update -g @deepseek-ai/dsh to upgrade to the latest. If you used pnpm or yarn, use its equivalent, e.g. pnpm add -g @deepseek-ai/dsh@latest. On an EACCES permission error, consider sudo or switch to the npx route.

Will updating dsh affect my installed plugins and configs?

No. The dsh binary and the data directory (~/.dsh) are separate, so updating the binary leaves plugins and configs untouched. Update plugins themselves from Settings → Plugin Center; if a plugin update fails, reinstall it from DSH Plugin Hub.

Sources