cli parser for build + fix for .main files