@pilatos/bitbucket-cli 1.6.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +35 -168
  2. package/dist/index.js +881 -812
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  <p align="center">
2
- <img src="https://upload.wikimedia.org/wikipedia/commons/0/0e/Bitbucket-blue-logomark-only.svg" alt="Bitbucket Logo" width="80" height="80">
2
+ <img src="docs/public/favicon.svg" alt="Bitbucket CLI logo" width="80" height="80">
3
3
  </p>
4
4
 
5
5
  <h1 align="center">Bitbucket CLI</h1>
6
6
 
7
7
  <p align="center">
8
- <strong>A powerful command-line interface for Bitbucket Cloud</strong>
8
+ <strong>Fast, scriptable CLI for Bitbucket Cloud</strong>
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <em>Inspired by GitHub's <code>gh</code> CLI bringing the same great experience to Bitbucket</em>
12
+ <em>Inspired by GitHub's <code>gh</code> CLI - the same great experience for Bitbucket</em>
13
13
  </p>
14
14
 
15
15
  <p align="center">
@@ -19,6 +19,15 @@
19
19
  <a href="https://github.com/0pilatos0/bitbucket-cli/issues"><img src="https://img.shields.io/github/issues/0pilatos0/bitbucket-cli.svg?style=flat-square" alt="GitHub issues"></a>
20
20
  </p>
21
21
 
22
+ <p align="center">
23
+ <sub>
24
+ <a href="https://bitbucket-cli.paulvanderlei.com">Docs</a> ·
25
+ <a href="https://bitbucket-cli.paulvanderlei.com/getting-started/quickstart/">Quick Start</a> ·
26
+ <a href="https://bitbucket-cli.paulvanderlei.com/commands/auth/">Command Reference</a> ·
27
+ <a href="https://github.com/0pilatos0/bitbucket-cli/issues">Issues</a>
28
+ </sub>
29
+ </p>
30
+
22
31
  <p align="center">
23
32
  <sub>
24
33
  <strong>Note:</strong> This is an <strong>unofficial</strong>, community-maintained CLI tool.<br>
@@ -28,206 +37,74 @@
28
37
 
29
38
  ---
30
39
 
31
- ## Why Bitbucket CLI?
40
+ ## At a glance
32
41
 
33
- If you've used GitHub's `gh` CLI and loved it, you've probably wished for something similar for Bitbucket. **Now you have it.**
34
-
35
- - **Stay in your terminal** No more context-switching to the browser
36
- - **Automate your workflow** — Script common operations with JSON output
37
- - **Work faster** — Clone repos, create PRs, and manage code reviews in seconds
38
- - **Smart context detection** — Automatically detects workspace/repo from git directory
42
+ - Stay in the terminal for repo and PR workflows
43
+ - JSON output for scripting and automation
44
+ - Auto-detects workspace and repo from your git directory
39
45
 
40
46
  ---
41
47
 
42
- ## Installation
48
+ ## Install
43
49
 
44
50
  ```bash
45
51
  npm install -g @pilatos/bitbucket-cli
46
52
  ```
47
53
 
48
- Verify installation:
49
-
50
54
  ```bash
51
55
  bb --version
52
56
  ```
53
57
 
54
- > **Requirements:** [Bun](https://bun.sh) runtime 1.0 or higher (Node.js is not supported)
58
+ > **Requires:** [Bun](https://bun.sh) runtime 1.0 or higher (Node.js is not supported)
55
59
 
56
60
  ---
57
61
 
58
62
  ## Quick Start
59
63
 
60
64
  ```bash
61
- # 1. Authenticate with Bitbucket
62
65
  bb auth login
63
-
64
- # 2. Clone a repository
65
66
  bb repo clone myworkspace/myrepo
66
- cd myrepo
67
-
68
- # 3. Create a feature branch and make changes
69
- git checkout -b feature/awesome-feature
70
-
71
- # 4. Create a pull request
72
- bb pr create --title "Add awesome feature"
73
-
74
- # 5. List open pull requests
75
67
  bb pr list
76
68
  ```
77
69
 
78
70
  ---
79
71
 
80
- ## Features
81
-
82
- | Category | Commands |
83
- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
84
- | **Authentication** | `login`, `logout`, `status`, `token` |
85
- | **Repositories** | `clone`, `create`, `list`, `view`, `delete` |
86
- | **Pull Requests** | `create`, `list`, `view`, `activity`, `checks`, `edit`, `merge`, `approve`, `decline`, `ready`, `checkout`, `diff`, `comment`, `comments`, `reviewers` |
87
- | **Configuration** | `get`, `set`, `list` |
88
- | **Shell Completion** | `install`, `uninstall` |
72
+ ## Common Commands
89
73
 
90
- **Global Options:**
74
+ ```bash
75
+ bb repo list
76
+ bb pr create --title "Add feature"
77
+ bb pr approve 42
78
+ bb config set defaultWorkspace myworkspace
79
+ ```
91
80
 
92
- - `--json` Output results as JSON for scripting
93
- - `-w, --workspace` — Specify workspace
94
- - `-r, --repo` — Specify repository
81
+ **Global options:** `--json`, `--no-color`, `-w, --workspace`, `-r, --repo`
95
82
 
96
83
  ---
97
84
 
98
- ## Documentation
85
+ ## Docs
99
86
 
100
- Full documentation is available at **[bitbucket-cli.paulvanderlei.com](https://bitbucket-cli.paulvanderlei.com)**
87
+ Full documentation: **[bitbucket-cli.paulvanderlei.com](https://bitbucket-cli.paulvanderlei.com)**
101
88
 
102
89
  - [Quick Start Guide](https://bitbucket-cli.paulvanderlei.com/getting-started/quickstart/)
103
90
  - [Command Reference](https://bitbucket-cli.paulvanderlei.com/commands/auth/)
104
- - [Scripting & Automation](https://bitbucket-cli.paulvanderlei.com/guides/scripting/)
105
- - [CI/CD Integration](https://bitbucket-cli.paulvanderlei.com/guides/cicd/)
106
- - [Troubleshooting](https://bitbucket-cli.paulvanderlei.com/help/troubleshooting/)
107
- - [FAQ](https://bitbucket-cli.paulvanderlei.com/help/faq/)
91
+ - [Guides](https://bitbucket-cli.paulvanderlei.com/guides/scripting/) (Scripting, CI/CD)
92
+ - [Help](https://bitbucket-cli.paulvanderlei.com/help/troubleshooting/) (Troubleshooting, FAQ)
108
93
 
109
94
  ---
110
95
 
111
96
  ## Authentication
112
97
 
113
- The CLI uses **Bitbucket API Tokens** for secure authentication.
98
+ - Create a token: [Bitbucket API Tokens](https://bitbucket.org/account/settings/api-tokens/)
99
+ - Authenticate: `bb auth login`
114
100
 
115
- > **Note**: As of September 9, 2025, Bitbucket app passwords are deprecated. Use API tokens instead.
116
-
117
- ### Create an API Token
118
-
119
- 1. Go to [Bitbucket API Tokens](https://bitbucket.org/account/settings/api-tokens/)
120
- 2. Click **"Create API token"**
121
- 3. Select required scopes (Account, Repositories, Pull requests)
122
- 4. Copy the token
123
-
124
- ### Authenticate
125
-
126
- ```bash
127
- bb auth login
128
- ```
129
-
130
- ---
131
-
132
- ## Examples
133
-
134
- ### Daily Workflow
135
-
136
- ```bash
137
- # Check open PRs
138
- bb pr list
139
-
140
- # Review and merge
141
- bb pr view 42
142
- bb pr activity 42
143
- bb pr checks 42
144
- bb pr approve 42
145
- bb pr merge 42
146
-
147
- # Manage reviewers
148
- bb pr reviewers list 42
149
- bb pr reviewers add 42 teammate
150
- ```
151
-
152
- ### Draft Pull Requests
153
-
154
- ```bash
155
- # Create a draft PR for early feedback
156
- bb pr create --title "WIP: Add new feature" --draft
157
-
158
- # Mark it ready for review when done
159
- bb pr ready 123
160
- ```
161
-
162
- ### Managing PR Reviewers
163
-
164
- ```bash
165
- # List current reviewers on a PR
166
- bb pr reviewers list 42
167
-
168
- # Add reviewers to a PR
169
- bb pr reviewers add 42 johndoe
170
- bb pr reviewers add 42 janedoe
171
-
172
- # Remove a reviewer from a PR
173
- bb pr reviewers remove 42 johndoe
174
-
175
- # Get reviewers as JSON for scripting
176
- bb pr reviewers list 42 --json | jq '.[].display_name'
177
- ```
178
-
179
- ### Scripting with JSON
180
-
181
- ```bash
182
- # Get all open PR titles
183
- bb pr list --json | jq '.[].title'
184
-
185
- # Filter repos by name
186
- bb repo list --json | jq '.[] | select(.name | contains("api"))'
187
- ```
188
-
189
- ### CI/CD Usage
190
-
191
- ```bash
192
- export BB_USERNAME=myuser
193
- export BB_API_TOKEN=my-token
194
- bb auth login
195
- bb pr list -w workspace -r repo --json
196
- ```
197
-
198
- ---
199
-
200
- ## Development
201
-
202
- ```bash
203
- # Clone the repository
204
- git clone https://github.com/0pilatos0/bitbucket-cli.git
205
- cd bitbucket-cli
206
-
207
- # Install dependencies
208
- bun install
209
-
210
- # Run in development mode
211
- bun run dev
212
-
213
- # Run tests
214
- bun test
215
-
216
- # Build for production
217
- bun run build
218
- ```
101
+ > **Note:** Bitbucket app passwords are deprecated. Use API tokens instead.
219
102
 
220
103
  ---
221
104
 
222
105
  ## Contributing
223
106
 
224
- We welcome contributions! Please read our [Contributing Guide](CONTRIBUTING.md) to get started.
225
-
226
- 1. Fork the repository
227
- 2. Create a feature branch
228
- 3. Make your changes
229
- 4. Run tests (`bun test`)
230
- 5. Submit a Pull Request
107
+ Read the [Contributing Guide](CONTRIBUTING.md) to get started.
231
108
 
232
109
  ---
233
110
 
@@ -241,14 +118,4 @@ We welcome contributions! Please read our [Contributing Guide](CONTRIBUTING.md)
241
118
 
242
119
  ## License
243
120
 
244
- MIT License see [LICENSE](LICENSE) for details.
245
-
246
- ---
247
-
248
- <p align="center">
249
- <sub>
250
- Made with care by the community<br>
251
- <a href="https://github.com/0pilatos0/bitbucket-cli/issues">Report a Bug</a> ·
252
- <a href="https://github.com/0pilatos0/bitbucket-cli/issues">Request a Feature</a>
253
- </sub>
254
- </p>
121
+ MIT License - see [LICENSE](LICENSE) for details.