Slumber a TUI HTTP Client
104 points
7 hours ago
| 13 comments
| slumber.lucaspickering.me
| HN
hunter2_
5 hours ago
[-]
TUI stands for "Text User Interface" not "Terminal User Interface" considering that the point of TUI vs GUI is to distinguish text mode from graphical mode. The word "terminal" isn't really meant to imply text even if quite a few terminal emulators are, indeed, text mode; rather it typically means that the UI is drawn by some other machine than the one you're touching. For example, a very popular Windows Server feature formerly named "Terminal Services" is for GUI terminals, not TUI terminals. A likely source of confusion is the MacOS app named Terminal, which only becomes a terminal in the real sense of the word once you decide to let some other machine draw your UI (ssh, telnet, rlogin, etc.).

But it looks very cool!

reply
hombre_fatal
51 minutes ago
[-]
TUI also means terminal user interface.

But this is wrong:

> it typically means that the UI is drawn by some other machine than the one you're touching

I guess you're conflating thin-client terminal in the networking sense vs vt100 hardware terminal lineage (where "terminal" comes from here), but it means a text mode interface that runs in the terminal emulator and uses, say, ansi escape sequences.

Rather, when you see TUI, it just means the app runs in one of your kitty panes.

Btw, your "Terminal Services" example doesn't show that "terminal" implies remote drawing. It shows Microsoft extended the word to cover remote GUI sessions, which is a later, broader usage.

reply
_flux
5 hours ago
[-]
On the other hand, there are many elements in the user interface that are not text. In fact, I think it would be quite understandable if one even separated REPLs like bash or octave to be "text user interfaces" while applications that make use of character placement and border special characters "terminal user interfaces", because they use means beyond text stream to communicate with the user. One might even render straight up graphics to a terminal [emulator application].

Even X had a separate application called xterm 42 years ago: the complete X system was not to my knowledge called a terminal system, except perhaps when discussing the dedicated client devices, such as VT1300. Also the term "virtual terminal" as far as I know has always referred to a the kind of interface this application is making use of.

So I think we can just accept that the term is overloaded such that "terminal" refers to both of these situations, as there is no historical precedent to have it exclude the other situation, and the term "terminal-based application" is completely clear to a rational listener.

reply
wjholden
3 hours ago
[-]
Moreover, I'll appeal to authority and point out that Ratatui's motto is "Cook up delicious terminal user interfaces" (https://ratatui.rs).
reply
mentalgear
3 hours ago
[-]
Doesn't make it in any form a valid argument for Terminal instead of Text.
reply
nine_k
4 hours ago
[-]
A REPL like bash already is not a pure text stream, since readline is used. Zsh, even less so.
reply
_flux
3 hours ago
[-]
But they are just convenience features, not in my opinion the defining property. They basically work just the same without them.
reply
gcgbarbosa
57 minutes ago
[-]
If it is just an acronym, they can define it as they wish in my opinion.

As long as they defines it first (and they did)

reply
dual_dingo
5 hours ago
[-]
I would argue that a local only session with terminal.app is still a real terminal session because the app is just a terminal for the connection to the MacOS version of getty. In principle, this is not different from having a serial cable between the host and an old-style terminal or encapsulating that connection over a different network like with SSH and telnet etc.
reply
embedding-shape
1 hour ago
[-]
macOS also call their log viewer "Console" for what I'm sure are obvious reasons to some, but seemingly confuses every beginner developer at least initially, while "console" is what many have come to understand "Text-like entry system to run computer commands".
reply
mentalgear
3 hours ago
[-]
Very much agree - "Text User Interface" is also a much clearer descriptor for non-technical users to understand. Normal people have an immediate idea of 'text' but not of that 'strange nerdy terminal thing' - and that's important because often times a good 'Text User Interface' is all that even regular people need !

(plus custom theme customize-able & much less work for the devs to build & maintain, and way less dependencies)

reply
ananthakumaran
4 hours ago
[-]
For those who are using Emacs, https://github.com/federicotdn/verb provides similar UX, I have been using it as a postman alternative for quite some time.
reply
keyle
5 hours ago
[-]
If it could import and export postman collections and env, you'd have a customer for life!
reply
unkn0wn_root
3 hours ago
[-]
Resterm is also another api TUI client https://github.com/unkn0wn-root/resterm but uses .rest/.http files instead.
reply
jhy
4 hours ago
[-]
> Slumber is a terminal-based HTTP client, built for interacting with REST and other HTTP clients

I wonder what that means -- I looked around the docs but didn't see that it interacts with other clients. I thought maybe it would show a generated curl command or something along those lines. But perhaps it's just a typo for HTTP servers?

reply
oneeyedpigeon
1 hour ago
[-]
Maybe it's referring to the CLI, since you could pipe to/from it? There's an example relating to curl: https://slumber.lucaspickering.me/user_guide/cli/subcommands...
reply
voidUpdate
5 hours ago
[-]
> "To that end, configuration is defined in a YAML file called the request collection"

Genuine question, why do people use YAML? I've been using it a little bit recently (reading existing documents, not writing my own), and it just seems like a more overcomplicated and less human-readable version of JSON? With potential security vulnerabilities?

reply
kalaksi
4 hours ago
[-]
If not using any esoteric features, it's more human readable (imo), easier to write, can have comments and has some useful features like different kind of multi-line values. JSON is valid YAML, by the way.
reply
mystifyingpoi
4 hours ago
[-]
> less human-readable version of JSON

Please provide an example, how YAML can be less readable than JSON. I struggle to think of any.

reply
embedding-shape
1 hour ago
[-]
YAML:

  - - "hello"
YAML expanded:

  -
    - "hello"
JSON (typical formatting):

  [
    [
      "hello"
    ]
  ]
And EDN for good measure:

  [["hello"]]
I know which one I prefer :) Silly example perhaps, but once you have X lists nested in Y lists, it does become a lot easier to see why some prefer a bit more visually hierarchically stronger syntaxes
reply
voidUpdate
4 hours ago
[-]
Indentation based structure isn't really a good thing in my eyes, where the format of the document encodes semantic meaning. With JSON, you can display it how you want, and because it's bracketed it will still encode the same data.

Also I really don't like the hyphen notation... This is very unreadable to me:

  - a
  - b: c
  - - d
reply
amazingman
4 hours ago
[-]
People use YAML because a bunch of other people use YAML. Whatever its warts, there's no use resisting it.
reply
bschwindHN
4 hours ago
[-]
> it just seems like a more overcomplicated

Because people LOVE overcomplicated shit. You see it happen everywhere.

reply
kalaksi
4 hours ago
[-]
I don't think that's it
reply
skywhopper
3 hours ago
[-]
There’s lots of overengineered features in YAML that are problematic, but at a high level, it’s much, much more human-friendly than JSON. And if you love JSON, good news: it’s 100% valid YAML.
reply
speed_spread
4 hours ago
[-]
Because as long as you stay away from anchors and inline JSON, YAML is a perfectly workable, structured, human-readable format that supports comments.
reply
smetj
5 hours ago
[-]
That looks great! Will give it a spin during my daily work. Thanks for making and sharing it.
reply
vladde
4 hours ago
[-]
looks nice when you want to quickly get something up and running! i'm trying to move away from GUI-based, and i haven't really found a nice workflow with just using curl

https://justuse.org/curl/

reply
aitchnyu
4 hours ago
[-]
I used to write Python scripts with Requests or run from terminal. It has a nicer syntax, all LLMs know it, and we all used Python in the backend.

https://docs.python-requests.org/en/latest/index.html

reply
zdkaster
5 hours ago
[-]
Love the support for neovim integration
reply
dhruv3006
5 hours ago
[-]
Great to see this space so active.I see this a TUI.

You can also try out Voiden : https://voiden.md/ which has a different approach to this.

Also YAML is a interesting choice - any reasons for this.

PS : I am associated with Voiden.

reply
bmn__
49 minutes ago
[-]
> built for interacting with REST

I just tried it to verify that claim, but the software does not follow a hyperlink. How did you manage to screw up such a basic feature?

reply
sgt
4 hours ago
[-]
The "Postman" team hates this one app...
reply
uallo
4 hours ago
[-]
reply