New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

pi-bitbucket

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pi-bitbucket

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

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

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):

LocationScope
.pi/bitbucket.jsonProject
~/.pi/agent/bitbucket.jsonGlobal
Environment variablesGlobal

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

ActionParametersDescription
list_repospage?List all repositories in the workspace
get_reporepo?Get detailed repository info

Pull Requests

ActionParametersDescription
list_prsrepo?, state?, page?List pull requests. State: OPEN, MERGED, DECLINED, SUPERSEDED
get_prrepo?, pr_idGet PR details including diff stats, reviewers, approvals
create_prrepo?, title, source_branch, destination_branch?, description?, close_source?Create a pull request
merge_prrepo?, pr_id, merge_strategy?, close_source?Merge a PR. Strategy: merge_commit, squash, fast_forward
decline_prrepo?, pr_idDecline a pull request
approve_prrepo?, pr_idApprove a pull request
comment_prrepo?, pr_id, commentAdd a comment to a pull request

Branches

ActionParametersDescription
list_branchesrepo?, page?List branches sorted by most recent commit

Pipelines

ActionParametersDescription
list_pipelinesrepo?, page?List recent pipelines
get_pipelinerepo?, pipeline_uuidGet pipeline details and status
trigger_pipelinerepo?, target_branchTrigger a pipeline on a branch

Issues

ActionParametersDescription
list_issuesrepo?, state?, page?List issues. State: new, open, resolved, on hold, invalid, duplicate, wontfix, closed
get_issuerepo?, issue_idGet issue details
create_issuerepo?, 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

Keywords

pi-package

FAQs

Package last updated on 25 Mar 2026

Related posts