Add API for registering commands