finally worked out roughly how to use action_hook and run actions from the command