Deepfactor provides a command line interface (dfctl) to scan and observe your projects. This CLI can be installed on Linux distributions, macOS and Windows. This document will provide the installation steps for each of the supported OSes.
Linux and macOS #
Step 1: Export Deepfactor run token
Run the following command in your terminal to export the Deepfactor run token. You can get this token by logging into the Deepfactor portal and click on the Start button on the top right corner of the screen.
export DF_RUN_TOKEN=YOUR_DEEPFACTOR_RUN_TOKEN
#
Step 2: Run the install script
Deepfactor provides install-dfctl.sh script for a single command installation. Run the following command to install the CLI.
curl https://repo.deepfactor.io/install-dfctl.sh | sh --
Note: This script creates a docker volume with the name “df-runtime” and copies over the Deepfactor runtime artifacts to this docker volume. If you happen to clean the docker volumes on the host using “docker volume prune” command, you will need to re-run this script to re-create the df-runtime docker volume before running any of your containers with Deepfactor.
After the script completes successfully, dfctl will be installed and added to the path. You can now run the following command to view usage of dfctl. Please refer to the Quickstart Guide to scan/run your projects with Deepfactor.
dfctl help
Windows #
Step 1: Download Deepfactor CLI installer using the below link
Download Deepfactor CLI installer
Step 2: Export Deepfactor Run token
Open the command line tool as administrator
Run the following command in your terminal to export the Deepfactor run token. You can get this token by logging into the Deepfactor portal and click on the Start button on the top right corner of the screen.
set YOUR_DEEPFACTOR_RUN_TOKEN
Step 3: Run the Deepfactor runtime installer
If you intend to scan / run container images with Deepfactor, please ensure you have Docker Desktop installed and running on the machine. On the terminal, change to the directory where the Deepfactor runtime installer is downloaded and run the following command
Deepfactor-runtime-install.exe
After successful installation of Deepfactor runtime, close the command line window.
Note: If you do not have Docker Desktop installed on your machine, you will see the below warning. Please click on ok and proceed. You will still be able to scan your source code with Deepfactor.
#
Step 4: Add Deepfactor to Path System Variable
After you successfully install Deepfactor runtime, add the installation path (default being C:\Program Files\Deepfactor) to the ‘path’ system variable.
#
dfctl is now installed and added to the path. Please open a new command line window (without administrator privileges) and run the following command to view usage of dfctl. Please refer to the Quickstart Guide to scan/run your projects with Deepfactor.
dfctl help