Support --headless when running cfg apply