tinman

Package Version Hex Docs

I shall take the heart. For brains do not make one happy, and happiness is the best thing in the world.

Tinman allows you to query information about the operating system, runtime and environment. It’s useful for working around platform quirks or setting up global resource limits at startup. It’s not suitable as a monitoring library.

Installation

gleam add tinman@1

Example

import gleam/io
import gleam/string
import tinman

pub fn main() {
  // Query system information
  let assert Ok(os) = tinman.operating_system()
  let assert Ok(arch) = tinman.cpu_architecture()
  
  io.println("Running on " <> string.inspect(os) <> " " <> string.inspect(arch))
  io.println("Online: " <> string.inspect(tinman.is_online()))
  io.println("In CI: " <> string.inspect(tinman.is_ci()))
}

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

Search Document