Alternative Shells - oils-for-unix/oils GitHub Wiki

This is a big list of alternative shells! (As opposed to the common POSIX-ish shells like bash and zsh)

Some of them are more like languages, and some are more interactive. Some are active and some are dormant. They are written in many different languages.

This wiki page is EDITABLE. If you know of another significant or interesting shell, please add a link. If it's a DSL embedded in another language (like Python), add it to Internal DSLs for Shell.

Related: ExternalResources / Alternative Regex Syntax

Active Alternative Shell Languages

Oils -- Both OSH and YSH. Our upgrade path from bash to a better language and runtime. Written in high-level, Python-based DSLs. FAQ: Why Create a New Unix Shell?

Fish Shell -- Probably the most popular non-POSIX shell (on Linux). Focused on the interactive use case, but also has a new programming language. Written in Rust.

PowerShell -- Microsoft's shell that deals with structured data, and has "workflows". Even works on Unix. Depends on a big VM. 850K lines of C# code.

C shell (tcsh) β€” Command language interpreter usable both as an interactive login shell and a shell script command processor. It includes a command-line editor, programmable word completion, spelling correction, a history mechanism, job control and a C-like syntax. (C Shell on Wikipedia. This is the oldest non-POSIX shell! Originally written by Bill Joy, who also wrote vi, etc.)

NGS (Blog by Ilya Sher) -- Next Generation Unix Shell. Modern programming language built ground up for Ops tasks. Written in C.

Elvish -- Goal: shell as a real programming language; structured data like lists and maps. Relies on lambdas for e.g. control structures. Extends output capture and pipelines to support structured data. Non-POSIX syntax, but generally looks familiar to POSIX shell users (barewords as strings, prefix syntax, etc.). Interactive shell enhancements. Written in Go.

Murex -- Murex is a cross-platform shell like Bash but with greater emphasis on writing safe shell scripts and powerful one-liners while maintaining readability. Written in Go. Website.

Ion Shell -- Part of Redox OS, written in Rust. So far it looks like a fairly conservative design -- a cleaned-up version of shell, similar to Oil. But it doesn't have the goal of bash compatibility.

Oh Shell -- Goal: combine good programming features and an interactive shell. Influenced by Lisp, has prototypical inheritance, CSP with channels and threads. Oh is a new implementation of the Choc Shell in Go. This 2010 master's thesis (PDF, 182 pages) has a great historical overview of shells and a motivation for putting programming language features in a shell.

nushell -- Focused on pipes and tabular data (compare with Structured Data in Oil). ls and ps are a table. Not POSIX compatible, and it's not clear if it's Turing-complete. Initiated and first released in 2019. Written in Rust with async/await. Uses many Rust libraries for JSON, YAML, TOML, etc.

liljencrantz/crush -- an attempt to make a traditional command line shell that is also a modern programming language. It has the features one would expect from a modern programming language like a type system, closures and lexical scoping, but with a syntax geared toward both batch and interactive shell usage. Written in Rust. (from the original author of fish)

Zuo - A Tiny Racket for Scripting. HN Comments. Zuo is a tiny Racket with primitives for dealing with files and running processes, and it comes with a make-like embedded DSL ... Compile zuo.c with a C compiler. No additional files are needed, other than system and C library headers. No compiler flags should be needed. Written in ~8000 lines of C, mostly in a single file.

Shell/Python Hybrids (same spirit as Oil!)

xonsh -- Xonsh is a Python-powered, cross-platform, Unix-gazing shell language and command prompt. The language is a superset of Python 3.5+ with additional shell primitives that you are used to from Bash and IPython. It works on all major systems including Linux, OSX, and Windows. Xonsh is meant for the daily use of experts and novices.

Koi -- A minimalistic language, mainly aimed at shell scripting. KΓΆi is inspired by Rust, Python, JavaScript, Lua and Bash. Written in Rust.

ABS Language (abs-lang.org)-- ABS is a scripting language that works best when you're scripting on your terminal. It tries to combine the elegance of languages such as Python, or Ruby, to the convenience of Bash. Written in Go.

Shell++ I wanted a language that runs shell commands like Bash, and manipulate data structure with the ease of Python, I searched, but I did not find any that met my requirements, so I decided to use my free time to create one. Written in C++. (clean code!)

Hush -- While being somewhat similar to scripting languages like Lua, Python and Ruby, ... Hush strives to feel pretty much like Bash when it comes to shell capabilities.. Written in Rust. Hacker News Thread.

Marcel -- Commands pipe Python values instead of strings. No "sublanguages", instead Python function are used to customize commands. Scripting is done in Python, by importing a module containing marcel's features. Includes commands for database access and distributed execution (sending same command to all nodes of a cluster and integrating results).

More

Neugram -- there is a command language with $$, but the control flow looks like Go rather than shell. Pipes?

Nash -- Nash is a system shell, inspired by plan9 rc, that makes it easy to create reliable and safe scripts taking advantages of operating systems namespaces (on linux and plan9) in an idiomatic way.

Mash Shell (Github) -- An object shell. Dealing with structured data. Written in Scala. See Command vs Expression Mode

Another Mash Shell -- Mash is the "Make Shell." It is a simple scripting language used to build programs (and other files) from source files. No source code?

dgsh - Directed Graph Shell -- A fork of bash which supports "multipipes" and blocks!

Shill -- Scripting with Least Privilege. Built on Racket, but it appears to be making its way from research into production? The language looks more like JavaScript than a shell.

execline -- execline is a β€” non-interactive β€” scripting language, like sh ; but its syntax is quite different from a traditional shell syntax. The execlineb program is meant to be used as an interpreter for a text file; the other commands are essentially useful inside an execlineb script.

Ergonomica -- A shell written in Python using some libraries like python-prompt-toolkit. I'm including it in this section rather than grouping it with xonsh below because it appears to have its own language. It has map and filter, not sure about other constructs.

Magritte -- [Magritte is] a general-purpose language that is viable as a shell scripting language. Like shells, it manages concurrent processes which are composed [... with pipes]. Unlike traditional pipes, Magritte pipes can process rich values. [The language has] features such as data structures and lambda functions with lexical scope, as well as systems for automatic process cleanup and error handling. The syntax is designed for command-line usability. This work presents an implementation, along with a proposed method of integration with a POSIX system. (72-page thesis)

Atom -- Bash scripting needs to be outlawed. Written in Rust.

Dune -- The successor to Atom, from the same author. Offers a few niche metaprogramming features such as quoting (borrowed from Lisp), operator overloading, and macros.

modernish -- Modernish is a library for shell script programming which provides features like safer variable and command expansion, new language constructs for loop iteration, and much more. I would describe it as an overhaul of shell, written in shell! That is, it's more of a language than a library.

Tcl β€” Everything is a string. A scripting language and interactive shell that has been described as a bastard child of Bash and Lisp. $foo variable substitution works like "$foo" in the POSIX shell, eliminating a class of bugs. Quoting uses balanced delimiters β€” {...} β€” eliminating escaping hell when doing nested quoting (which is essential for nested data structures). Written in C as a library and embedded in a bunch of software. Tclreadline provides additional interactive capabilities.

Zrc - Almost-EIAS: A Tcl-inspired shell and scripting language written in C++ that supports Tcl features like custom keywords, functions with rich return values, lexical scoping and slightly more syntax than "regular" Tcl. It is very experimental, so syntax may change a lot in the future.

Janet Shell - Interactive shell for system commands mixed with Janet, a Lisp-like language. Supports plugins. Last commit in January 2020

Yori - Interactive shell patterned on CMD that's specific to Windows. Enhancements are primarily to interactive scenarios. Written in C, runs on ancient versions of Windows without requiring dependencies or installation.

NYoSh -- A shell implemented in jetbrains MPS. Paper: Composable languages for bioinformatics: the NYoSh experiment

Translators / Transpilers

Batsh -- A language that compiles to Bash and Windows Batch. Written in OCaml. Not that active. Looks a bit like JavaScript, i.e. not a shell-like syntax.

cotowali. A statically typed scripting language that transpile into POSIX sh. Written in V. Hacker News Thread.

powscript - transpiler written in bash: painless shellscript, indentbased, coffee for the shell. Big bash codebase!

Active / New POSIX Shells

Gash -- Part of the Guix project. Gash is a POSIX-compatible shell written in Guile Scheme. It provides both the shell interface, as well as a Guile library for parsing shell scripts. Gash is designed to bootstrap Bash as part of the Guix bootstrap process. We are planning to develop Gash into a general-purpose shell and tool for building interfaces between Scheme and the shell.

mrsh -- A minimal POSIX shell, which is structured as a library and a /bin/sh that consumes it. Written in C99.

toysh is part of toybox (written in C). Note: busybox has forks of ash (Almquist shell) and hush.

GSH: A POSIX Shell for Windows -- GSH is an implementation of a POSIX shell developed for the Windows platform. The aim of the project is to provide an efficient UNIX shell instantiation for Windows, for non interactive usage. Written in Ada! Event: https://archive.fosdem.org/2019/schedule/event/ada_shell/

Proprietary Shells

CDL: Component Distribution Language in HeliOS, a Parallel Unix-like OS for the Transputer. (PDF Book). It has | for compatibility with Unix pipes, but also ^^ for parallel invocation, <> for bidirectional pipe, and ||| for load balancing pipe. (Some newer "HPC" shells also have the equivalent of |||.) This was a commercial product, but is now apparently GPLv3 (although I think it's still tied to a particular OS and hardware).

ch is a C language shell and genuine C shell, an alternative to MS-DOS in Windows. From a comment by taviso.

Dormant/Historical

Bish -- Bish is a lightweight language created to bring shell scripting into the 21st century. It gives programmers the comfort of modern syntax but compiles to Bash. Written in C++. Looks more like JavaScript than a shell though.

daudin -- daudin is a UNIX command-line shell based on Python. The aim is to provide an interactive shell that is as convenient to use as the regular shell (in particular providing pipelines) but which has Python as its programming language. By default, daudin will use your SHELL environment variable (with a -c argument) as the shell to execute non-Python commands with.

shok (Github) -- Cross-platform shell, appears to be dormant as of 2014. Hacker News Thread. Written in C++ (with Boost), and some Python.

es shell -- "A shell with higher order functions". Based on Lisp and has garbage collection. Influenced by the rc shell.

rc shell -- The Plan 9 Shell. No word splitting. Feature set is very similar to Bourne shell or bash, but the syntax is entirely different. "Nobody really knows what the Bourne shell's grammar is". There is also a unix reimplementation which is on most linux package managers.

v6 shell -- Osh(1) is an enhanced, backward-compatible port of the Sixth Edition Thompson shell.

PLASH Shell -- Principle of Least Authority Shell. Very interesting! Would be nice to take some lessons from this.

Inferno mash shell -- with builtin make functionality

Distributed Shells

DSH / Dancer's Shell -- circa 2003, doesn't seem active. ''dsh is an implementation of a wrapper for executing multiple remote shell (rsh/remsh/ssh) commands. rsh/remsh/ssh are wrappers for executing shell (ksh/bash/zsh/tcsh/sh .. etc... ) on remote hosts.''

Interactive Shells

This section is for shells which are only interactive -- they do not define a new syntax for programming, i.e. they borrow the syntax from another language or combination of languages.

tako -- Fork of xonsh.

xiki -- xsh tries to bring the wiki structure to the command line. Type Ctrl+X in your favorite shell (bash or zsh etc), and youll expand the command in xsh (Xiki Shell). Then you can type to filter down the output. No need to pipe to grep. Xiki runs in your text editor, so everything is editable text. Type commands anywhere. Edit the output. (Vs. typing commands at the bottom, and read-only output.) Intermix menus, headings, bullet points, wherever you want. Xiki == executable wiki. - Written in ruby.

scsh -- The Scheme Shell. Scsh has two main components: a process notation for running programs and setting up pipelines and redirections, and a complete syscall library for low-level access to the operating system, i.e. to POSIX, the least common denominator of more or less all Unices, plus widely supported extensions such as symbolic links and BSD sockets. Moreover, scsh provides an awk facility for pattern-directed computation over streams of records, a rich facility for matching regular-expression patterns in strings, event-based interrupt handling, user-level threads, a futuristic module system, and an interactive environment.


Also see Interactive Shell for related experiments.