Skip to content

What is tty? ​

tty provides small cross-platform Lua bindings for terminal inspection.

Compatibility ​

tty supports:

  • Lua 5.1
  • Lua 5.2
  • Lua 5.3
  • Lua 5.4
  • Lua 5.5
  • LuaJIT

Use Cases ​

  • Detect whether standard streams are attached to a terminal.
  • Check Lua file handles and numeric file descriptors.
  • Read terminal rows and columns for command-line output.
  • Build terminal-aware Lua tools.