finds.dev← search

// the find

antirez/linenoise

★ 4,306 · C · BSD-2-Clause · updated May 2026

A small self-contained alternative to readline and libedit

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.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →