Skip to main content

Targeting

The eval-jexl command evaluates JEXL targeting expressions against the app's runtime context.

eval-jexl​

nimbus-cli --app <APP> --channel <CHANNEL> eval-jexl "<EXPRESSION>"

For example, to test a locale targeting expression:

nimbus-cli --app fenix --channel developer eval-jexl "locale == 'en-US'"

If the expression is true on the device:

{
"success": true,
"result": true
}

If the expression is false on the device:

{
"success": true,
"result": false
}

The success field indicates whether the expression was evaluated without errors. The result field contains the boolean result of the expression evaluation.

Examples​

Test app version comparisons using the versionCompare filter:

nimbus-cli --app fenix --channel release eval-jexl "app_version|versionCompare('120.0') >= 0"
nimbus-cli --app firefox_ios --channel beta eval-jexl "app_version|versionCompare('120.0') >= 0"

Test whether the app is the default browser:

nimbus-cli --app fenix --channel developer eval-jexl "is_default_browser"

Test complex logical expressions:

nimbus-cli --app fenix --channel release eval-jexl "locale == 'en-US' && app_version|versionCompare('120.0') >= 0"
nimbus-cli --app firefox_ios --channel developer eval-jexl "locale == 'en-CA'"

Options​

The --pbcopy option copies the deeplink result to your clipboard:

nimbus-cli --app fenix --channel developer eval-jexl "is_default_browser" --pbcopy