Is there something similar to Ruby's OS gem which allows me to check if I am running on Mac, Linux or Windows?
This is possible but Crystal is complied, so this can be done at compile time. The internals use flags which seem to be set here.
{% if flag?(:linux) %}
# Linux
{% elsif flag?(:darwin) %}
# Mac
{% elsif flag?(:win32) %}
# Windows
{% end %}