D2E CLI Guide
Installation
Prerequisite:
- d2e has been installed using
npm install -g d2e
Checking your version
d2e version
Note: version command is available from v0.14 onwards.
| Field | Description |
|---|---|
d2e CLI Version | The installed npm package version |
Docker Image Tag | The docker image tag that will be pulled and used |
Plugins API Version | The plugin packages version |
Expected Output
Stable release (version 0.12.0):
d2e CLI version: 0.12.0
Docker image tag: 0.12.2-beta
Plugins API version: ~0.12.0
Develop mode (version 0.12.0) (d2e -v develop version):
d2e CLI version: 0.12.0
Docker image tag: develop
Plugins API version: latest
To also confirm which binary is active:
which d2e
Upgrading d2e
Run the following to update d2e to the latest version:
npm update -g d2e
In the d2e directory, open the .env file and make these changes:
- Set
DOCKER_TAG_NAMEto the docker image tag for the new version.- Example: For version
0.12.0, setDOCKER_TAG_NAME=0.12.0-beta. The format isDOCKER_TAG_NAME=<version>-beta.
- Example: For version
- Add
PLUGINS_SEED_UPDATE=trueto trigger a plugin upgrade on the next startup.
Verify the new version is active:
d2e version
Start d2e:
d2e -e start
In the Admin Portal, navigate to Setup > Plugins and select Configure. Under Version in the Setup Plugins portal, confirm the latest version is listed.
- Expected result:

Once confirmed, remove PLUGINS_SEED_UPDATE=true from the .env file, then restart d2e:
d2e -e start
This prevents plugins from being re-downloaded on every subsequent restart.
Troubleshooting
Wrong version after update
There are two common causes:
Cause 1 — installed without the -g flag
If d2e was installed without -g (e.g. npm install d2e instead of npm install -g d2e), it will be installed locally and may shadow or conflict with any previously installed global binary.
Diagnose:
# Check if it was installed locally instead of globally
npm list d2e
If this shows d2e under a local node_modules directory, you have a local-only install.
Fix:
# Remove the local install
npm uninstall d2e
# Install globally
npm install -g d2e
# Verify
which d2e
d2e version
Cause 2 — multiple Node.js installations
d2e is installed under a different Node.js prefix than your active npm. This happens when you have multiple Node.js installations (e.g. nvm alongside Homebrew).
Diagnose:
# Which d2e binary is active?
which d2e
# What prefix does your active npm use?
npm config get prefix -g
# Is d2e installed under the active prefix?
npm list -g d2e
npm list -g @ohdsi/d2e
If which d2e points to a path that does not start with the npm config get prefix output (e.g. /opt/homebrew/bin/d2e while your active npm uses ~/.nvm/...), the wrong binary is in your PATH.
Fix — uninstall from the old location, install fresh:
# Find where the old binary lives and uninstall from that prefix
# Example: if which d2e returns /opt/homebrew/bin/d2e
npm --prefix /opt/homebrew uninstall -g d2e
# Then install under your active npm
npm install -g d2e
# Verify
which d2e
d2e version
npm list -g shows nothing but d2e still works
Your active npm and the installed d2e are under different Node.js environments. npm list -g only shows packages for the currently active npm. Use which d2e to locate the actual binary and trace back to its npm prefix.
Getting error d2e: version is not a d2e command
Your CLI version is older than v0.14, which is when the version command was introduced. Update d2e as described above.