Replace deprecated action api with commands api