Creating Custom CLI Tasks
The predefined tasks are actually the Workflow Designer schemas stored in the $UGENE/data/cmdline directory.
Follow the instructions in the Workflow Designer Manual on how to create a schema and run it from the command line.
You may also find the following video tutorial useful, which is devoted to creating a custom console command: