I figured out that you can pass variables from Termux to a Tasker task. This example sets Android's volume to a value specified in Termux.

Read the whole post