Ask HN: What's your favorite CLI or ncurses program?

55 points by wkoszek ↗ HN

75 comments

[ 3.2 ms ] story [ 163 ms ] thread
ATM when testing deployment flow:

  function sd()  {
  n=2
  while [ $n -gt 0 ]
    do
      sed -i ''"${1}"'d' $HOME/.ssh/known_hosts
      n=$(($n-1))
    done
  }
I like sed.
care to explain what the script does and how ncurses is involved here ?
It removes a line from the known_host file. When spinning up a new VM/container or reaching a machine that has an IP/hostname you've used before (happens a lot in dev environments/NATed networks), you'll get a warning about a possible MITM attack.

ncurses is not involved though.

that

    ''"${1}"'d'
is needlessly complicated. this would do the same:

    "${1}d"
If you are careful, you can avoid that annoying problem altogether:

ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $1

For many years that is Midnight Commander for me.
slrn was pretty much perfect back in the day.
mocp. It replaced iTunes for me (although I've long since switched to Linux).
cmus in a similar vein, although annoyingly the Debian packaged version segfaults for me in some edge cases (adding large libraries, adding m4a files).
I've experienced the same thing with ncmpcpp, it can be a bit annoying.
I wish I could do that, but having an iPod forces me to run a windows virtual machine just for iTunes.
I used to sync my iPod with foobar2000 on Win7 to avoid having to deal with iTunes - I'm sure there are a few other Linuxy options to explore too. Vive la résistance :)
Wait can you get this for Mac? I couldn't find it.

Edit: Apparently it's on homebrew but as "moc" (I was searching for "mocp" before).

Does Vim count? I guess so :)
Vim, mutt, wicd-curses, irssi, mplayer|mpd and conky
With ncurses I would say htop, you can see what happens on the machine quickly. And for pure CLI, sysdig is a must-have on every machine !
mitmproxy has a great terminal UI
ncmpcpp is a great MPD client.
jq, vim, sysdig
+1 on jq
jq is small peanuts compared with App::RecordStream.
Mutt or The emacsclient in terminal mode (ncurses)
Dwarf Fortress
I only say that on many days I spend more time in my vim than in my bed. I usually run it in a terminal Window.
I've become a big fan of ncurses software over the years without really realising. Newsbeuter, irssi, cmus/mocp, vim, mutt. It's the resource efficiency and speed of use that make the difference with their shiny UI counterparts. That and still having a GUI, albeit a minimum viable GUI.

It has inspired me more than once to pick up K&R's C and have a stab at a tool of my own that I'd love to have - but it's way down on the current list of priorities.

...Now wondering why the question - are you working on something?

EDIT: Forgot a special mention for Finch (pidgin client), which along with the others runs nicely on Tmux (another forgotten mention) on a perma-on server. Rpi2 in my case.

I'm using ncmpcpp with MPD for music but have experience some problems, the software feels a bit unstable and tends to slow down a lot, eventually causing segfault every few weeks. How's cmus/mocp here, can you use them with MPD/Spotify?
afaik mocp is it's own daemonized process, so you can close the client and the music keeps on playing; cmus is a standalone client that just reads from the filesystem and URLs and does not daemonize. cmus unfortunately skips and segfaults at times on the latest Debian packaged version, which is of course a few versions back (2.5.0 vs 2.7.0 iirc) and so I'm relying on mocp much more now.

To answer your question more directly, again afaik, mocp is not accessible over MPD (separate daemon altogether) and does not play nicely with Spotify, but I'm not a user, so wouldn't know. Neither is mocp accessible over the network (afaik!).

newsbeuter author here. If you want to develop your own text terminal tools, I can really recommend STFL: http://www.clifford.at/stfl/

Without it, I would have probably been driven crazy when I attempted to put together a UI. It helped me get from an idea to a working prototype really quickly. In the case of newsbeuter, like 2 days.

Consider me suitably humbled. Thanks for a great (the best?) RSS reader.

Much appreciation and thanks for the pointer!

My own project would involve segmenting common office doc formats for translation, saving translations to translation memory (in standard TMX format), attempting to match new segments with pre-translated and perhaps later integrate some project co-working/server functionality. All a little daunting, so all help, such as your pointer, is very welcome!

ncdu: ncurse disk usage (very convenient to see what is consuming too much space)