Add publish command and add file option for diff