Skip to content

Harmoniser CLI

Jose Lloret edited this page Jan 2, 2024 · 5 revisions

Harmoniser CLI is a command line tool that runs a Ruby process through bundle exec harmoniser. This utility accepts the following options:

bundle exec bin/harmoniser -h

harmoniser [options]
-e, --environment ENV            Set the application environment (defaults to inferred environment or 'production')
-r, --require [PATH|DIR]         Specify a file to require or the location of the Rails application
-v, --[no-]verbose               Run verbosely (set log severity to 'debug' for detailed RabbitMQ interactions)
-V, --version                    Print version and exit
-h, --help                       Show help

The environment is automatically inferred from the environment variables RAILS_ENV or RACK_ENV, otherwise it falls back to production. However you can specify your preferred value, for instance development or test.

The require option defaults to . (current directory), which means that under a Rails application, this option might be ignored. Since Ruby is not limited to Rails, you can explicitly specify the path to your Ruby file. This file will be used to load classes, including Harmoniser::Subscriber. On the other hand, if a path to a directory is passed, Harmoniser assumes that ./config/environment.rb resides within the specified folder.

When the verbose option is passed, it sets the severity of Harmoniser logs to debug, allowing you to see fine-grained details of events such as RabbitMQ interactions. By default, verbosity is disabled to prevent your environment from being flooded with unnecessary logs.

Clone this wiki locally