How to Trigger Actions from Terminal Shell

Sorry if this is not the right Category for this question, but I couldn’t find a better one.

What is the best way to trigger an automation action from the core_ssh/ingress Terminal shell? The scenario is that I am working on some automation development, also maybe involving shell scripts, and I want to trigger the action of, say, a switch in another room being pressed, or a person leaving the house. Is there a way to fake-trigger such things from the Terminal shell? If not, what is the right way to do this?

OK. I’ve found out how to access the REST API with curl now. I guess this will do. Seems a little overkill for a local shell user, but if there’s no other way …