The PR Stats CLI is a command-line interface tool that you use to get stats about pull requests directly from a command shell.
- Azure DevOps Git
- Support GitHub
- Ability to use multiple accounts
- Ability to use multiple repos
You can install the PR Stats CLI tool from Chocolatey, as a dotnet tool or you can install manually by downloading pre complied version from Releases page.
To install PR Stats CLI using Chocolatey, run the following command from your command line / PowerShell:
choco install prstats-cli
To upgrade PR Stats CLI, run:
choco upgrade prstats-cli
To verify PR Stats CLI was successfully installed:
prstats --version
To install PR Stats CLI as .NET tool:
dotnet tool install --global prstats-cli
To verify PR Stats CLI was successfully installed:
prstats --version
The tool downloads your pull request data and runs commands on the offline data. If you need to update your data see fetch command.
Description:
PR Stats CLI - The CLI tool for pull request stats
Usage:
prstats [command] [options]
Options:
--version Show version information
-?, -h, --help Show help and usage information
Commands:
fetch Gets the latest data from your version controller.
purge Cleans up your version controller settings and pull requests data.
reports Lists all the available reports.
run Gets pull request stats.
setup Runs the wizard to setup your version controller.
Description:
Runs pull request reports.
Usage:
prstats run [options]
Options:
--status <Abandoned|Active|All|Completed> Filter by status. [default: Completed]
--branch <branch> Filter by status. []
--before <before> Filter by date (shows pull requests before and on. Date format must be in
YYYY-MM-DD. []
--after <after> Filter by date (shows pull requests after and on. Date format must be in
YYYY-MM-DD. []
--date-type <Completed|Created> Specify a date type. [default: Completed]
--report-id <report-id> Specify a report id. You can get list of reports by running `reports`
command. []
-?, -h, --help Show help and usage information
Shows results only for active pull requests:
prstats run --status active
Shows results for completed pull requests that are created after Jan 1st, 2024:
prstats run --status completed --date-type created
Description:
Runs the wizard to setup your version controller.
Usage:
prstats setup [options]
Options:
-?, -h, --help Show help and usage information
Description:
Gets the latest data from your version controller.
Usage:
prstats fetch [options]
Options:
-?, -h, --help Show help and usage information
Description:
Lists all the available reports.
Usage:
prstats reports [options]
Options:
-?, -h, --help Show help and usage information
Description:
Cleans up your version controller settings and pull requests data.
Usage:
prstats purge [options]
Options:
--data-only Only deletes the data and not version controller settings. [default: False]
-?, -h, --help Show help and usage information
Purge pull request data and version controller settings:
prstats purge
Purge pull request data:
prstats purge --data-only