@kolatts/pncli 1.1.0 → 1.3.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 CHANGED
@@ -1,8 +1,10 @@
1
1
  # pncli — The Paperwork Nightmare CLI
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/%40kolatts%2Fpncli?style=flat-square&color=cb3837&logo=npm)](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 Data Cloud and Bitbucket Server. No MCP servers required. No meetings to schedule. No forms to fill out.
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,10 @@ 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_BASE_URL` | SDElements base URL |
53
+ | `PNCLI_SDE_TOKEN` | SDElements API token |
54
54
  | `PNCLI_CONFIG_PATH` | Override global config file path |
55
55
 
56
56
  ## For AI Agents
@@ -84,8 +84,9 @@ This project uses Conventional Commits for automatic versioning:
84
84
  | Git (local) | ✅ Active | Local git commands |
85
85
  | Jira | ✅ Active | Data Cloud REST v3 |
86
86
  | Bitbucket | ✅ Active | Server REST v1.0 |
87
- | Confluence | 🔜 Coming | The nightmare never ends |
88
- | SonarQube | 🔜 Coming | The nightmare never ends |
87
+ | Confluence | ✅ Active | Server REST v1 |
88
+ | SonarQube | ✅ Active | Server Web API |
89
+ | SDElements | ✅ Active | REST API v2 (cloud + on-prem) |
89
90
  | Artifactory | 🔜 Coming | The nightmare never ends |
90
91
 
91
92
  ## License
@@ -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:
@@ -236,19 +247,241 @@ pncli bitbucket get-build-status
236
247
  ### Confluence
237
248
 
238
249
  ```
239
- # confluence — no subcommands implemented yet
250
+ pncli confluence get-page
251
+ --id <page-id> Page ID
252
+ --expand <fields> Comma-separated fields to expand (default:
253
+ "body.storage,version,space,ancestors")
254
+
255
+ pncli confluence get-page-by-title
256
+ --space <key> Space key
257
+ --title <title> Page title
258
+
259
+ pncli confluence list-pages
260
+ --space <key> Space key
261
+ --limit <n> Max results per page (default: all)
262
+ --start <n> Offset for first result
263
+
264
+ pncli confluence get-page-children
265
+ --id <page-id> Parent page ID
266
+
267
+ pncli confluence get-labels
268
+ --id <page-id> Page ID
269
+
270
+ pncli confluence search
271
+ --cql <query> CQL query string (e.g. "space=PROJ AND type=page")
272
+ --limit <n> Maximum number of results (default: "25")
273
+ --start <n> Offset for first result (default: "0")
274
+ --expand <fields> Comma-separated fields to expand
275
+
276
+ pncli confluence create-page
277
+ --space <key> Space key
278
+ --title <title> Page title
279
+ --body <html> Page body (storage format HTML)
280
+ --parent-id <id> Parent page ID (to nest under a page)
281
+ --representation <format> Body format: storage (default) or wiki (default:
282
+ "storage")
283
+
284
+ pncli confluence update-page
285
+ --id <page-id> Page ID
286
+ --title <title> New page title
287
+ --body <html> New page body (storage format HTML)
288
+ --status <status> Page status: current (default) or draft (default:
289
+ "current")
290
+ --representation <format> Body format: storage (default) or wiki (default:
291
+ "storage")
292
+
293
+ pncli confluence delete-page
294
+ --id <page-id> Page ID
295
+
296
+ pncli confluence list-comments
297
+ --id <page-id> Page ID
298
+
299
+ pncli confluence add-comment
300
+ --id <page-id> Page ID
301
+ --body <text> Comment body (storage format HTML)
302
+ --representation <format> Body format: storage (default) or wiki (default:
303
+ "storage")
304
+
305
+ pncli confluence add-label
306
+ --id <page-id> Page ID
307
+ --labels <names> Comma-separated label names
308
+
309
+ pncli confluence remove-label
310
+ --id <page-id> Page ID
311
+ --label <name> Label name to remove
312
+
313
+ pncli confluence list-spaces
314
+ --type <type> Space type: global or personal
315
+ --limit <n> Max results (default: all)
316
+
317
+ pncli confluence get-space
318
+ --key <space-key> Space key
319
+
320
+ pncli confluence list-attachments
321
+ --id <page-id> Page ID
240
322
  ```
241
323
 
242
324
  ### Sonar
243
325
 
244
326
  ```
245
- # sonar — no subcommands implemented yet
327
+ pncli sonar quality-gate
328
+ --project <key> SonarQube project key (or set defaults.sonar.project in
329
+ config)
330
+ --branch <name> Branch name
331
+
332
+ pncli sonar issues
333
+ --project <key> SonarQube project key (or set defaults.sonar.project in
334
+ config)
335
+ --severities <list> Filter by severity: BLOCKER,CRITICAL,MAJOR,MINOR,INFO
336
+ (comma-separated)
337
+ --types <list> Filter by type: BUG,VULNERABILITY,CODE_SMELL
338
+ (comma-separated)
339
+ --statuses <list> Filter by status: OPEN,CONFIRMED,REOPENED,RESOLVED,CLOSED
340
+ (comma-separated)
341
+ --branch <name> Branch name
342
+ --resolved <bool> Filter resolved issues: true or false
343
+ --page <n> Page number (1-based) (default: "1")
344
+ --page-size <n> Results per page (max 500) (default: "100")
345
+ --all Fetch all pages (ignores --page/--page-size)
346
+
347
+ pncli sonar measures
348
+ --project <key> SonarQube project key (or set defaults.sonar.project in
349
+ config)
350
+ --metrics <list> Comma-separated metric keys (default:
351
+ "coverage,duplicated_lines_density,bugs,vulnerabilities,code_smells,sqale_rating,reliability_rating,security_rating,ncloc")
352
+ --branch <name> Branch name
353
+
354
+ pncli sonar projects
355
+ --query <text> Search query
356
+ --page <n> Page number (1-based) (default: "1")
357
+ --page-size <n> Results per page (default: "100")
358
+ --all Fetch all pages
359
+
360
+ pncli sonar hotspots
361
+ --project <key> SonarQube project key (or set defaults.sonar.project in
362
+ config)
363
+ --status <status> Filter: TO_REVIEW or REVIEWED
364
+ --resolution <list> Filter: FIXED,SAFE,ACKNOWLEDGED (comma-separated)
365
+ --branch <name> Branch name
366
+ --page <n> Page number (1-based) (default: "1")
367
+ --page-size <n> Results per page (default: "100")
368
+ --all Fetch all pages
369
+ ```
370
+
371
+ ### Sde
372
+
373
+ ```
374
+ pncli sde server-info
375
+
376
+ pncli sde whoami
377
+
378
+ pncli sde users
379
+ --email <email> Filter by email address
380
+ --first-name <name> Filter by first name
381
+ --last-name <name> Filter by last name
382
+ --active <bool> Filter by active status: true or false
383
+ --page <n> Page number (1-based) (default: "1")
384
+ --page-size <n> Results per page (default: "100")
385
+ --all Fetch all pages
386
+
387
+ pncli sde projects
388
+ --name <name> Filter by project name
389
+ --search <text> Text search on name and profile
390
+ --active <val> Filter by active status: true, false, or all
391
+ --ordering <field> Sort by: name, created, updated (prefix with - for
392
+ descending)
393
+ --expand <fields> Expand nested fields (comma-separated):
394
+ application,business_unit,creator
395
+ --include <fields> Include extra fields (comma-separated):
396
+ task_counts,permissions
397
+ --page <n> Page number (1-based) (default: "1")
398
+ --page-size <n> Results per page (default: "100")
399
+ --all Fetch all pages
400
+
401
+ pncli sde project
402
+ --id <id> Project ID (or set defaults.sde.project in config)
403
+ --expand <fields> Expand nested fields (comma-separated):
404
+ application,business_unit,creator
405
+ --include <fields> Include extra fields (comma-separated):
406
+ task_counts,permissions
407
+
408
+ pncli sde tasks
409
+ --project <id> Project ID (or set defaults.sde.project in config)
410
+ --phase <slug> Filter by phase slug (e.g. development,
411
+ architecture-design)
412
+ --priority <n> Filter by priority (1-10)
413
+ --status <id> Filter by status ID (e.g. TS1, TS2)
414
+ --assigned-to <email> Filter by assignee email
415
+ --source <val> Filter by source: default, custom, manual, project
416
+ --verification <val> Filter by verification: pass, fail, partial, none
417
+ --tag <name> Filter by tag name
418
+ --accepted <bool> Filter by accepted status: true or false
419
+ --relevant <bool> Filter by relevant status: true or false
420
+ --expand <fields> Expand nested fields (comma-separated):
421
+ status,phase,problem,text
422
+ --include <fields> Include extra fields (comma-separated):
423
+ how_tos,last_note,references,regulation_sections
424
+ --page <n> Page number (1-based) (default: "1")
425
+ --page-size <n> Results per page (default: "100")
426
+ --all Fetch all pages
427
+
428
+ pncli sde task
429
+ --project <id> Project ID (or set defaults.sde.project in config)
430
+ --task <id> Task ID (e.g. T21)
431
+ --expand <fields> Expand nested fields (comma-separated):
432
+ status,phase,problem,text
433
+ --include <fields> Include extra fields (comma-separated):
434
+ how_tos,last_note,references
435
+
436
+ pncli sde threats
437
+ --project <id> Project ID (or set defaults.sde.project in config)
438
+ --severity <n> Filter by severity (1-10)
439
+ --search <text> Full-text search on title and threat ID
440
+ --ordering <field> Sort by: threat__severity, threat_id, status (prefix -
441
+ for descending)
442
+ --capec-id <id> Filter by CAPEC attack pattern ID
443
+ --component-id <id> Filter by component ID
444
+ --page <n> Page number (1-based) (default: "1")
445
+ --page-size <n> Results per page (default: "100")
446
+ --all Fetch all pages
246
447
  ```
247
448
 
248
- ### Artifactory
449
+ ### Deps
249
450
 
250
451
  ```
251
- # artifactory — no subcommands implemented yet
452
+ pncli deps frisk
453
+ --ecosystem <ecosystem> Filter to one ecosystem: npm, nuget, maven, all
454
+ (default: "all")
455
+ --direct-only Only scan direct dependencies (default: include
456
+ transitive) (default: false)
457
+ --include-dev Include dev/test dependencies (default: false)
458
+
459
+ pncli deps scan
460
+ --ecosystem <ecosystem> Filter to one ecosystem: npm, nuget, maven, all
461
+ (default: "all")
462
+ --include-transitive Include transitive dependencies (default: false)
463
+ --include-dev Include dev/test dependencies (default: false)
464
+
465
+ pncli deps diff
466
+ --from <ref> Base git ref (commit, tag, or branch)
467
+ --to <ref> Target git ref (default: working tree)
468
+ --ecosystem <ecosystem> Filter to one ecosystem: npm, nuget, maven, all
469
+ (default: "all")
470
+ --include-dev Include dev/test dependencies (default: false)
471
+
472
+ pncli deps outdated
473
+ --ecosystem <ecosystem> Filter to one ecosystem: npm, nuget, maven, all
474
+ (default: "all")
475
+ --major Only show major version bumps
476
+ --minor Only show minor version bumps or higher
477
+ --patch Only show patch version bumps or higher
478
+
479
+ pncli deps license-check
480
+ --ecosystem <ecosystem> Filter to one ecosystem: npm, nuget, maven, all
481
+ (default: "all")
482
+ --include-dev Include dev/test dependencies (default: false)
483
+
484
+ pncli deps connectivity
252
485
  ```
253
486
 
254
487
  ### Config