Implementation of Chain models on the command line