Package Version Hex Docs

stdin

stdin provides a synchronous iterator for consuming stdin. It supports all the non-browser targets, Erlang, Node, Deno, and Bun.

gleam add stdin
import gleam/io
import gleam/iterator
import stdin.{stdin}

pub fn main() {
  stdin()
  |> iterator.to_list
  |> io.debug
}

Further documentation can be found at https://hexdocs.pm/stdin.

Development

gleam run   # Run the project
Search Document