Command Line Interface
The CLI setup will generate 2 files which allows SAFE to run in your CI/CD:
- A fingerprint file that uniquely identifies the project without containing any sensitive information. Please send this file to safe@erlang-solutions.com to help generate the License for the project.
- A config.json which is generated in you repository under the
.safe
folder. Please make sure to commit it.
The CLI operates entirely offline and never transmits any data from the machine on which it runs.
Download SAFE CLI
OS | Download Link |
---|---|
MacOS | SAFE 1.2.0 (x86_64) |
🐧 Linux | SAFE 1.2.0 Linux (x86_64) |
For Mac Users: The macOS release is built for Intel processors.
- Intel-based Macs: No action required — everything will work out of the box.
- Apple Silicon Macs: You’ll need Rosetta 2 installed (most systems already have it).
safe setup
Command
You should first compile your codebase with the debug_info flag.
In case of a Rebar3 or Mix project (Elixir), this option is enabled by default.
If you have a mix project please compile it in your target environemtn (prod, dev..) and run the following command:
./safe setup --name NAME
--root ROOT
--path _build/prod/lib
--app APP1
--app APP2
For Rebar:
./safe setup --name NAME
--root ROOT
--path _build/default/lib
--app APP1
--app APP2
Usage
safe setup --name NAME --root ROOT --app APP
[--app APP ...] [--path PATH ...]
[--config-output CONFIG_OUTPUT]
[--fingerprint-output FINGERPRINT_OUTPUT]
Arguments
Required:
-
--name NAME
The name of your project. Used as an identifier in SAFE config. -
--root ROOT
The root directory of your project. Can be absolute or relative. -
--app APP
(repeatable)
At least one Erlang app name to analyze.
Use multiple--app
flags to include more apps.
Optional:
-
--path PATH
(repeatable)
Additional directories to search for apps.
Defaults to.
if not specified.
Useful for_build
,apps/
, or custom lib folders. -
--config-output CONFIG_OUTPUT
Custom path for the generatedconfig.json
.
If not set, defaults to<ROOT>/.safe/config.json
.
Relative paths are resolved from--root
. -
--fingerprint-output FINGERPRINT_OUTPUT
Where to writefingerprint.json
.
Defaults tofingerprint.json
in the current working directory.
Relative paths are resolved from the working directory.
Examples
Multiple apps, including a _build
path:
safe setup --name myproject --root ~/my_project --app foo --app bar --path _build/dev/lib
Custom config output path:
safe setup --name myproject --root ~/my_project --app foo --config-output ./myconfig.json
Absolute config path:
safe setup --name myproject --root ~/my_project --app foo --config-output /tmp/config.json
Generate fingerprint file in desktop:
safe setup --name myproject --root ~/my_project --app foo --fingerprint-output ~/Desktop/fingerprint.json
- You must provide at least one
--app
or the command will fail. --path
helps in finding your compiled application (e.g._build/dev/lib
,apps/
, etc).
Once the setup is complete and you have generated a fingerprint file, please send it via email to safe@erlang-solutions.com. In your message, specify whether you would like to proceed with a monthly or yearly license.