create app command
use tmpdir to write the generated app