command.py: separated build-config creation code from `build` cmd handler