write spec for thor cli and fix a bug with http command