Add cmd() method.