Extract command service to common lib