alt.hn

3/16/2026 at 12:03:07 PM

Schemesh – Unix shell and Lisp REPL, now with structured pipelines

https://github.com/cosmos72/schemesh/blob/main/README.md

by cosmos0072

3/16/2026 at 12:03:42 PM

First stable release appeared on HN one year ago: https://news.ycombinator.com/item?id=43061183 Thanks for all the feedback!

Today, version 1.0.0 adds structured pipelines: a mechanism to exchange (almost) arbitrary objects via POSIX pipes, and transform them via external programs, shell builtins or Scheme code.

Example:

  dir /proc | where name -starts k | sort-by modified
possible output:

  ┌───────────┬────┬───────────────┬────────┐
  │   name    │type│     size      │modified│
  ├───────────┼────┼───────────────┼────────┤
  │kcore      │file│140737471590400│09:32:44│
  │kmsg       │file│              0│09:32:49│
  │kallsyms   │file│              0│09:32:50│
  │kpageflags │file│              0│10:42:53│
  │keys       │file│              0│10:42:53│
  │kpagecount │file│              0│10:42:53│
  │key-users  │file│              0│10:42:53│
  │kpagecgroup│file│              0│10:42:53│
  └───────────┴────┴───────────────┴────────┘
Another example:

  ip -j route | select dst dev prefsrc | to json1
possible output:

  [{"dst":"default","dev":"eth0"},
  {"dst":"192.168.0.0/24","dev":"eth0","prefsrc":"192.168.0.2"}]
Internally, objects are serialized before writing them to a pipe - by default as NDJSON, but it can be set manually - and deserialized when reading them from a pipe.

This allows arbitrary transformations at each pipeline step: filtering, choosing a subset of the fields, sorting with user-specified criteria, etc. And each step can be an executable program, a shell builtin or Scheme code.

If you know nushell, they will feel familiar as they are inspired by it - the implementation is fully independent, though.

by cosmos0072

3/16/2026 at 3:55:28 PM

I'm not too familiar, but is this similar to nushell?

by ascent817

3/16/2026 at 5:16:25 PM

Yes, they are similar at first glance. As I wrote:

> If you know nushell, they will feel familiar as they are inspired by it - the implementation is fully independent, though.

Looking deeper, there are two main differences:

- Nushell structured pipelines are an internal construct, and only work with nushell builtins. Schemesh uses actual POSIX pipes, which allows to also insert executables in the pipelines.

- schemesh also allows to insert arbitrary Scheme code in the pipelines. Nushell does too, in a sense: you have to write nushell language though

by cosmos0072