implement the export command

Test Plan: integration test included

Reviewers: sean

Reviewed By: sean

Differential Revision: https://phabricator.buildinspace.com/D6