Linenoise
A small self-contained alternative to readline and libedit
...The library is zero-config, meaning you just include the source file(s) and use it, without heavy dependencies or external configuration. It supports basic editing features: moving the cursor, inserting characters, handling history, tab-completion, and hints, plus a multiplexing mode where the prompt can be hidden/restored when asynchronous output appears. It works on most VT100/ANSI-compatible terminals, and is portable across Unix-like systems. The code is compact (around 850 lines excluding comments) and designed for minimal footprint embedding into other projects (like CLI tools) that need line editing but don’t want the complexity of linking large libraries.