Data2Evidence CLI Guide
Installation
Create a dedicated directory to store Data2Evidence configuration files. Note that subsequent commands need to be executed within this directory:
mkdir d2e
cd d2e
Download the CLI binary
Download the appropriate binary for your operating system and architecture from the GitHub Releases page.
Linux
x64
VERSION="0.19.0-beta"
curl -L https://github.com/OHDSI/Data2Evidence/releases/download/v$VERSION/data2evidence-cli-$VERSION-linux-x64 -o d2e
chmod +x d2e
arm64
VERSION="0.19.0-beta"
curl -L https://github.com/OHDSI/Data2Evidence/releases/download/v$VERSION/data2evidence-cli-$VERSION-linux-arm64 -o d2e
chmod +x d2e
macOS
x64
VERSION="0.19.0-beta"
curl -L https://github.com/OHDSI/Data2Evidence/releases/download/v$VERSION/data2evidence-cli-$VERSION-darwin-x64 -o d2e
chmod +x d2e
arm64
VERSION="0.19.0-beta"
curl -L https://github.com/OHDSI/Data2Evidence/releases/download/v$VERSION/data2evidence-cli-$VERSION-darwin-arm64 -o d2e
chmod +x d2e
Windows
x64
$VERSION = "0.19.0-beta"
curl.exe -L --progress-bar -o d2e.exe "https://github.com/OHDSI/Data2Evidence/releases/download/v$VERSION/data2evidence-cli-$VERSION-windows-x64.exe"
Checking the Installed Version
Run the following command to display version information:
./d2e version
Note: The
versioncommand is available from v0.14 onwards.
The output includes the following fields:
| Field | Description |
|---|---|
d2e CLI Version | The installed CLI version |
Docker Image Tag | The Docker image tag that will be pulled and used |
Plugins API Version | The version of the plugin packages |
Example 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
Example Output - Develop mode (version 0.12.0) (./d2e -v develop version):
d2e CLI version: 0.12.0
Docker image tag: develop # modify the env variable in the `.env` file
Plugins API version: latest
Upgrading Data2Evidence
See Upgrading Data2Evidence for the standard upgrade steps and the steps specific to each version.
Identity provider migration
From v0.19, installations upgraded from Logto run in logto-federated mode, and trex migrates the Logto users on every start. Use migrate-idp-roles to check or repeat that migration. See Identity provider for details.
Show the outcome of the last migration run:
./d2e migrate-idp-roles --report
Running ./d2e migrate-idp-roles without an option does the same.
Run the migration again now:
./d2e migrate-idp-roles --run
--run restarts trex, which signs out every active user. It only works when D2E_IDP_MODE=logto-federated is set in the env file.
Removed options
The -i / --dicom, -j / --jupyter and -m / --mlflow options were removed in v0.19, together with the DICOM server, Jupyter and MLflow services.
Troubleshooting
illegal hardware instruction when running ./d2e
Cause: The binary downloaded does not match your system architecture.
Resolution: Check your architecture and re-download the correct binary.
uname -m
| Output | Binary to download |
|---|---|
arm64 | arm64 |
x86_64 | x64 |
permission denied when running ./d2e
Cause: The binary is missing execute permissions.
Resolution: Grant execute permissions:
chmod +x d2e
./d2e: command not found
Cause: The command was run outside the d2e directory.
Resolution: Navigate to the directory where the binary was downloaded:
cd d2e
./d2e version