I found it: The pipe operator passes the data as stdin so you need to do IO.read(:stdio, :line) in main to read it.
IO.read(:stdio, :line)