finds.dev

antirez/linenoise

A small self-contained alternative to readline and libedit

View on GitHub

★ 4,306CBSD-2-Clauseupdated May 2026

// the take

Linenoise is a single-file readline replacement in ~1600 lines of C. It handles line editing, history, completion, hints, and async/multiplexing mode. The target is anyone embedding a REPL or CLI in a C program who doesn't want to pull in readline's 30k lines or deal with its GPL license.

The async API (linenoiseEditStart/Feed/Stop) is genuinely useful — hiding and restoring the prompt around async output solves a real problem that most minimal readline clones ignore. The test harness forks a VT100 emulator rather than mocking internals, so it catches actual rendering bugs. BSD license means it drops into commercial projects without legal gymnastics. UTF-8 and emoji grapheme cluster support is further than you'd expect from something this small.

No Windows support in the main repo — the README points you at a C++ fork (linenoise-ng) if you need it, which is a meaningful gap for cross-platform tools. The fixed LINENOISE_MAX_LINE cap applies to bracketed paste in async mode, so large pastes require the caller to pre-size the buffer correctly or silently truncate. History search (Ctrl-R incremental reverse search) is absent — you get up/down navigation only, which is noticeably worse than readline for users who have muscle memory around it. The project is essentially frozen by design, which is fine for stability but means any missing feature is your problem to fork.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
4,306
Forks
738
Language
C
License
BSD-2-Clause
Last commit
2 May 2026

// nearby

If linenoise isn't quite it.

All repos →