Linenoise is a line editing library that provides a minimal, zero-configuration alternative to readline and libedit.
The problem it solves is the bloat introduced by linking small command-line utilities to large line editing libraries. Readline and libedit each contain tens of thousands of lines of code, making them impractical dependencies for simple tools. Linenoise achieves comparable functionality in roughly 1600 lines by relying on a basic subset of VT100 escape sequences that work across nearly all modern terminals. The library implements single and multi-line editing with standard key bindings, history handling, completion, inline hints, UTF-8 support including emoji, and bracketed paste support. It also offers a multiplexing mode for handling asynchronous output without disrupting the prompt.
Developers should choose this tool when building command-line utilities that need line editing support without the overhead of larger dependencies. It suits smaller programs that would otherwise skip line editing entirely, and larger programs that want a fallback when readline or libedit are unavailable. The library is BSD-licensed, making it suitable for both free and commercial software. Its minimal footprint and zero-configuration design make it trivial to embed directly into projects, as demonstrated by its use in Redis, MongoDB, and Android.
The project maintains broad terminal compatibility, having been tested across Linux consoles and terminal emulators, macOS, OpenBSD, FreeBSD, IBM AIX, and even ANSI.SYS environments. Development activity is sparse, with infrequent commits and minimal recent changes to the core codebase. The maintainer responds selectively to issues and pull requests rather than pursuing active feature expansion.