# erishell: replacing command-line flags and configuration with a DSL

**URL:** <https://forum.malleable.systems/t/erishell-replacing-command-line-flags-and-configuration-with-a-dsl/379>\
**Category:** Projects\
**Created:** [7 November 2025 21:38 UTC](https://forum.malleable.systems/t/erishell-replacing-command-line-flags-and-configuration-with-a-dsl/379 "2025-11-07T21:38:03Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![cben](https://forum-cdn.malleable.systems/user_avatar/forum.malleable.systems/cben/32/59_2.png) [@cben](https://forum.malleable.systems/u/cben)\
**Post date:** [2 December 2025 13:48 UTC](https://forum.malleable.systems/t/erishell-replacing-command-line-flags-and-configuration-with-a-dsl/379/5 "2025-12-02T13:48:04Z")

</div>

> [@emery](#):
>
> I flipped the command-line flags to take arguments from the left instead of the right. Arguments that not recognized as “programs” are pushed onto a stack.

The postfix dash `arg flag-` convention is brilliant in helping to grasp the flipped structure 👏, yet it’s still unusual.

Thinking aloud here… [UIUA language](https://www.uiua.org/) has an interesting idea reducing the weirdness for the majority used to prefix style:

> Code runs from right to left, top to bottom

So they write [`÷ [2 3] [6 9]`](https://www.uiua.org/pad?src=0_18_0-dev_3__w7cgWzIgM10gWzYgOV0K) but execute right-to-left “push [6 9]; push [2 3]; divide” order (result being [3 3]).  
However, that requires parsing the whole program before execution, which conflicts with adding a REPL, and that’s where their second twist comes in:  
Multiple lines do execute top-to-bottom, so this:

```auto
[2 3] [6 9]
÷

```

or even

```auto
[6 9]
[
  2
  3
]
÷

```

are equivalent!

So perhaps that way you could have a familiar-looking `-combinator -flag arg -flag arg` order, with full stack + REPL power?  
Admittedly, the REPL order is still weird, it violates “enter ~ space” axiom of regular text wrapping! I haven’t really played with Uiua, don’t know yet how that feels… But, it kinda “postpones” the weirdness, one needs to grok that only when one graduates from CLI to REPL.

- eliot makes good points, that the natural order may depend on your domain. Unix CLI conventions are already mixed-order in a way! E.g. jq syntax deliberately adopted pipe operators so that `jq 'foo | bar'` would be equivalent to `jq 'foo' | jq 'bar'`. It’s hard for me to say where prefix/postfix fits your needs…

- IIUC you picked concatenative not so much for programming (e.g. do you define any shorthand aliases for common chunks of options?) as for easy way to implement a DSL that can express hierarchical structure?  
I must say it’s unclear to me why a flat syntax is better here than say JSON. Or almost any DSL syntax with parens of some kind; It feels like nesting would make most examples here clearer to read…  
And/or the whole thing would be clearer with diagrams.

P.S. if you haven’t seen “storage combinators” e.g. [metablog: Native-GUI distributed system in a tweet](https://blog.metaobject.com/2022/08/native-gui-distributed-system-in-tweet.html) that might interest you, e.g. `cache-` is similar spirit.

[P.S. using [execline](https://skarnet.org/software/execline/) in one example made the doc even more obscure, but I’m glad to discover it — it’s really similar to ideas I hoped to explore 🙏]

---

_[View the full topic](https://forum.malleable.systems/t/erishell-replacing-command-line-flags-and-configuration-with-a-dsl/379)._
