What is the difference between a command and an invitation?
Both seem to be directed to elicit an action. Are there structural differences between the two?
I think command / invitation is a dichotomy much the same as desirability / probability as recently explored by this question.
IMHO you will not find 'rules' unambiguously telling you how distinguish between modes of command, invitation, permission, expectation, etc. because speakers frequently wish to blur those distinctions.
At one extreme is simply the wish to avoid giving offense, by couching a command as an invitation. At the other is the domineering tactic of a powerful person assuming that his slightest indication in favour of some particular outcome should be taken by his underlings as a direct command to progress things in that direction.
Human interaction is the primary function of language, and the dominant / submissive juxtaposition is one of the key elements of that interaction. All of us 'bend' language in this area from time to time to suit our own agenda. And over time, all of us unconciously connive at making sure the language is easily bent in this area.
In short - if you want to identify structural differences between a command and an invitation, you'd do better to ask a psychologist rather than a grammarian or linguist.
There's an old response that country folk like to give when someone appears to be giving them an order: "Are you asking me or telling me?"
An invitation is asking you to do something. A command is telling you to do it.