Skip to main content
Version: 1.2.0

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.
info

The CLI operates entirely offline and never transmits any data from the machine on which it runs.

Download SAFE CLI

OSDownload Link
 MacOSSAFE 1.2.0 (x86_64)
🐧 LinuxSAFE 1.2.0 Linux (x86_64)
info

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

info

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 generated config.json.
    If not set, defaults to <ROOT>/.safe/config.json.
    Relative paths are resolved from --root.

  • --fingerprint-output FINGERPRINT_OUTPUT
    Where to write fingerprint.json.
    Defaults to fingerprint.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

tip
  • 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).
info

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.