detect cli or http