@kolatts/pncli 1.2.0 → 1.4.0
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.
- package/README.md +14 -12
- package/copilot-instructions.md +224 -4
- package/dist/chunk-HWXXNMGE.js +558 -0
- package/dist/chunk-HWXXNMGE.js.map +1 -0
- package/dist/chunk-JORIICS2.js +197 -0
- package/dist/chunk-JORIICS2.js.map +1 -0
- package/dist/chunk-KT3XINLJ.js +42 -0
- package/dist/chunk-KT3XINLJ.js.map +1 -0
- package/dist/cli.js +3653 -1760
- package/dist/cli.js.map +1 -1
- package/dist/config-KECF7FJ2.js +18 -0
- package/dist/config-KECF7FJ2.js.map +1 -0
- package/dist/core-AJYPJ2Z7.js +8 -0
- package/dist/core-AJYPJ2Z7.js.map +1 -0
- package/dist/http-FC24JSK7.js +10 -0
- package/dist/http-FC24JSK7.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# pncli — The Paperwork Nightmare CLI
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@kolatts/pncli)
|
|
4
|
+
|
|
3
5
|
> One command does what three meetings couldn't.
|
|
4
6
|
|
|
5
|
-
pncli gives AI coding agents (and humans) structured CLI access to Jira
|
|
7
|
+
pncli gives AI coding agents (and humans) structured CLI access to Jira, Bitbucket, Confluence, SonarQube, and SDElements. No MCP servers required. No meetings to schedule. No forms to fill out.
|
|
6
8
|
|
|
7
9
|
## Why?
|
|
8
10
|
|
|
@@ -17,21 +19,15 @@ npm install -g @kolatts/pncli
|
|
|
17
19
|
## Quick Start
|
|
18
20
|
|
|
19
21
|
```bash
|
|
20
|
-
# Configure your global auth
|
|
22
|
+
# Configure your global auth (Jira, Bitbucket, Confluence)
|
|
21
23
|
pncli config init
|
|
22
24
|
|
|
23
25
|
# Add repo-level defaults (check this into git)
|
|
24
26
|
pncli config init --repo
|
|
25
|
-
|
|
26
|
-
# Review the PR for your current branch
|
|
27
|
-
pncli git current-pr
|
|
28
|
-
pncli bitbucket diff --pr 42
|
|
29
|
-
pncli bitbucket add-inline-comment --pr 42 --file src/app.ts --line 15 --body "This needs a null check"
|
|
30
|
-
|
|
31
|
-
# Create a Jira issue (uses defaults from .pncli.json)
|
|
32
|
-
pncli jira create-issue --summary "Missing null check in app.ts"
|
|
33
27
|
```
|
|
34
28
|
|
|
29
|
+
For workflow patterns, command examples, and agent integration, see [`copilot-instructions.md`](./copilot-instructions.md).
|
|
30
|
+
|
|
35
31
|
## Configuration
|
|
36
32
|
|
|
37
33
|
pncli uses a three-layer config system (highest priority wins):
|
|
@@ -51,6 +47,9 @@ pncli uses a three-layer config system (highest priority wins):
|
|
|
51
47
|
| `PNCLI_JIRA_API_TOKEN` | Jira API token |
|
|
52
48
|
| `PNCLI_BITBUCKET_BASE_URL` | Bitbucket Server base URL |
|
|
53
49
|
| `PNCLI_BITBUCKET_PAT` | Bitbucket personal access token |
|
|
50
|
+
| `PNCLI_SONAR_BASE_URL` | SonarQube Server base URL |
|
|
51
|
+
| `PNCLI_SONAR_TOKEN` | SonarQube personal access token |
|
|
52
|
+
| `PNCLI_SDE_CONNECTION` | SDElements connection string (`api-token@hostname`, e.g. `mytoken@myorg.sdelements.com`) |
|
|
54
53
|
| `PNCLI_CONFIG_PATH` | Override global config file path |
|
|
55
54
|
|
|
56
55
|
## For AI Agents
|
|
@@ -84,9 +83,12 @@ This project uses Conventional Commits for automatic versioning:
|
|
|
84
83
|
| Git (local) | ✅ Active | Local git commands |
|
|
85
84
|
| Jira | ✅ Active | Data Cloud REST v3 |
|
|
86
85
|
| Bitbucket | ✅ Active | Server REST v1.0 |
|
|
87
|
-
| Confluence |
|
|
88
|
-
| SonarQube |
|
|
86
|
+
| Confluence | ✅ Active | Server REST v1 |
|
|
87
|
+
| SonarQube | ✅ Active | Server Web API |
|
|
88
|
+
| SDElements | ✅ Active | REST API v2 (cloud + on-prem) |
|
|
89
89
|
| Artifactory | 🔜 Coming | The nightmare never ends |
|
|
90
|
+
| Jenkins | 🔜 Coming | REST API |
|
|
91
|
+
| Azure DevOps Server | ✅ Active | REST API v7.1 (on-prem, Windows auth + PAT) |
|
|
90
92
|
|
|
91
93
|
## License
|
|
92
94
|
|
package/copilot-instructions.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What is pncli?
|
|
6
6
|
|
|
7
|
-
pncli is a CLI tool that provides structured JSON access to Jira, Bitbucket, and local git state. Use it for all interactions with these services. It exists because MCP servers aren't available in this environment — pncli is your agent-friendly shim layer.
|
|
7
|
+
pncli is a CLI tool that provides structured JSON access to Jira, Bitbucket, Confluence, SonarQube, SDElements, and local git state. Use it for all interactions with these services. It exists because MCP servers aren't available in this environment — pncli is your agent-friendly shim layer.
|
|
8
8
|
|
|
9
9
|
## Important
|
|
10
10
|
|
|
@@ -51,6 +51,17 @@ pncli is a CLI tool that provides structured JSON access to Jira, Bitbucket, and
|
|
|
51
51
|
3. Add a PR comment referencing the issue:
|
|
52
52
|
`pncli bitbucket add-comment --pr <id> --body "Created <new-key> to track this separately"`
|
|
53
53
|
|
|
54
|
+
### Pre-Merge Quality Check
|
|
55
|
+
|
|
56
|
+
1. Check quality gate status for the current branch:
|
|
57
|
+
`pncli sonar quality-gate --branch <branch-name>`
|
|
58
|
+
2. If gate fails, inspect which issues are blocking:
|
|
59
|
+
`pncli sonar issues --types BUG,VULNERABILITY --statuses OPEN --branch <branch-name>`
|
|
60
|
+
3. Check coverage and key metrics:
|
|
61
|
+
`pncli sonar measures --branch <branch-name>`
|
|
62
|
+
4. Review security hotspots that need attention:
|
|
63
|
+
`pncli sonar hotspots --status TO_REVIEW --branch <branch-name>`
|
|
64
|
+
|
|
54
65
|
### Check Build Status Before Merging
|
|
55
66
|
|
|
56
67
|
1. Get PR build status:
|
|
@@ -178,7 +189,10 @@ pncli bitbucket decline-pr
|
|
|
178
189
|
--id <pr-id> Pull request ID
|
|
179
190
|
|
|
180
191
|
pncli bitbucket list-comments
|
|
181
|
-
--pr <pr-id>
|
|
192
|
+
--pr <pr-id> Pull request ID
|
|
193
|
+
--no-with-replies Exclude replies; return top-level comments only
|
|
194
|
+
--inline-only Return only inline file comments
|
|
195
|
+
--general-only Return only general (non-inline) PR comments
|
|
182
196
|
|
|
183
197
|
pncli bitbucket add-comment
|
|
184
198
|
--pr <pr-id> Pull request ID
|
|
@@ -236,13 +250,203 @@ pncli bitbucket get-build-status
|
|
|
236
250
|
### Confluence
|
|
237
251
|
|
|
238
252
|
```
|
|
239
|
-
|
|
253
|
+
pncli confluence get-page
|
|
254
|
+
--id <page-id> Page ID
|
|
255
|
+
--expand <fields> Comma-separated fields to expand (default:
|
|
256
|
+
"body.storage,version,space,ancestors")
|
|
257
|
+
|
|
258
|
+
pncli confluence get-page-by-title
|
|
259
|
+
--space <key> Space key
|
|
260
|
+
--title <title> Page title
|
|
261
|
+
|
|
262
|
+
pncli confluence list-pages
|
|
263
|
+
--space <key> Space key
|
|
264
|
+
--limit <n> Max results per page (default: all)
|
|
265
|
+
--start <n> Offset for first result
|
|
266
|
+
|
|
267
|
+
pncli confluence get-page-children
|
|
268
|
+
--id <page-id> Parent page ID
|
|
269
|
+
|
|
270
|
+
pncli confluence get-labels
|
|
271
|
+
--id <page-id> Page ID
|
|
272
|
+
|
|
273
|
+
pncli confluence search
|
|
274
|
+
--cql <query> CQL query string (e.g. "space=PROJ AND type=page")
|
|
275
|
+
--limit <n> Maximum number of results (default: "25")
|
|
276
|
+
--start <n> Offset for first result (default: "0")
|
|
277
|
+
--expand <fields> Comma-separated fields to expand
|
|
278
|
+
|
|
279
|
+
pncli confluence create-page
|
|
280
|
+
--space <key> Space key
|
|
281
|
+
--title <title> Page title
|
|
282
|
+
--body <html> Page body (storage format HTML)
|
|
283
|
+
--parent-id <id> Parent page ID (to nest under a page)
|
|
284
|
+
--representation <format> Body format: storage (default) or wiki (default:
|
|
285
|
+
"storage")
|
|
286
|
+
|
|
287
|
+
pncli confluence update-page
|
|
288
|
+
--id <page-id> Page ID
|
|
289
|
+
--title <title> New page title
|
|
290
|
+
--body <html> New page body (storage format HTML)
|
|
291
|
+
--status <status> Page status: current (default) or draft (default:
|
|
292
|
+
"current")
|
|
293
|
+
--representation <format> Body format: storage (default) or wiki (default:
|
|
294
|
+
"storage")
|
|
295
|
+
|
|
296
|
+
pncli confluence delete-page
|
|
297
|
+
--id <page-id> Page ID
|
|
298
|
+
|
|
299
|
+
pncli confluence list-comments
|
|
300
|
+
--id <page-id> Page ID
|
|
301
|
+
|
|
302
|
+
pncli confluence add-comment
|
|
303
|
+
--id <page-id> Page ID
|
|
304
|
+
--body <text> Comment body (storage format HTML)
|
|
305
|
+
--representation <format> Body format: storage (default) or wiki (default:
|
|
306
|
+
"storage")
|
|
307
|
+
|
|
308
|
+
pncli confluence add-label
|
|
309
|
+
--id <page-id> Page ID
|
|
310
|
+
--labels <names> Comma-separated label names
|
|
311
|
+
|
|
312
|
+
pncli confluence remove-label
|
|
313
|
+
--id <page-id> Page ID
|
|
314
|
+
--label <name> Label name to remove
|
|
315
|
+
|
|
316
|
+
pncli confluence list-spaces
|
|
317
|
+
--type <type> Space type: global or personal
|
|
318
|
+
--limit <n> Max results (default: all)
|
|
319
|
+
|
|
320
|
+
pncli confluence get-space
|
|
321
|
+
--key <space-key> Space key
|
|
322
|
+
|
|
323
|
+
pncli confluence list-attachments
|
|
324
|
+
--id <page-id> Page ID
|
|
240
325
|
```
|
|
241
326
|
|
|
242
327
|
### Sonar
|
|
243
328
|
|
|
244
329
|
```
|
|
245
|
-
|
|
330
|
+
pncli sonar quality-gate
|
|
331
|
+
--project <key> SonarQube project key (or set defaults.sonar.project in
|
|
332
|
+
config)
|
|
333
|
+
--branch <name> Branch name
|
|
334
|
+
|
|
335
|
+
pncli sonar issues
|
|
336
|
+
--project <key> SonarQube project key (or set defaults.sonar.project in
|
|
337
|
+
config)
|
|
338
|
+
--severities <list> Filter by severity: BLOCKER,CRITICAL,MAJOR,MINOR,INFO
|
|
339
|
+
(comma-separated)
|
|
340
|
+
--types <list> Filter by type: BUG,VULNERABILITY,CODE_SMELL
|
|
341
|
+
(comma-separated)
|
|
342
|
+
--statuses <list> Filter by status: OPEN,CONFIRMED,REOPENED,RESOLVED,CLOSED
|
|
343
|
+
(comma-separated)
|
|
344
|
+
--branch <name> Branch name
|
|
345
|
+
--resolved <bool> Filter resolved issues: true or false
|
|
346
|
+
--page <n> Page number (1-based) (default: "1")
|
|
347
|
+
--page-size <n> Results per page (max 500) (default: "100")
|
|
348
|
+
--all Fetch all pages (ignores --page/--page-size)
|
|
349
|
+
|
|
350
|
+
pncli sonar measures
|
|
351
|
+
--project <key> SonarQube project key (or set defaults.sonar.project in
|
|
352
|
+
config)
|
|
353
|
+
--metrics <list> Comma-separated metric keys (default:
|
|
354
|
+
"coverage,duplicated_lines_density,bugs,vulnerabilities,code_smells,sqale_rating,reliability_rating,security_rating,ncloc")
|
|
355
|
+
--branch <name> Branch name
|
|
356
|
+
|
|
357
|
+
pncli sonar projects
|
|
358
|
+
--query <text> Search query
|
|
359
|
+
--page <n> Page number (1-based) (default: "1")
|
|
360
|
+
--page-size <n> Results per page (default: "100")
|
|
361
|
+
--all Fetch all pages
|
|
362
|
+
|
|
363
|
+
pncli sonar hotspots
|
|
364
|
+
--project <key> SonarQube project key (or set defaults.sonar.project in
|
|
365
|
+
config)
|
|
366
|
+
--status <status> Filter: TO_REVIEW or REVIEWED
|
|
367
|
+
--resolution <list> Filter: FIXED,SAFE,ACKNOWLEDGED (comma-separated)
|
|
368
|
+
--branch <name> Branch name
|
|
369
|
+
--page <n> Page number (1-based) (default: "1")
|
|
370
|
+
--page-size <n> Results per page (default: "100")
|
|
371
|
+
--all Fetch all pages
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### Sde
|
|
375
|
+
|
|
376
|
+
```
|
|
377
|
+
pncli sde server-info
|
|
378
|
+
|
|
379
|
+
pncli sde whoami
|
|
380
|
+
|
|
381
|
+
pncli sde users
|
|
382
|
+
--email <email> Filter by email address
|
|
383
|
+
--first-name <name> Filter by first name
|
|
384
|
+
--last-name <name> Filter by last name
|
|
385
|
+
--active <bool> Filter by active status: true or false
|
|
386
|
+
--page <n> Page number (1-based) (default: "1")
|
|
387
|
+
--page-size <n> Results per page (default: "100")
|
|
388
|
+
--all Fetch all pages
|
|
389
|
+
|
|
390
|
+
pncli sde projects
|
|
391
|
+
--name <name> Filter by project name
|
|
392
|
+
--search <text> Text search on name and profile
|
|
393
|
+
--active <val> Filter by active status: true, false, or all
|
|
394
|
+
--ordering <field> Sort by: name, created, updated (prefix with - for
|
|
395
|
+
descending)
|
|
396
|
+
--expand <fields> Expand nested fields (comma-separated):
|
|
397
|
+
application,business_unit,creator
|
|
398
|
+
--include <fields> Include extra fields (comma-separated):
|
|
399
|
+
task_counts,permissions
|
|
400
|
+
--page <n> Page number (1-based) (default: "1")
|
|
401
|
+
--page-size <n> Results per page (default: "100")
|
|
402
|
+
--all Fetch all pages
|
|
403
|
+
|
|
404
|
+
pncli sde project
|
|
405
|
+
--id <id> Project ID (or set defaults.sde.project in config)
|
|
406
|
+
--expand <fields> Expand nested fields (comma-separated):
|
|
407
|
+
application,business_unit,creator
|
|
408
|
+
--include <fields> Include extra fields (comma-separated):
|
|
409
|
+
task_counts,permissions
|
|
410
|
+
|
|
411
|
+
pncli sde tasks
|
|
412
|
+
--project <id> Project ID (or set defaults.sde.project in config)
|
|
413
|
+
--phase <slug> Filter by phase slug (e.g. development,
|
|
414
|
+
architecture-design)
|
|
415
|
+
--priority <n> Filter by priority (1-10)
|
|
416
|
+
--status <id> Filter by status ID (e.g. TS1, TS2)
|
|
417
|
+
--assigned-to <email> Filter by assignee email
|
|
418
|
+
--source <val> Filter by source: default, custom, manual, project
|
|
419
|
+
--verification <val> Filter by verification: pass, fail, partial, none
|
|
420
|
+
--tag <name> Filter by tag name
|
|
421
|
+
--accepted <bool> Filter by accepted status: true or false
|
|
422
|
+
--relevant <bool> Filter by relevant status: true or false
|
|
423
|
+
--expand <fields> Expand nested fields (comma-separated):
|
|
424
|
+
status,phase,problem,text
|
|
425
|
+
--include <fields> Include extra fields (comma-separated):
|
|
426
|
+
how_tos,last_note,references,regulation_sections
|
|
427
|
+
--page <n> Page number (1-based) (default: "1")
|
|
428
|
+
--page-size <n> Results per page (default: "100")
|
|
429
|
+
--all Fetch all pages
|
|
430
|
+
|
|
431
|
+
pncli sde task
|
|
432
|
+
--project <id> Project ID (or set defaults.sde.project in config)
|
|
433
|
+
--task <id> Task ID (e.g. T21)
|
|
434
|
+
--expand <fields> Expand nested fields (comma-separated):
|
|
435
|
+
status,phase,problem,text
|
|
436
|
+
--include <fields> Include extra fields (comma-separated):
|
|
437
|
+
how_tos,last_note,references
|
|
438
|
+
|
|
439
|
+
pncli sde threats
|
|
440
|
+
--project <id> Project ID (or set defaults.sde.project in config)
|
|
441
|
+
--severity <n> Filter by severity (1-10)
|
|
442
|
+
--search <text> Full-text search on title and threat ID
|
|
443
|
+
--ordering <field> Sort by: threat__severity, threat_id, status (prefix -
|
|
444
|
+
for descending)
|
|
445
|
+
--capec-id <id> Filter by CAPEC attack pattern ID
|
|
446
|
+
--component-id <id> Filter by component ID
|
|
447
|
+
--page <n> Page number (1-based) (default: "1")
|
|
448
|
+
--page-size <n> Results per page (default: "100")
|
|
449
|
+
--all Fetch all pages
|
|
246
450
|
```
|
|
247
451
|
|
|
248
452
|
### Deps
|
|
@@ -296,6 +500,22 @@ pncli config set
|
|
|
296
500
|
pncli config test
|
|
297
501
|
```
|
|
298
502
|
|
|
503
|
+
### Ado
|
|
504
|
+
|
|
505
|
+
```
|
|
506
|
+
pncli ado whoami
|
|
507
|
+
|
|
508
|
+
pncli ado connection-data
|
|
509
|
+
|
|
510
|
+
pncli ado project
|
|
511
|
+
|
|
512
|
+
pncli ado work
|
|
513
|
+
|
|
514
|
+
pncli ado repo
|
|
515
|
+
|
|
516
|
+
pncli ado pipeline
|
|
517
|
+
```
|
|
518
|
+
|
|
299
519
|
<!-- COMMAND-REFERENCE:END -->
|
|
300
520
|
|
|
301
521
|
## Output Format
|