A minimal POSIX shell.

mrsh provides a binary suitable as /bin/sh and a library for building new shells.

mrsh shell

The mrsh shell is strictly POSIX compliant, encouraging users to write portable shell scripts. Optional readline/libedit support is included to provide a comfortable interactive shell.


imrsh (interactive mrsh) is a related project which provides a more comprehensive interactive shell based on mrsh.


libmrsh provides you the pieces necessary to build your own POSIX shell frontends. The standalone parser can be used to obtain a shell AST, which can be fed into our task runner to execute the script. It is also suitable for building linters, syntax highlighters, etc. The code is simple & portable, with no external dependencies outside of POSIX C99.


Still to come...


The upstream development repository may be found on

Contribute by submitting GitHub pull requests or sending patches to the mailing list.