CLI for interacting with Bitbucket Server
Last updated 2 years ago by tclindner .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bitbucket-server-cli 
SYNC missed versions from official npm registry.


CLI for interacting with Bitbucket Server

license npm Travis Dependency Status devDependency Status

What is bitbucket-server-cli?

bitbucket-server-cli helps you quickly scan your Bitbucket repositories. Currently it can:

  • Audit permissions to ensure all of your repositories are configured similarly
  • Finds stale pull requests
  • Compiles statistics about pull requests

How do I install?

First thing first, let's make sure you have the necessary pre-requisites.

System Dependencies



  • npm install bitbucket-server-cli -g

Set environment variables

Set the following environment variables:

  • BITBUCKET_USERNAME, ex: username
  • BITBUCKET_PASSWORD, ex: password

Commands and configuration

NOTE: You will need ADMIN permissions to each project/repo you are auditing.

Global Options

Option Alias Description
bitbucket-server-cli --help bitbucket-server-cli -h Lists supported CLI options
bitbucket-server-cli --version bitbucket-server-cli -v Lists the current version number
bitbucket-server-cli --projects bitbucket-server-cli -p Comma separated list of Bitbucket project keys


bitbucket-server-cli audit-permissions

Audits permissions

Alias: ap

Permissions README

Examples bitbucket-server-cli -p "MYPROJECTKEY,MYPROJECTKEY2" -c "./permissionsConfig.json" audit-permissions

bitbucket-server-cli -p "MYPROJECTKEY,MYPROJECTKEY2" -c "./permissionsConfig.json" ap

Please see the Permissions README for additional examples.

bitbucket-server-cli stale-prs

Fetches a list of stale pull requests

Alias: sp


Examples bitbucket-server-cli -p "MYPROJECTKEY,MYPROJECTKEY2" -s "30 days" stale-prs

bitbucket-server-cli -p "MYPROJECTKEY,MYPROJECTKEY2" -s "30 days" sp

Please see the Stale PRs README for additional examples.

bitbucket-server-cli pr-stats

Fetch PRs stats

Alias: s

Pull Request Stats README

Examples bitbucket-server-cli -p "MYPROJECTKEY,MYPROJECTKEY2" -r "30 days" pr-stats

bitbucket-server-cli -p "MYPROJECTKEY,MYPROJECTKEY2" -r "30 days" s

Please see the Pull Request Stats README for additional examples.


Please see

Release History

Please see


Copyright (c) 2017-2018 Thomas Lindner. Licensed under the MIT license.

Current Tags

  • 0.4.0                                ...           latest (2 years ago)

6 Versions

  • 0.4.0                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 6
Dependencies (10)
Dev Dependencies (10)
Dependents (0)

Copyright 2014 - 2016 © |