Inside the command, you can check to see how the command was executed by looking at the {CMDACTION} token.
{CMDACTION} - The method by which the current command was executed. The possible results are, 'Spoken', 'Keyboard', 'Joystick', 'Mouse', 'Profile', 'External', 'Unrecognized' and 'Other'. The value will be, 'Spoken' if the command was executed by a spoken phrase, 'Keyboard' if the command was executed using a keyboard shortcut, 'Joystick' if executed by a joystick button, 'Mouse' if executed by a mouse button click and 'Profile' if the command was executed on profile load (from the command indicated in the profile options screen). The value will be 'External' if the command is executed from a command line. 'Unrecognized' will be the value if the command was executed using the unrecognized phrase catch-all command in the profile options screen. 'Other' is reserved.
I believe, 'External' is also the type if you right-click on the command and select, 'execute'. Need to check/update the docs.