A Lua module for terminal manipulation, providing color output, cursor control, and screen clearing functions.
lua-term is a Lua library for terminal manipulation, offering functions to control cursor movement, apply colors to text, and clear the screen. It solves the problem of creating interactive and visually appealing command-line applications in Lua by providing a straightforward API for common terminal operations.
Lua developers building command-line tools, terminal-based applications, or scripts that require colored output, cursor positioning, or screen management.
Developers choose lua-term for its simplicity, native Lua integration, and comprehensive feature set for terminal control without external dependencies. It's a lightweight alternative to more complex terminal libraries, with cross-platform support including Windows (via luasystem).
Terminal operations for Lua
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a wide range of functions for cursor movement, screen clearing, and color application, covering essential CLI operations without needing multiple libraries.
Colors can be applied as functions (e.g., colors.red 'hello') or concatenated strings, offering multiple syntax options to fit different coding styles.
Works on Unix-like systems and Windows when luasystem is installed, enabling terminal manipulation across major operating systems with minimal setup.
Avoids bloat by focusing on core terminal operations with a clean, straightforward API that integrates seamlessly with Lua codebases.
The isatty function is deprecated in favor of luasystem, indicating maintenance gaps and forcing users to rely on external modules for basic TTY detection.
Requires luasystem version 0.4.0 or newer for virtual terminal processing on Windows, adding an external dependency and potential installation complexity.
Functions like cursor.goto fail in Lua >=5.2 due to 'goto' being a reserved word, necessitating workarounds like cursor['goto'] or jump, which can confuse developers.