chennelBox command has 4 queries depending on wich section of chanelbox your interested in.
But i guess your after
channelBox -q -selectedMainAttributes mainChannelBox
read the reference for teh 4 others and the nifty execute wich is even better most times.