JEG2 / highline

A higher level command-line oriented interface.
Other
1.29k stars 137 forks source link

Please make HighLine beautiful like Yeoman #100

Open FooBarWidget opened 10 years ago

FooBarWidget commented 10 years ago

I discovered Yeoman recently and I'm really impressed by their terminal interface. Yeowman is a scaffold generator similar to "rails generate", but it's general-purpose and written in JavaScript. Their terminal interface:

I feel very good when using Yeoman's interface. I had the feeling that it's very user friendly. I want my users to feel good as well when using my software's interface. So it would be really great if you can make HighLine beautiful as Yeoman.

It's really hard to explain Yeoman's interface. I've posted a screenshot here that gives you some idea of how it works, but for the full experience you should really try it out yourself.

screen shot 2013-12-11 at 10 47 58

For example, when asking for permission to track usage, it first displays a regular Y/n prompt:

====: (Y/n)

Then when you answer "Y", the (Y/n) is erased and replaced with a colored Yes string, as the one you see in the screenshot.

When asking which modules to choose, the menu there actually supports the arrow keys! You can press Up and Down, and the menu chooser arrow will go up and down, and the text "Press to select" will disappear. When you press space, the filled bullet will become a hollow bullet.

These kinds of subtle things make the terminal feel modern again.

Yeoman uses the Inquirer library for implementing most of its interface. Inquirer is a bit like HighLine. Under the hood, Inquirer uses cli-color for terminal color formatting and basic cursor moving, and readline for text prompts.

JEG2 commented 10 years ago

I'm not against these ideas. I would support pull requests that made these changes.

ezekg commented 9 years ago

Has anybody made any progress on this? If not, anybody want to help me tackle it?

maxlinc commented 9 years ago

I don't have time to try to implement something right now, but if you take a stab I'd be happy to help review and provide feedback.

I'm not sure this'll be useful, but here's some code from when I was playing around trying to do something similar w/ Thor: https://github.com/maxlinc/pacto/blob/simulator/lib/pacto/cli/selector.rb

JEG2 commented 9 years ago

We are currently planning the next major version of HighLine. We will include a discussion of this issue in the plans we make for that release.

donaldguy commented 9 years ago

A lot of the Yoeman features are available in inquirer.rb based on the inquirer.js used by Yoeman

JEG2 commented 9 years ago

This is very interesting. inquirer.rb looks like a HighLine competitor. I wasn't aware of it. Thanks for sharing.

brancz commented 9 years ago

:+1: on interactive inputs, (Y/n) for agree and [default] for defaults to be closer to conventions everywhere else for CLIs