A pure Go command line editor with history and cross-platform support, inspired by linenoise.
Liner is a command line editor library written in pure Go that provides line editing capabilities with history for terminal applications. It enables developers to add rich command-line interfaces to their Go applications with consistent behavior across different platforms, including Unix-like systems and Windows.
Go developers building cross-platform command-line applications that require interactive user input with line editing and history features, such as REPLs, shells, or configuration tools.
Developers choose Liner for its pure Go implementation without cgo, ensuring easy cross-compilation and consistent cross-platform behavior by intentionally omitting platform-specific features, unlike alternatives that may vary by OS.
Pure Go line editor with history, inspired by linenoise
Liner intentionally omits platform-specific features like Ctrl-Z handling to ensure identical behavior on Unix and Windows, as stated in its philosophy.
Written without cgo, it enables easy cross-compilation and avoids external dependencies, simplifying deployment across different operating systems.
Supports a comprehensive set of VT100-compatible keystrokes for cursor movement, word navigation, and text manipulation, detailed in the README's table.
Includes history with search, navigation, and customizable tab completion via SetCompleter, enhancing interactivity for CLI applications.
For consistency, it ignores useful native shortcuts like Ctrl-Z on Unix, which might frustrate users expecting familiar terminal behavior.
Focused solely on line editing without built-in support for multi-line input, syntax highlighting, or advanced terminal UI elements.
Developers must handle history file reading and writing manually, as shown in the example code, adding boilerplate and complexity.
A Commander for modern Go CLI interactions
A declarative, simple, fast, and fun package for building command line tools in Go
Powerful scripting language & versatile interactive shell
CONTRIBUTIONS ONLY: A Go (golang) command line and flag parser
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.