Ask HN: Is it still possible to live in a terminal?
264 points| ilovecaching | 3 years ago | reply
Recently I looked into doing this again and ran into a bunch of issues:
- My company uses Slack's enterprise auth, and all the CLI slack clients I could find haven't been updated in years and no longer work.
- The web is using more javascript than in the past.
- Mutt doesn't handle multiple email accounts natively for work/personal. The solutions are hacks at best. Email servers are starting to use more complete auth mechanisms that don't work well with mutt.
It seems like the terminal world is slowly getting abandoned in favor of proprietary GUI apps. Anyone still living inside the terminal? Links to tools for Slack are appreciated.
[+] [-] reissbaker|3 years ago|reply
That being said, I think "living in the terminal" for general purpose computing, like browsing the web or talking to your coworkers, has been in a kind of frozen standstill while the rest of the world has moved on. I think it isn't worth trying to push non-dev work into the terminal currently.
1: https://github.com/sayanarijit/xplr
2: https://github.com/sharkdp/hyperfine
3: https://github.com/httpie/httpie
[+] [-] mekster|3 years ago|reply
It looks promising at first with LSP and all that but I don't know when I had any stable moments.
[+] [-] greymalik|3 years ago|reply
[+] [-] gtsop|3 years ago|reply
coworker #2 was struggling with his vscode autodeleting some imports
strange times when you are the vim developer in the house and the one with the most solid IDE...
[+] [-] yeswecatan|3 years ago|reply
[+] [-] 29athrowaway|3 years ago|reply
- Edit code
- Autocomplete
- Navigate code, find references, go to definitions
- Run your code
- Debug your code
- Test your code (including running a specific test)
- Profile your code
- Run multiple static analyzers simultaneously
- Use version control and annotate code using version control
- Do all that remotely or with containers involved
- Query a database and get results in a tabular format
- Spell checking
- Have collaborative editing
- Work with issue tracker tickets
- And more...
The sad reality is that for 99.9% of people using vim is reinventing the square wheel to produce a worse development experience and inferior code.
[+] [-] jcuenod|3 years ago|reply
See this documentary: https://www.imdb.com/title/tt0362227/?ref_=fn_al_tt_1
[+] [-] smeej|3 years ago|reply
[+] [-] pedrovhb|3 years ago|reply
Personally, I use Firefox for browsing, PyCharm for coding, mpv/qimgv for media, and do pretty much everything else in the terminal. Terminal tools are incredibly versatile and composable in a way GUIs really can't match - for instance, I built a script that gets all the RAW files from my camera, converts them to jpg with darktable-cli, and optimizes them for filesize maintaining the same visual quality with jpeg-recompress, great for when I don't particularly care about editing each picture of a long hike. Next step will be to also push them to Google Drive, but I haven't gotten around to that yet. Similarly, the gopro-like camera I use for recording racing footage produces files with some weird filenames and terrible encoding which makes them enormous, so another script pulls the files, renames them to the date/time taken, and uses ffmpeg to transcode them to hevc, which saves several GB. Could I do this all from GUIs? Probably, but it'd involve a lot of hunting for files, dragging/dropping, and context switching between different programs. It's a lot more convenient to do it all in one short command.
There's also some amazing tools which just don't make much sense or would be quite contrived in GUI form. fd and fclones come to mind. AI is starting to be packaged as CLI tools, and it'll open up even more possibilities. Separate hiking pictures into their own directory? Sure! Find lecture videos mentioning a specific subject? No problem, this one doesn't mention the specific keyword you were looking for but it's also relevant at X timestamp!
[+] [-] nissarup|3 years ago|reply
[+] [-] zh3|3 years ago|reply
For local graphics programs, that also provides a memory-mapped framebuffer which makes basic graphics a doddle. Beyond that, text-mode browsing has been too hard work for years (and so by extension email too). While it's very possible to 'cheat' by setting X to render to a framebuffer (either directly or in the background) the whole reason to use the text-only console is to focus on code without computer-borne interruptions.
Even on my graphical computer, it's basically terminals windows and a browser. Any piece of software that interrupts the flow is either configured to not do so, or discarded PDQ.
Terminals FTW.
[+] [-] Melatonic|3 years ago|reply
[+] [-] cweagans|3 years ago|reply
https://github.com/wee-slack/wee-slack is decent.
> - The web is using more javascript than in the past.
cli browsers are probably the only truly unrealistic thing. An idea that I've been kicking around for a while is to build a simple CLI "browser" that uses PhantomJS or similar under the hood to request, load, and render the page into an image, convert the image to sixel (https://en.wikipedia.org/wiki/Sixel) and display it that way (or use any of the various terminal emulator-specific features (KiTTY has https://sw.kovidgoyal.net/kitty/graphics-protocol/ for example)). Probably pretty clunky, but it's doable if you're in the mood to write something purely for fun.
> - Mutt doesn't handle multiple email accounts natively for work/personal. The solutions are hacks at best. Email servers are starting to use more complete auth mechanisms that don't work well with mutt.
I don't think they're hacks. You can define exactly how you want it to work. That's a feature, not a bug. Sure, it takes a little bit of work to set up but you can use https://github.com/cweagans/dotfiles/tree/master/.config/mut... as a starting point if you'd like.
[+] [-] easrng|3 years ago|reply
[+] [-] gregjor|3 years ago|reply
[+] [-] pram|3 years ago|reply
Checking my email or chatting though, why bother? The company pays for outlook and slack, I’d just be making my life pointlessly difficult.
[+] [-] golly_ned|3 years ago|reply
I've tried to do the same thing: going completely text mode. For me, it was disastrous -- it was a big distraction for me at work, at two jobs. I even left a good job partially so that I could try to go text-mode rather than click my way through lots of GUIs. It was something of an obsession. Now I look back and sigh.
[+] [-] Jiro|3 years ago|reply
[+] [-] slowhand09|3 years ago|reply
[+] [-] beardyw|3 years ago|reply
[deleted]
[+] [-] oneplane|3 years ago|reply
Living in a terminal itself doesn't really mean much, as it strongly depends on your tasks. For things like number crunching or programming, it has a pretty big benefit (as text is the universal API after all), and you can do pretty much everything, usually faster and more reliable than a GUI can.
But when you need to do data visualisation, make use of external services that do not provide terminal emulation interfaces or want to work with people that do not live in a terminal, that makes a 60/40 split the best choice.
[+] [-] blooalien|3 years ago|reply
[+] [-] habibur|3 years ago|reply
I keep two desktops open and can flip with a keystroke.
One of those always runs a full screen browser on gnome desk, and the other is the shell.
I flip between those. Email is webmail but on the other screen code editor is vim.
[+] [-] wollsmoth|3 years ago|reply
[+] [-] brudgers|3 years ago|reply
Although, if you are going to live in Emacs there might be enough terminal there without actually running it in a terminal.
[+] [-] jolmg|3 years ago|reply
I don't know about Mutt, but I've had no problems handling multiple accounts with mu4e on Emacs. `emacs`/`emacsclient` can be forced to use the terminal by using the `-nw` option.
isync/`mbsync` can also work with multiple accounts. Although, this program just sync's an IMAP account with a local Maildir that clients like mu4e can use for reading mail offline. It's an MRA[1] rather than a whole MUA.
There are many other terminal email clients you can also try.
> Email servers are starting to use more complete auth mechanisms that don't work well with mutt.
Google can support standard auth by activating 2FA, then making an app password. You can do this here:
https://myaccount.google.com/security
Google specifically needs "more complete auth mechanisms" because its regular password gives access to much more than an email account, since Google accounts are a huge platform. What other servers are moving away from standard auth mechanisms?
[1] https://en.wikipedia.org/wiki/Mail_retrieval_agent
[+] [-] fishywang|3 years ago|reply
[+] [-] mrweasel|3 years ago|reply
Unless you're an absolute terminal power user that can masterfully navigate tmux, vim or whatever tools you use, I don't think it's a good use of time. There certainly are things where the terminal is the right tools, use it in those situations. Just ask yourself if you're artificially limiting yourself, simply because you think the cool kids use the terminal.
[+] [-] rgoulter|3 years ago|reply
Rather. 99% of what I use tmux for is both: not what I would consider "power user" skills; what I think terminal emulators like kitty or iTerm2 will mimick anyway; and reflects how e.g. VSCode arranges its open files.
I find it convenient to have a session of tabs for a particular task/project, and to switch between the tabs depending on what I want to do.
That said, I rarely make use of split panes (nor a tiled window manager). YMMV, but I almost always want whatever I'm looking at to be fullscreen.
Zellij at least shows the keyboard shortcuts.
[+] [-] notyourwork|3 years ago|reply
[+] [-] jll29|3 years ago|reply
In computing, students want to do their coursework on their iPad in a notebook environment, relying mostly on step-by-step instructions given as PDF file or from an online tutorial, based on copy & paste, without understanding what they paste there instead of compiling libraries or write a makefiles from scratch.
Starting next summer, I will include a 2-3 hour UNIX command line (and also a 2-3 hour LaTeX) intro into all courses I teach where that can be justified. (The UNIX Power Tools [1] book is a useful resource for teaching, I found in the past.)
[1] https://www.amazon.de/Unix-Power-Tools-Classique-Us/dp/05960...
[+] [-] heavyset_go|3 years ago|reply
Apparently some professors are leaning more and more on desktop & cloud IDEs, and other development platforms that just let students code and not worry about the rest. The argument is that abstracting away system administration allows teachers to spend more time on the content they need to teach versus spending time setting up and debugging systems.
[+] [-] jolmg|3 years ago|reply
Depends on what you mean by recent. I wouldn't expect exposure to have been greater 10-15 years ago. If anything, I would expect CLI exposure to be greater now compared to then, at least because of the rise of git.
[+] [-] geofft|3 years ago|reply
A bunch of folks who have been using Slack for a long time have saved their xoxs cookie from a couple of years ago and not invalidated their old sessions, and they'll tell you the various clients still work. For a new user who is getting an xoxc token, your client needs a way to pass cookies along with your token. Many of the terminal clients I've seen don't obviously give you a way to pass the cookie.
My company uses the enterprisiest Slack offering (Enterprise Grid, compliance archiving, proxy restrictions, the works) hooked up to Azure AD as the identity provider and previously to Okta via ADFS, and I have working programmatic auth to Slack (leveraging local Kerberos tickets from Windows AD signon). Give me some details on what your auth setup looks like and I can probably help you with it. (I can try to open-source my internal client if it helps, but it's specific in some ways to our setup so it might be easier to just talk you through it.)
[+] [-] raydiatian|3 years ago|reply
These days I pretty much work exclusively in terminal, having gotten used to vim mappings and just sticking with it. Still, I’d rather be on a desktop.
[+] [-] ar_lan|3 years ago|reply
There are occasional times I need to pull it out, however. But with Yabai + Vimium + terminal the majority of my day-to-day needs are met happily mouseless.
[+] [-] zppln|3 years ago|reply
> It seems like the terminal world is slowly getting abandoned in favor of proprietary GUI apps.
Eh, I'm seeing quite the opposite trend. I see people doing stuff that'd consider using a terminal to be straight up inappropriate for (e.g. displaying line graphs).
And your troubles with Slack is most likely down to it being proprietary garbage.
[+] [-] howeyc|3 years ago|reply
neovim - text editor
aerc - email
nzbget - usenet
irssi - chat
mpv - audio
still hoping for gemini to take over for a full terminal experience.
[+] [-] throwaway290|3 years ago|reply
[+] [-] wfleming|3 years ago|reply
- Multiple accounts: I have a per-account config file with the relevant specifics (https://github.com/wfleming/dotfiles/tree/arch-linux/home/co...) and use folder hooks to apply those depending on which mailbox I'm viewing (https://github.com/wfleming/dotfiles/blob/arch-linux/home/co...). (Plus a keybinding in each account file to make flipping to the next account easy.)
- Non-standard auth:
For web & Slack, I sympathize and have toyed with CLI alternatives in the past, but I'm come to terms with the the fact that it's just not that feasible for the most part. Personally, I spend as much time in the terminal as I can, but I've given up on fighting against the tide for everything. The only native apps I usually have open are Firefox, Slack, and Spotify, and that's acceptable to me since it ends up meaning I still spend most of my day in a terminal.