Skip to main content
This project is an incubation project being run inside the Green Software Foundation; as such, we DON’T recommend using it in any critical use case. Incubation projects are experimental, offer no support guarantee, have minimal governance and process, and may be retired at any moment. This project may one day Graduate, in which case this disclaimer will be removed.

Impact Engine (CLI)

Introduction

if-run is a command line tool that computes Manifest files. It is the portal allowing users to interact with the Impact Framework.

The available options and their shortcuts are:

  • --manifest or -m: path to an input manifest file
  • --output or -o (optional): path to the output file where the results as saved
  • --no-output or -n (optional): suppress the output to console
  • --help or -h: prints out help instruction
  • --debug: enables IF execution logs
  • --append: allows you to rerun an already-computed manifest and append new values to the existing data.

The only required command is --manifest. Without a valid path to a manifest file, if-run has nothing to execute.

To use if-run, you must first write a manifest file. Then, you can simply pass the path to the manifest file to if-run on the command line.

if-run --manifest /my-manifest.yml
## or using aliases
if-run -m /my-manifest.yml

You can also pass a path where you would like to save the output file to. For example:

if-run --manifest ./my-manifest.yml --output ./my-results.yml
## or using aliases
if-run -m ./my-manifest.yml -o ./my-results.yml

If you omit the --output command, your results will only be displayed in the console.

For more information on the if-run commands see the CLI reference documentation.

Phased execution

To enable greener and more flexible use of IF, we separate the manifest execution into distinct phases: observe, regroup and compute. This is invisible to you when you run if-run but behind the scenes all three of these phases are being run. However, you can instruct IF to run these phases individually, to avoid recomputing parts of the manifest unnecessarily. To do this, you simply pass --observe, --regroup, and --compute flags to IF in the combination you need. For example, to run only the observe phase (to generate input data):

if-run -m <manifest> --observe

to run the compute phase on its own:

if-run -m <manifest> --compute

To run the observe and compute phases without regrouping:

if-run -m <mnaifest> --observe --compute