we should reuse command line building stuff here.