Skip to content

Command Line Interface Usage

After installing the AMNES python package, the AMNES main command should be available in your PATH. You can now simply run the command amnes to get an overview of all available options and subcommands:

Options:
  --license     Show license and exit.
  --copyright   Show copyright notice and exit.
  --thirdparty  Show third-party libraries and exit.
  --version     Show the version and exit.
  --help        Show this message and exit.

Commands:
  controller  Starting Controller Component for AMNES.
  ctl         Running an AMNES Control Command.
  worker      Starting Worker Component for AMNES.

At the moment, there are the following three subcommands available: controller, worker and ctl. For each of these components, the default base directory is ~/.amnes. You can specify another base directory by setting the environment variable AMNES_BASE or passing the alternative directory via command line parameter:

amnes [subcommand] --base /path/to/base/dir [options and arguments]

Controller

You can start the controller in foreground mode by simply executing amnes controller or amnes-controller. The AMNES Controller needs a configuration file, which is stored as controller.yml inside the AMNES base directory by default. If the configuration file is located elsewhere on your system, you can specify the path to the config file explicitly:

amnes controller --config /path/to/custom/config.yml

Worker

You can start the worker in foreground mode by simply executing amnes worker or amnes-worker. The AMNES Worker needs a configuration file, which is stored as worker.yml inside the AMNES base directory by default. If the configuration file is located elsewhere on your system, you can specify the path to the config file explicitly:

amnes worker --config /path/to/custom/config.yml

CTL

The amnes ctl or amnes-ctl command can be used to control AMNES components. The following commands are available:

Options:
  --base TEXT    AMNES base directory.
  --config TEXT  Control command configuration file.
  --help         Show this message and exit.

Commands:
  import    Import AMNES Project into AMNES Controller.
  kill      Kill linked AMNES Controller.
  shutdown  Shutdown linked AMNES Controller.
  start     Start AMNES Project execution on AMNES Controller.
  stop      Stop AMNES Project execution on AMNES Controller.
By default, the AMNES control command invocation will use the ctl.yml configuration inside the base directory. If the config parameter is specified, its value will be used as the config file path, ignoring the base directory.

You can use this command to import an AMNES project and create all experiment sequences:

amnes ctl import project.yml
The following command can be used to start the project:

amnes ctl start project-slug