Add export command and logic