“Iftaḥi l-bāb” can function as a command when uttered by an authority. The same imperative form may express a request between equals (iltimās), or supplication (duʿāʾ) when directed by a servant to God.
Morphology alone does not settle the rhetoric. Relative standing, tone, situation, and intended action determine the force of the imperative. The same surface structure can perform different speech acts.