CLUI: Building a Graphical Command Line
&gt; On a technical level, a CLUI command is conceptually similar to a file
path or URL. Since a complete CLUI command is simply a path down the
command tree, each potential subcommand is like a portion of a file path
or URL. Flags, on the other hand, function like query parameters. CLUI’s
resemblance to URL paths means you can send someone a complete,
executable CLUI command as a URL. They’re mapped 1:1.<p>This is really cool.<p>&gt; Since we have a GraphQL backend, we know all the potential fields and
arguments a client can use. By using an introspection query we generate a
tree of commands&#x2F;sub-commands that map onto their respective resolve
functions. Now, to add a new admin command all that&#x27;s needed is a new
field on a GraphQL type.<p>And <i>that&#x27;s</i> really <i>really</i> cool.<p>The main thing I see that could be improved would be a clear, simple
underlying model or metaphor, a semantic layer that sits between the CLUI
and the GraphQL backend, to unify and simplify the various contexts and
languages and runtimes and whatever.<p>I&#x27;ve been toying with a UI demo that unifies GUI and CLI through a
dialect of the Joy language.  Everything you can do at the CLI can be
done through the mouse, and everything done through the mouse has a
corresponding textual representation as Joy code.  It&#x27;s inspired by
Oberon OS and Jef Raskin&#x27;s &quot;Humane Interface&quot; (among other influences.)
I haven&#x27;t integrated widgets (yet) because you mostly don&#x27;t need them,
mostly.<p>W&#x2F;O getting into a lot of details, there are no menus nor buttons because
any text can be used to activate any command and&#x2F;or enter any data; there
are no forms because the UI metaphor (Joy) is stack-based so you just put
values onto the stack; and so on.