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

pi-bitbucket

v1.1.0

Published

Bitbucket Cloud integration for Pi — repos, PRs, branches, pipelines, and issues

Readme

pi-bitbucket

Bitbucket Cloud integration for Pi. Manage repositories, pull requests, branches, pipelines, and issues — all from within your coding agent.

Install

pi install npm:pi-bitbucket

Or try it without installing:

pi -e npm:pi-bitbucket

Setup

1. Create a Bitbucket API Token

Go to Bitbucket API Tokens and create a token with these permissions:

  • Repositories: Read, Write
  • Pull Requests: Read, Write
  • Pipelines: Read, Write
  • Issues: Read, Write

2. Configure

On first run, pi-bitbucket scaffolds a config file at .pi/bitbucket.json. Fill in your credentials:

{
  "workspace": "my-workspace",
  "username": "my-username",
  "apiToken": "ATBBxxxxxxxxxxxx",
  "defaultRepo": "my-repo",
  "readOnly": false
}

Upgrading from v1.0? The appPassword field still works but is deprecated. Rename it to apiToken when convenient.

Config is loaded from (first match wins):

| Location | Scope | |----------|-------| | .pi/bitbucket.json | Project | | ~/.pi/agent/bitbucket.json | Global | | Environment variables | Global |

Environment Variables

Instead of a JSON file, set:

export BITBUCKET_WORKSPACE=my-workspace
export BITBUCKET_USERNAME=my-username
export BITBUCKET_API_TOKEN=ATBBxxxxxxxxxxxx
export BITBUCKET_DEFAULT_REPO=my-repo      # optional
export BITBUCKET_READ_ONLY=true            # optional

ENV References

Config values can reference environment variables with the ENV: prefix:

{
  "workspace": "my-workspace",
  "username": "ENV:BB_USER",
  "apiToken": "ENV:BB_API_TOKEN"
}

Read-Only Mode

Set "readOnly": true to block write operations (create PR, merge, approve, comment, trigger pipeline, create issue). Useful for shared environments or CI.

Actions

All 16 actions are available via the bitbucket tool. If repo is omitted, defaultRepo from config is used.

Repositories

| Action | Parameters | Description | |--------|-----------|-------------| | list_repos | page? | List all repositories in the workspace | | get_repo | repo? | Get detailed repository info |

Pull Requests

| Action | Parameters | Description | |--------|-----------|-------------| | list_prs | repo?, state?, page? | List pull requests. State: OPEN, MERGED, DECLINED, SUPERSEDED | | get_pr | repo?, pr_id | Get PR details including diff stats, reviewers, approvals | | create_pr | repo?, title, source_branch, destination_branch?, description?, close_source? | Create a pull request | | merge_pr | repo?, pr_id, merge_strategy?, close_source? | Merge a PR. Strategy: merge_commit, squash, fast_forward | | decline_pr | repo?, pr_id | Decline a pull request | | approve_pr | repo?, pr_id | Approve a pull request | | comment_pr | repo?, pr_id, comment | Add a comment to a pull request |

Branches

| Action | Parameters | Description | |--------|-----------|-------------| | list_branches | repo?, page? | List branches sorted by most recent commit |

Pipelines

| Action | Parameters | Description | |--------|-----------|-------------| | list_pipelines | repo?, page? | List recent pipelines | | get_pipeline | repo?, pipeline_uuid | Get pipeline details and status | | trigger_pipeline | repo?, target_branch | Trigger a pipeline on a branch |

Issues

| Action | Parameters | Description | |--------|-----------|-------------| | list_issues | repo?, state?, page? | List issues. State: new, open, resolved, on hold, invalid, duplicate, wontfix, closed | | get_issue | repo?, issue_id | Get issue details | | create_issue | repo?, title, description?, kind?, priority? | Create an issue. Kind: bug, enhancement, proposal, task. Priority: trivial, minor, major, critical, blocker |

Prompt Templates

Use these built-in prompt templates in Pi:

  • /pr-review <pr_id> — Review a pull request for bugs, security issues, and code quality
  • /repo-overview — Get a comprehensive overview of the repository

Skills

The bitbucket skill teaches the agent how to use the Bitbucket tool effectively. It's loaded automatically when Pi detects a Bitbucket-related task.

Package Contents

pi-bitbucket/
├── extensions/
│   └── bitbucket.ts       # Extension: tool, config, API client, TUI rendering
├── skills/
│   └── bitbucket/
│       └── SKILL.md        # Agent skill for Bitbucket workflows
├── prompts/
│   ├── pr-review.md        # PR review prompt template
│   └── repo-overview.md    # Repository overview prompt template
├── package.json
├── LICENSE
└── README.md

License

MIT