New command-line interface, fixed #374.