CommutatorOrder[exp] orders any Commutator and AntiCommutator lexicographically.
CommutatorOrder[exp]
Commutator
AntiCommutator
Overview, Commutator, AntiCommutator.
Commutator[a, b] + Commutator[b, a] CommutatorOrder[%]
[a,b]+[b,a]
0