case class Bar(id: String, name: String)
import com.github.gekomad.ittocsv.core.Header.csvHeader
import com.github.gekomad.ittocsv.parser.io.ToFile.csvToFile
implicit val csvFormat = com.github.gekomad.ittocsv.parser.IttoCSVFormat.tab.withPrintHeader(true).withRecordSeparator("\n")
import com.github.gekomad.ittocsv.core.ToCsv._
val filePath: String = "/tmp/out.csv"
val list = List(Bar("A1", "Jack"), Bar("A2", "Bob"))
val tuple = list.map(a => Tuple.fromProductTyped(a))
val a: IO[ExitCode] = csvToFile(tuple, filePath, Some(csvHeader[Bar]))