Skip to content
andychu edited this page Feb 11, 2021 · 61 revisions

Related: Internal DSLs for Shell / ExternalResources

Active Alternative Shell Languages

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

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.

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. Syntax Guide.

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

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)

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!)

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!

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.

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.

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.

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.

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)

Crush -- an attempt to make a command line shell that is also a powerful modern programming language. Written in Rust. By the original author of the fish shell.

Marcel (https://www.marceltheshell.org/) -- The main idea is to rely on piping as the primary means of composition, as with any Unix or Linux shell. However, instead of passing strings from one command to the next, marcel passes Python values: builtin types such as lists, tuples, strings, and numbers; but also objects representing files and processes. Written in Python.

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

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.

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.

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".

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.

xonsh -- Xonsh is a Python-ish, BASHwards-looking shell language and command prompt. The language is a superset of Python 3.4+ with additional shell primitives that you are used to from Bash and IPython. This is focused on the interactive use case, and isn't its own programming language. It's written in Python and exposes Python to the user.

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.

Clone this wiki locally