plenti icon indicating copy to clipboard operation
plenti copied to clipboard

Style CLI output

Open jimafisk opened this issue 4 years ago • 8 comments

@gustavocd put https://github.com/fatih/color on my radar in https://github.com/plentico/plenti/pull/125

We could make our CLI prints look more visually appealing by adding some color. I'd like to do this in some sort of standardized way if possible.

  • https://github.com/spf13/cobra/issues/692#issuecomment-479631238
  • https://medium.com/@inhereat/terminal-color-rendering-tool-library-support-8-16-colors-256-colors-by-golang-a68fb8deee86

jimafisk avatar Jan 23 '21 20:01 jimafisk

I agree, I think we can start by improving the messages for the different commands and show some feedback like a spinner, then add some colors.

It'd be awesome to have a space to talk about it, maybe a slack channel or something 🤔, a place where we can share our findings.

gustavocd avatar Jan 24 '21 00:01 gustavocd

Good point, better messages to provide users with some guidance is ultimately more important than aesthetics. You've made some great improvements already @gustavocd, so I'm definitely interested in hearing your thoughts. I'm down to chat in slack if we need a better way to share ideas, but for now feel free to brain dump thoughts and links here. If that becomes untenable we can always move the conversation. Thanks!

jimafisk avatar Jan 24 '21 04:01 jimafisk

Emoji support: https://github.com/kyokomi/emoji or https://github.com/enescakir/emoji

Edit: Good point made here: https://www.reddit.com/r/golang/comments/fe21os/emoji_a_minimalistic_emoji_package_for_go/

When do you draw the line between copy pasting an emoji vs using this library

Simple copy/paste

copy

Terminal output

output

jimafisk avatar Jan 25 '21 19:01 jimafisk

Color example from @zaydek: https://github.com/zaydek/retro/blob/master/pkg/term/term.go

jimafisk avatar Feb 06 '21 16:02 jimafisk

https://github.com/charmbracelet/bubbletea

jimafisk avatar Apr 05 '21 22:04 jimafisk

Progress bar option: https://github.com/schollz/progressbar

jimafisk avatar May 08 '21 03:05 jimafisk

ColoredCobra: https://github.com/ivanpirog/coloredcobra

ivanpirog avatar Mar 22 '22 15:03 ivanpirog

Very cool @ivanpirog, thanks!

jimafisk avatar Mar 22 '22 17:03 jimafisk