git2json icon indicating copy to clipboard operation
git2json copied to clipboard

Update cli to accept path(s) as arguments

Open fielding opened this issue 5 years ago • 0 comments

This implements and resolves #7 as discussed in the comments of that issue. :smile:

Incidentally, it also implements a basic structure for cli options to be added in the future and a 'help menu' displayed by -h or --help flag.

Sample --help display

Usage: git2json [-h | --help] [--version] [<path>...]

Options:
  --help, -h  print this help message                                  [boolean]
  --version   print the version number                                [boolean]

Examples:
  git2json                                            run git2json on current directory
  git2json ~/src/hack/git2json            run git2json on specified path
  git2json ~/etc ~/src/hack/git2json  run git2json on multiple paths

I wasn't sure what to put by the description of each usage example or how to word it. We can change that easily though.

Let me know if any changes are needed!

Happy Hacking, Fielding

fielding avatar Oct 11 '18 16:10 fielding