Skip to main content
cli as a tag isn't clear.
Link
JohnGB
  • 68.6k
  • 26
  • 185
  • 297
Tweeted twitter.com/#!/StackUX/status/131465391674372096
edited tags
Link
Zelda
  • 41k
  • 10
  • 114
  • 183
Source Link

Can I optimize this command-line interface?

I am designing a command-line interface for users and administrators to interact with an online radio system. One of the administrator tasks is assigning songs and albums to various genres. This is the general format of the command I designed for this task:

> command-name action object-class object-id target-genre

In this particular case:

  • command-name is manage-genre
  • action can be one of show, add, drop, reset
  • object-class is either song or album; operating on an album is a shortcut for operating on every song in the album
  • object-id is a unique numeric identifier for the song or album; it can be obtained through other commands
  • target-genre is the genre to apply to the song or album

An example in context might be:

> manage-genre add song 12345 "Vocal"

Is there a best practice for how to order the arguments in this command? Is there a more natural way to do it? Can you point me to any literature on designing useful command-line interfaces?