rl and rs are two small command-line programs written in C.
rl
rs
The source code is available under the BSD License: