Add team management commands

r?

N.B.: needs my API changes to be merged