'dsh' is not recognized as a command: fix PATH & install

TroubleshootingPublished 2026-08-25Author: DSH Plugin Hub
DeepSeek HarnessDSH plugincommand not foundPATHWindows
Fix 'dsh' is not recognized: check Node and the global install, add npm's bin dir to PATH (npm config get prefix), or just run npx @deepseek-ai/dsh web.

'dsh' is not recognized as an internal or external command is the most common dsh error on Windows - it means the dsh executable is missing from PATH. Locate it in three steps: confirm the environment with node -v, check the global install with where dsh, then find the npm bin directory with npm config get prefix and add it to PATH. If you would rather skip PATH entirely, npx @deepseek-ai/dsh web runs without installing anything (source).

Overview: locate the problem in three steps

"Not recognized as an internal or external command" has exactly two possible causes: dsh is not installed, or it is installed but its directory is not on PATH. Diagnose in three steps:

  1. Check the Node environment: node -v, npm -v - without Node, nothing else matters;
  2. Check the global install: where dsh - output means the command is visible; if empty, check npm ls -g @deepseek-ai/dsh;
  3. Fix PATH: run npm config get prefix, add the global directory to PATH, and reopen the terminal.

Each step is detailed below with commands.

Step 1: common causes - not installed, not global, or missing PATH

Before touching PATH, rule out the four possibilities below - most people are stuck on "installed but not on PATH". Run these in order:

bash
# 1. Is Node installed?
node -v
npm -v

# 2. Is dsh installed globally? (check the global package list)
npm ls -g @deepseek-ai/dsh

# 3. Can the system find dsh? (printing a path means it is fine)
where dsh

Match your output:

SymptomConclusionFix
node -v errorsNode not installedInstall Node.js LTS first
npm ls -g says emptydsh not installed globallyRun npm install -g @deepseek-ai/dsh
npm ls -g shows it, where dsh emptyInstalled but PATH missingGo to step 2
where dsh works but still errorsTerminal cached old PATHOpen a new terminal

The third row is the most common: the package is there, the system just cannot find it - that is a PATH problem.

Step 2: fix PATH on Windows - npm config get prefix + setx

The fix is to add the npm global bin directory to PATH: find the directory, add it, then open a new terminal. Three commands:

bash
# 1. Find the npm global directory (commonly C:\Users\<user>\AppData\Roaming\npm)
npm config get prefix

# 2. Append the npm global directory to the user PATH (takes effect in a new terminal)
setx PATH "%PATH%;%APPDATA%\npm"

# 3. Open a new terminal window and verify
where dsh
dsh --version

Two traps to remember:

  1. setx truncates PATH at 1024 characters: if your PATH is already long, setx will drop entries. The safer route is Settings > Environment Variables > user PATH > Edit > New, and paste the directory from step 1;
  2. A new terminal is mandatory: setx only writes the registry; already-open windows will not pick it up. Reopen CMD/PowerShell before verifying.

To confirm the PATH is complete, where dsh should print something like C:\Users\<user>\AppData\Roaming\npm\dsh.

Step 3: skip PATH entirely - npx one-liners

If you only need dsh occasionally or would rather not touch PATH, npx @deepseek-ai/dsh web bypasses global install entirely: npx pulls the latest package on the fly without installing anything to your system, so the PATH problem never arises. Usage:

bash
# Start the Web UI without installing (first run downloads the package)
npx @deepseek-ai/dsh web

Trade-offs of this route:

  1. Pros: zero configuration, always the latest release, the "command not found" error disappears;
  2. Cons: every launch hits the network and the prefix is long - for daily use a global install is more comfortable;
  3. More: the full global-vs-npx comparison is in npm install -g @deepseek-ai/dsh: global install vs npx.

Once the CLI works: add plugins with DSH Plugin Hub

With the command line working, the most convenient way to install plugins is DSH Plugin Hub under Settings > Plugin Center - click buttons instead of memorizing package names or touching PATH. Install the Hub itself:

bash
dsh plugin --profile web add dsh-plugin

Restart dsh web and open Settings > Plugin Center: browse 4,600+ community plugins by category, click a card to install with live progress. When the CLI does report errors, the Hub's result dialogs give you a visual fallback instead of staring at a terminal.

dsh-plugin-hub · Plugin Center
DSH Plugin Hub marketplace home

Notes

One sentence: confirm it is installed first, then fix PATH, and only then consider alternatives. Three reminders:

  1. Not just Windows: on macOS/Linux the error reads command not found - use which dsh and add the npm bin directory (the bin dir under npm config get prefix) to your shell's PATH;
  2. Reopen the terminal after changes: PATH is read at shell startup; without a new window, the change is invisible;
  3. npx also fails: npm itself is broken - check npm -v first, or see DSH plugin download failures and slow downloads for registry and network issues.

Sources: DeepSeek Harness docs - Quickstart, dsh CLI README, npm docs

FAQ

What does 'dsh' is not recognized as an internal or external command mean?

It means Windows cannot find the dsh executable on PATH. There are only two common causes: dsh is not installed, or it is installed but its bin directory is missing from PATH. Follow the three diagnostic steps in this article to locate which one applies.

dsh is installed but still not found - why?

The npm global bin directory is probably not on PATH. Run npm config get prefix to find it (commonly C:\Users\<user>\AppData\Roaming\npm on Windows), verify with where dsh, add that directory to PATH, and open a new terminal.

How do I add the npm global directory to PATH on Windows?

Run npm config get prefix in cmd, then setx PATH "%PATH%;%APPDATA%\npm". If your PATH is very long, setx may truncate at 1024 characters - use Settings > Environment Variables instead. Reopen the terminal and verify with where dsh.

Is there an alternative to configuring PATH?

Yes - run npx @deepseek-ai/dsh web. npx fetches the latest package on the fly without installing anything to your system, so there is no PATH problem at all. Great for a quick try or just launching the Web UI.

How do I check whether dsh is actually installed on Windows?

Three checks: node -v and npm -v for the Node environment; where dsh for the command path (output means it is installed and visible); npm ls -g @deepseek-ai/dsh for the global package list. If where dsh is empty but npm ls -g shows it, that is a PATH issue.

Sources