npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pilatos/bitbucket-cli

v1.21.0

Published

A command-line interface for Bitbucket Cloud

Downloads

1,196

Readme


At a glance

  • Stay in the terminal for repo, PR, and snippet workflows
  • JSON output for scripting and automation
  • Auto-detects workspace and repo from your git directory

Install

Requires: Bun runtime 1.0 or higher. The CLI is installed via npm but runs on the Bun runtime — Node.js is not supported.

  1. Install Bun (if bun --version fails):

    curl -fsSL https://bun.sh/install | bash
  2. Install the CLI:

    npm install -g @pilatos/bitbucket-cli
    bb --version
  3. Tab completion (optional, recommended):

    bb completion install

    Then restart your shell.


Quick Start

bb auth login
bb repo clone myworkspace/myrepo
bb pr list

Common Commands

bb repo list
bb pr create --title "Add feature"
bb pr approve 42
bb browse 42                  # open PR #42 in your browser
bb browse src/cli.ts:20       # open a file at a specific line
bb api /user                  # call any Bitbucket API endpoint (escape hatch)
bb config set defaultWorkspace myworkspace

Global options (work on every command): --json [fields], --jq, --no-color, --no-unicode, --no-truncate, --limit, --all, --locale, -w, --workspace, -r, --repo. Full reference: Global Flags.

Scripting with --json and --jq

--json accepts an optional comma-separated field list to project the output, and --jq filters the JSON in-process (no external jq binary required):

# Project to specific fields
bb pr list --json id,title,state

# Filter through built-in jq
bb pr list --json --jq '.pullRequests[] | select(.state == "OPEN") | .title'

See JSON Output and the Scripting guide for more.


Docs

Full documentation: bitbucket-cli.paulvanderlei.com


Authentication

Note: Bitbucket app passwords are deprecated (new ones can no longer be created). Use OAuth or API tokens instead.


Environment Variables

| Variable | Description | | --------------- | ---------------------------------------------------------------------- | | BB_USERNAME | Bitbucket username (fallback for bb auth login) | | BB_API_TOKEN | Bitbucket API token (fallback for bb auth login; for CI) | | BB_WORKSPACE | Default workspace; overrides defaultWorkspace config | | BB_LOCALE | BCP-47 locale for date/time formatting (e.g. de-DE); --locale wins | | BB_NO_UNICODE | Use ASCII fallbacks for symbols when set (any non-empty value) | | DEBUG | Enable HTTP debug logging — must equal exactly true | | NO_COLOR | Disable color output when set | | FORCE_COLOR | Force color output when set (and not 0) |

Full reference: Environment variables.


Contributing

Read the Contributing Guide to get started.


Acknowledgments


License

MIT License - see LICENSE for details.