Last modified on October 31, 2024
To set up the CLI that is included with the desktop app, you can use the following steps.
After installing the SDM application, click the sdm icon in the menu bar. Make sure you are logged in by checking that the SDM application is online and your available resources display.
Open the Actions menu and select Install sdm in PATH.
You can also open a terminal and type
sudo ln -s /Applications/SDM.app/Contents/Resources/sdm.darwin /usr/local/bin/sdm
. Either of these options adds the sdm command line application to your PATH.Set the
SDM_DOMAIN
environment variable to tell your CLI where to find your StrongDM service. Edit your~/.zshrc
file and addexport SDM_DOMAIN={APP_DOMAIN}
at the end, then source the file withsource ~/.zshrc
. This sets the environment variable for this session.Verify that the CLI is working properly by running
sdm --version
, which should return a version number similar to the following
$ sdm --version
sdm version 35.3.0 (99a5d1a71d4eccaf171449e33bc0826132b05165 #503)
If instead you see something like -bash: sdm: command not found
, it may mean that the path /usr/local/bin/
is not included in your system search path. Edit the shell configuration file your system is using. For macOS, that is sometimes .bash_profile
, but since macOS Catalina, zsh is the default shell. Open the shell configuration file and append export PATH=/usr/local/bin/:$PATH
to it. Then run:
$ source ~/.zshrc
$ sdm --version
sdm version 35.3.0 (99a5d1a71d4eccaf171449e33bc0826132b05165 #503)
You may also download the package directly. In this example, we will use the curl method to get the AMD64 binary (for an x86-64 architecture) and complete the download. Open a terminal and download the Linux binary:
curl -J -O -L https://app.{APP_DOMAIN}/releases/cli/linux
For an ARM-based architecture, you must use the Release endpoint with parameters to download an ARM64 binary:
curl -s 'https://app.{APP_DOMAIN}/release?software=sdm-cli&os=linux&arch=arm64'