TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Good examples of interactive command-line user experience?

79 点作者 noshbrinken大约 8 年前
What are good examples of interactive TUI/CLI user experience? I'm looking for nice layouts, use of ASCII color, interaction patterns, nicely written help text, etc.

37 条评论

git-pull大约 8 年前
Yes, tmux.<p>- tmux counts as a TUI UX. it is backed by ncurses (<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Ncurses" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Ncurses</a>)<p>- colors: it supports 256 colors, 24bit colors landed in 2.2 (but haven&#x27;t used it)<p>- layouts: 1) supports splitting multiple command lines into &quot;panes&quot; which are resizable 2) supports custom layouts and arrangements for panes 3) you can &quot;zoom&quot; in on panes via `C-b z` 4) you can actually run other TUI applications within it<p>- interaction: 1) tmux also forks itself into a server in the background so you can de&#x2F;re-attach your workspace 2) you can create and move between collections of panes, what tmux calls &quot;windows&quot; 3) command-based, so configuration via ~&#x2F;.tmux.conf uses the same language as scripting 4) tmux can be scripted &#x2F; remote controlled, you can even send-keys and copy the contents of panes<p>- help: the tmux manual is superb (<a href="https:&#x2F;&#x2F;www.freebsd.org&#x2F;cgi&#x2F;man.cgi?query=tmux" rel="nofollow">https:&#x2F;&#x2F;www.freebsd.org&#x2F;cgi&#x2F;man.cgi?query=tmux</a>)<p>Downsides are, I still get glitchy issues when using vim &#x2F; unicode &#x2F; colors in tmux panes which are difficult to diagnose. `reset` normally fixes it. It&#x27;s been this way for years, and I don&#x27;t want to even begin figuring out what the hell is happening because I&#x27;m using too many plugins. Considering starting from scratch. So if you get into tmux&#x2F;vim&#x2F;other CLI stuff, the simpler you keep your config, the better off you&#x27;ll be.<p>(P.S. I am the author of <i>The Tao of tmux</i>, a book you can read free online)
neovintage大约 8 年前
I would recommend that you check out the Heroku CLI Style Guide: <a href="https:&#x2F;&#x2F;devcenter.heroku.com&#x2F;articles&#x2F;cli-style-guide" rel="nofollow">https:&#x2F;&#x2F;devcenter.heroku.com&#x2F;articles&#x2F;cli-style-guide</a><p>There are many different teams within Heroku that need to provide interactions for developers via CLI whether its for dynos or data services. The guide was a way to codify building a consistent interaction that all product managers and engineers could follow. Disclaimer: I work for heroku.
评论 #14401330 未加载
评论 #14401226 未加载
gumby大约 8 年前
The symbolics accept&#x2F;present system (part of Dynamic Windows). Unfortunately if you haven&#x27;t used it, all I couldn&#x27;t find was Gene Ciccarellis&#x27; PhD thesis: <a href="https:&#x2F;&#x2F;dspace.mit.edu&#x2F;bitstream&#x2F;handle&#x2F;1721.1&#x2F;6946&#x2F;AITR-794.pdf" rel="nofollow">https:&#x2F;&#x2F;dspace.mit.edu&#x2F;bitstream&#x2F;handle&#x2F;1721.1&#x2F;6946&#x2F;AITR-794...</a><p>Basically: Lisp supports idempotent type-based printing (print something in a form that can be read back to identify the same object -- basically unremarkable these days; consider python&#x27;s __repr__ and __string__) as well as human-friendly printing.<p>The presentation system was remarkable in that when you printed an object it printed in the user-friendly form, but when the text was read back the IO system knew what the object was and so acted as if a machine-readable representation had been printed. It also used the type hierarchy to support mouse action in &quot;ordinary&quot; text, thus if you needed a SHAPE object, the mouse would highlight &quot;Square at 4,4&quot; and &quot;Circle centred at 5,5, radius 7&quot; as if it were #&lt;CIRCLE 5,5, r=7&gt;. In fact the &quot;printed&quot; representation need not be textual.<p>Also BSD4.1 sh is quite good one !:... and ^...^ etc were added.<p>As a side note, IIRC Emacs started out as Ciccarelli&#x27;s TECO init file around &#x27;75&#x2F;76 or so.
评论 #14403842 未加载
sonofgod大约 8 年前
It&#x27;s a terrible idea, but an excellent example of experience:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;nvbn&#x2F;thefuck" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nvbn&#x2F;thefuck</a><p>[TL;DR -- typo a command, type &#x27;fuck&#x27;, will run the command you should have run]
评论 #14403587 未加载
评论 #14401313 未加载
zie大约 8 年前
There was a talk at Pycon 2017 about this [0] that&#x27;s pretty good. He(amjith) goes through several examples with his favorite being bpython [1] and even covers writing such a thing in python live on stage.<p>[0] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=hJhZhLg3obk" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=hJhZhLg3obk</a> [1] <a href="https:&#x2F;&#x2F;bpython-interpreter.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bpython-interpreter.org&#x2F;</a>
评论 #14403687 未加载
评论 #14401517 未加载
czak大约 8 年前
I&#x27;m constantly impressed by fzf (<a href="https:&#x2F;&#x2F;github.com&#x2F;junegunn&#x2F;fzf" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;junegunn&#x2F;fzf</a>). I use it both from the shell (for files and command history) as well as a fuzzy finder in vim. I greatly enjoy the speed and intuitiveness.
jszymborski大约 8 年前
There&#x27;s mapscii[0], which was on HN a little while ago. Easily the coolest console experience I&#x27;ve ever had.<p>You can check it out by running &quot;telnet mapscii.me&quot;<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;rastapasta&#x2F;mapscii" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rastapasta&#x2F;mapscii</a>
xiaq大约 8 年前
Shameless plug: Elvish (<a href="https:&#x2F;&#x2F;github.com&#x2F;elves&#x2F;elvish" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;elves&#x2F;elvish</a>) is a shell with a rich UI.<p>The idea of enriching shell&#x27;s UI is not new though, zsh and fish are both prior arts.
romdev大约 8 年前
Telemate BBS client was a great example of a windowed TUI in the style of DESQView. You could have a chat window, a DOS terminal and an ANSI terminal all open at the same time. Overlayed dialog boxes were framed, resizable and movable within the window. Scripting was supported in chat and terminal windows to navigate through menus or to type &quot;^H^H^H^Hsexy beast&quot; any time your name comes through the chat. Another favorite of mine, Vern Buerg&#x27;s List.com, was far better than Norton Commander or the MC clone, in my opinion. As a multi-column file viewer&#x2F;manager, it maximized the number of files displayed onscreen and allowed simple file operations from a keystroke. By using a hex editor you could change the viewer and external editors. It was also written in 8086 assembly and was very fast.
zeveb大约 8 年前
I think that gnus &amp; magit are pretty good.<p>Gnus is a full-featured news, email &amp; RSS reader (and others too maybe?). I&#x27;ve used it for most of my life.<p>Magit is a full-featured git UI, good enough that I don&#x27;t bother using git from the command line anymore.
malkia大约 8 年前
for the TUI - aptitude, midnight commander, back in the days the Turbo Vision was awesome, which I think has some ports for Linux.<p>I&#x27;m constant midnight commander (linux&#x2F;osx), FAR commander (windows) user. I&#x27;m so glad that it works flawlessly almost anywhere there is terminal support...
gabrielcsapo大约 8 年前
I like npm-check <a href="https:&#x2F;&#x2F;github.com&#x2F;dylang&#x2F;npm-check" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dylang&#x2F;npm-check</a> it has a really useful and easy to use UI, on of the nicest terminal UI driven applications I have used.<p>Edited: to use TUI instead of CLI
评论 #14401139 未加载
niftich大约 8 年前
Midnight Commander and its spiritual predecessors going all the way back to Norton Commander and Volkov Commander are marvellous examples of TUI.<p>They&#x27;re intuitive, interactive, come with embedded help, and use text mode to present a sophisticated, productive interface.
评论 #14403217 未加载
yourapostasy大约 8 年前
Tangentially-related: check out Vermont Views [1], a complete TUI development solution. I wish they open sourced it before they exited the market, or re-entered the market for IOT&#x2F;embedded developers. I&#x27;ve never found a comparable open source effort, though here&#x27;s to hoping the Blessed project for node.js takes inspiration from Vermont Views for future directions.<p>[1] <a href="http:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20091011010412&#x2F;http:&#x2F;&#x2F;www.vtsoft.com&#x2F;vcsproducts&#x2F;vviews.html" rel="nofollow">http:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20091011010412&#x2F;http:&#x2F;&#x2F;www.vtsoft....</a>
odammit大约 8 年前
Serverless (<a href="https:&#x2F;&#x2F;serverless.com" rel="nofollow">https:&#x2F;&#x2F;serverless.com</a>) has a nice experience. I believe it is built using inquirer.js (<a href="https:&#x2F;&#x2F;github.com&#x2F;SBoudrias&#x2F;Inquirer.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;SBoudrias&#x2F;Inquirer.js</a>)<p>I&#x27;ve recently built an internal tool with inquirer and it was a really nice development and user experience. I haven&#x27;t figured out the best way to test the interactions though.<p>termUI in go is also nice if you need graphing and viz for a dashboard like command line.
评论 #14401217 未加载
评论 #14401168 未加载
gglitch大约 8 年前
- Emacs&#x27; Magit<p>- moc (Music on Console)
rdavis大约 8 年前
I highly recommend ranger[0]. It&#x27;s a very useful console based file manager with great vi key bindings.<p>The configuration is also very flexible and includes a python API to write your own commands[1].<p>[0] <a href="http:&#x2F;&#x2F;ranger.nongnu.org" rel="nofollow">http:&#x2F;&#x2F;ranger.nongnu.org</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;ranger&#x2F;ranger&#x2F;wiki&#x2F;Commands" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ranger&#x2F;ranger&#x2F;wiki&#x2F;Commands</a>
andrewf大约 8 年前
I&#x27;d look at old DOS applications - the last mass market (i.e. not just technical users) for non-GUI apps. Although towards they end, they were often just aping Windows GUIs as well as they could (see <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;IBM_Common_User_Access" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;IBM_Common_User_Access</a> )
j_s大约 8 年前
ncdu | <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Ncdu" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Ncdu</a>
falcolas大约 8 年前
`parted` is pretty good, in an old-school way.<p>The only thing I&#x27;d personally ask for is if you offer an interactive interface, make sure you can execute the exact same commands on the plain CLI. Also (yeah, two things) support --help and --version (as well as -h and -v) out of the box.<p>Color, layouts (other than those required for readability), and other things just don&#x27;t really matter as much, IMO.
dduarte大约 8 年前
<a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=hJhZhLg3obk" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=hJhZhLg3obk</a> &quot;Amjith Ramanujam Awesome Command Line Tools PyCon 2017&quot; goes through some nice examples: mycli, pgcli, fish shell and few others
nicoburns大约 8 年前
The `micro` test editor is fantastic. GUI-standard keyboard shortcuts. Mouse support. Ability to execute commands while editing test.<p><a href="https:&#x2F;&#x2F;micro-editor.github.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;micro-editor.github.io&#x2F;</a>
dennyabraham大约 8 年前
The dbcli suite (pgcli, mycli) provide a great user experience on the command line that even some gui database tools don&#x27;t match up to.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;dbcli" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dbcli</a>
Jaepa大约 8 年前
While it mostly piggy backs on ag, I think tag (<a href="https:&#x2F;&#x2F;github.com&#x2F;aykamko&#x2F;tag" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;aykamko&#x2F;tag</a>) has one of the best UX workflows I&#x27;ve seen.
odammit大约 8 年前
Oh and don&#x27;t forget figlet when you need that dope ASCII logo banner.
vram22大约 8 年前
The FreePascal TUI is good, IMO. So was Turbo Pascal, back in the day. Both are very fast, get out of your way (IMO) and also look(ed) good. Okay, TP not so much :), but not bad either.
winterbe大约 8 年前
Jest is pretty neat: <a href="https:&#x2F;&#x2F;facebook.github.io&#x2F;jest&#x2F;" rel="nofollow">https:&#x2F;&#x2F;facebook.github.io&#x2F;jest&#x2F;</a>
grovegames大约 8 年前
yeoman is pretty good. It gives the option of interactive or command line. Reasonable use of colour, with some layout formatting. Dynamic options.
TheAceOfHearts大约 8 年前
The first tool that came to mind for me was htop [0] with ncurses. It&#x27;s a friendly alternative to top.<p>I&#x27;ve previously used ncmpcpp [1] without any major complaints, although it&#x27;s been a few years since then. It&#x27;s an mpd [2] client written with ncurses.<p>On my personal servers I use goaccess [3] to analyze access logs. I remember being able to pick it up pretty quickly on my first try.<p>Only tangentially related, but you may find it useful to read the &quot;Utility Conventions&quot; [4] entry of The Open Group Base Specifications. I&#x27;d also suggest reading through the relevant entries under the &quot;Program Behavior for All Programs&quot; [5] section of GNU Coding Standards [6]. By following existing conventions (or even being aware they exist) you can sometimes make it easier for others to learn how to use your tool.<p>If you know JavaScript, you may consider writing your program with node. The blessed [7] library is a JavaScript reimplementation of ncurses, and there&#x27;s even a react renderer [8]. This makes building the UI much easier than many of the alternatives I know. When you&#x27;re ready to release, you can generate an executable [9] for easy deployment or publication. The biggest benefits of taking this approach are that it makes it very easy to achieve cross-platform support, and the barrier of entry is lower than many alternatives. The biggest caveats are that it&#x27;ll be slower and much larger than if it had been written with C.<p>[0] <a href="http:&#x2F;&#x2F;hisham.hm&#x2F;htop&#x2F;" rel="nofollow">http:&#x2F;&#x2F;hisham.hm&#x2F;htop&#x2F;</a><p>[1] <a href="http:&#x2F;&#x2F;rybczak.net&#x2F;ncmpcpp&#x2F;screenshots&#x2F;" rel="nofollow">http:&#x2F;&#x2F;rybczak.net&#x2F;ncmpcpp&#x2F;screenshots&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;www.musicpd.org" rel="nofollow">https:&#x2F;&#x2F;www.musicpd.org</a><p>[3] <a href="https:&#x2F;&#x2F;goaccess.io" rel="nofollow">https:&#x2F;&#x2F;goaccess.io</a><p>[4] <a href="http:&#x2F;&#x2F;pubs.opengroup.org&#x2F;onlinepubs&#x2F;9699919799&#x2F;xrat&#x2F;V4_xbd_chap12.html#tag_21_12" rel="nofollow">http:&#x2F;&#x2F;pubs.opengroup.org&#x2F;onlinepubs&#x2F;9699919799&#x2F;xrat&#x2F;V4_xbd_...</a><p>[5] <a href="https:&#x2F;&#x2F;www.gnu.org&#x2F;prep&#x2F;standards&#x2F;html_node&#x2F;Program-Behavior.html" rel="nofollow">https:&#x2F;&#x2F;www.gnu.org&#x2F;prep&#x2F;standards&#x2F;html_node&#x2F;Program-Behavio...</a><p>[6] <a href="https:&#x2F;&#x2F;www.gnu.org&#x2F;prep&#x2F;standards&#x2F;html_node&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;www.gnu.org&#x2F;prep&#x2F;standards&#x2F;html_node&#x2F;index.html</a><p>[7] <a href="https:&#x2F;&#x2F;github.com&#x2F;chjj&#x2F;blessed" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;chjj&#x2F;blessed</a><p>[8] <a href="https:&#x2F;&#x2F;github.com&#x2F;Yomguithereal&#x2F;react-blessed" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Yomguithereal&#x2F;react-blessed</a><p>[9] <a href="https:&#x2F;&#x2F;github.com&#x2F;zeit&#x2F;pkg" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;zeit&#x2F;pkg</a>
评论 #14403343 未加载
dbkaplun大约 8 年前
slap[0] (the terminal-based text editor) was designed to emulate Sublime&#x27;s UX within the terminal. It has a shallower learning curve than other command line editors.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;slap-editor&#x2F;slap" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;slap-editor&#x2F;slap</a>
Grom_PE大约 8 年前
Far Manager is my favorite TUI and is the primary reason I haven&#x27;t switched over to Linux yet.
txdv大约 8 年前
tig is pretty solid
评论 #14401584 未加载
评论 #14407348 未加载
skocznymroczny大约 8 年前
Turbo Pascal 7.0
type0大约 8 年前
terminal_velocity
swah大约 8 年前
darcs
type0大约 8 年前
dockly
souenzzo大约 8 年前
git
评论 #14401185 未加载
评论 #14401307 未加载
评论 #14401141 未加载