zsh: command not found: dsh
The CLI is installed. What is missing is either the directory npm puts binaries in, or a shell session still holding the PATH it started with.
This is a PATH problem, not a failed install: the package is on disk, the shell just cannot find its entry point.
The error, verbatim
The shell reports the command as unknown, while the install reported success. Both statements are true at once — they describe different directories.
Confirm the binary exists
Print the global prefix, then look for the entry point inside its bin directory.
npm prefix -g
ls "$(npm prefix -g)/bin" | grep dsh
# Windows PowerShell
npm prefix -g
dir "$(npm prefix -g)" | findstr dshCase 1 — the bin directory is not on PATH
What you see: the file is listed above, and the shell still cannot run it.
echo $PATH | tr ":" "\n" | grep -n "$(npm prefix -g)/bin"Fix it for zsh
Append the global bin directory in the file your shell actually reads, then reload it in the current session.
echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
dsh --versionCase 2 — a Node version manager moved the prefix
What you see: it worked yesterday and does not today. nvm, fnm and volta each own a separate global prefix, so switching Node switches where binaries live.
Compare the prefix under two versions before adding anything to PATH:
node -v
npm prefix -g
nvm use 24
npm prefix -gCase 3 — it was installed locally, not globally
What you see: the package sits in a project node_modules, and nothing was written to the global bin.
npx dsh --version
npm install -g @deepseek-ai/dshThen confirm
The version printed here should match the tag you installed.
dsh --version
which dshCommon questions
Do I need to reinstall?
Not if the binary appears in the bin listing. Reinstalling writes the same file to the same place; the PATH is what has to change.
Why does it work in one terminal and not another?
A shell inherits the PATH it started with. A terminal opened before the install, or before an nvm switch, keeps the old one until you open a new one or reload the file.
Does this also break dsh plugin?
Yes. The same binary serves both, so if dsh is not on PATH the plugin subcommand is not reachable either.