Get the output of 'git status' from the command line, formatted as JSON or plain text.
Available for macOS, Windows and Linux.
$ npm install --global git-status-cli
$ git-status [--format <output-format>] [--cwd <path>] [--git <path>]
- Parameters
- -f, --format output-format - Output format (Options: json, text)
- -c, --cwd path - Path to Git repository (Example: /home/user/myrepository)
- -g, --git path - Path to Git executable (Example: /usr/bin/git)
$ git-status
>> {
>> "modified": [ "README.md", "lib/index.js" ],
>> "added": [ "LICENSE" ]
>> }
$ git-status-cli --format text
>> modified: README.md, file2
>> added: file3, file4
$ git-status-cli --cwd "/Users/joeqpublic/Documents/myrepository"
>> modified: README.md, file2
>> added: file3, file4
$ git-status-cli --help
$ git-status-cli --version
Tested on:
- macOS Mojave (10.14.6)
- Windows 10 Spring Creators Update
- Ubuntu (18.04)
Read the contribution documentation first.
sidneys 2018