@copado/agentia-cli 0.10.0-alpha.0 → 0.11.0-alpha.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
@@ -23,7 +23,7 @@ $ npm install -g @copado/agentia-cli
23
23
  $ agentia COMMAND
24
24
  running command...
25
25
  $ agentia (--version)
26
- @copado/agentia-cli/0.10.0-alpha.0 linux-x64 node-v22.23.2
26
+ @copado/agentia-cli/0.11.0-alpha.0 linux-x64 node-v22.23.2
27
27
  $ agentia --help [COMMAND]
28
28
  USAGE
29
29
  $ agentia COMMAND
@@ -122,7 +122,8 @@ Tools are JSON-safe and return structured results. Sensitive fields are redacted
122
122
  | Environment | `agentia_environment_list`, `agentia_environment_get`, `agentia_environment_create`, `agentia_environment_update` |
123
123
  | Job | `agentia_job_list`, `agentia_job_get`, `agentia_job_run`, `agentia_job_resume`, `agentia_job_kill`, `agentia_job_pause` |
124
124
  | Pipeline | `agentia_pipeline_list`, `agentia_pipeline_get`, `agentia_pipeline_connection_list` |
125
- | Project | `agentia_project_default_get`, `agentia_project_default_set`, `agentia_project_default_unset` |
125
+ | Project | `agentia_project_list`, `agentia_project_default_get`, `agentia_project_default_set`, `agentia_project_default_unset` |
126
+ | User | `agentia_user_get` |
126
127
  | Metadata | `agentia_metadata_list`, `agentia_metadata_content_get`, `agentia_metadata_content_compare`, `agentia_metadata_index_compare`, `agentia_metadata_dependency_list` |
127
128
 
128
129
  ### Notes for common tools
@@ -130,7 +131,9 @@ Tools are JSON-safe and return structured results. Sensitive fields are redacted
130
131
  - Pipeline and job tools require `userId` and `organizationId` for the gateway `x-user-id` and `x-organization-id` headers.
131
132
  - Job list accepts optional filters such as `status`, `name`, `type`, `parent`, `context`, and `limit`.
132
133
  - Metadata tools require the same gateway identifiers as the CLI flags, for example `pipelineId`, `sourceOrgId`, and `sourceCredentialId` where applicable.
134
+ - Project list accepts optional `mine` to restrict results to projects owned by or related to the current user.
133
135
  - Project default tools read and write local or global defaults managed by `agentia project default *`.
136
+ - User get defaults `id` to `me` for the authenticated user.
134
137
  - Environment create/update tools mirror the corresponding CLI commands and only send fields you provide.
135
138
 
136
139
  ## Verify locally
@@ -189,10 +192,12 @@ Agentia CLI is distributed under the Copado End User License Agreement. See [LIC
189
192
  * [`agentia project default get`](#agentia-project-default-get)
190
193
  * [`agentia project default set`](#agentia-project-default-set)
191
194
  * [`agentia project default unset`](#agentia-project-default-unset)
195
+ * [`agentia project list`](#agentia-project-list)
192
196
  * [`agentia promotion conflict get ID`](#agentia-promotion-conflict-get-id)
193
197
  * [`agentia promotion conflict list`](#agentia-promotion-conflict-list)
194
198
  * [`agentia promotion conflict resolve ID`](#agentia-promotion-conflict-resolve-id)
195
199
  * [`agentia promotion conflict unresolve ID`](#agentia-promotion-conflict-unresolve-id)
200
+ * [`agentia user get`](#agentia-user-get)
196
201
  * [`agentia work create`](#agentia-work-create)
197
202
  * [`agentia work delete ID`](#agentia-work-delete-id)
198
203
  * [`agentia work get ID`](#agentia-work-get-id)
@@ -229,7 +234,7 @@ EXAMPLES
229
234
  $ agentia auth get --json
230
235
  ```
231
236
 
232
- _See code: [src/commands/auth/get.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/auth/get.ts)_
237
+ _See code: [src/commands/auth/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/auth/get.ts)_
233
238
 
234
239
  ## `agentia auth set`
235
240
 
@@ -267,7 +272,7 @@ EXAMPLES
267
272
  $ agentia auth set --cicd <copado-api-key> --region na --json
268
273
  ```
269
274
 
270
- _See code: [src/commands/auth/set.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/auth/set.ts)_
275
+ _See code: [src/commands/auth/set.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/auth/set.ts)_
271
276
 
272
277
  ## `agentia environment auth status ID`
273
278
 
@@ -297,7 +302,7 @@ EXAMPLES
297
302
  $ agentia environment auth status <environment-id> --json
298
303
  ```
299
304
 
300
- _See code: [src/commands/environment/auth/status.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/environment/auth/status.ts)_
305
+ _See code: [src/commands/environment/auth/status.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/environment/auth/status.ts)_
301
306
 
302
307
  ## `agentia environment auth web login ID`
303
308
 
@@ -331,7 +336,7 @@ EXAMPLES
331
336
  $ agentia environment auth web login <environment-id> --json
332
337
  ```
333
338
 
334
- _See code: [src/commands/environment/auth/web/login.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/environment/auth/web/login.ts)_
339
+ _See code: [src/commands/environment/auth/web/login.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/environment/auth/web/login.ts)_
335
340
 
336
341
  ## `agentia environment create NAME`
337
342
 
@@ -376,7 +381,7 @@ EXAMPLES
376
381
  $ agentia environment create Dev --json
377
382
  ```
378
383
 
379
- _See code: [src/commands/environment/create.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/environment/create.ts)_
384
+ _See code: [src/commands/environment/create.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/environment/create.ts)_
380
385
 
381
386
  ## `agentia environment get ID`
382
387
 
@@ -401,7 +406,7 @@ EXAMPLES
401
406
  $ agentia environment get a0SKC000000CmZ2AU --json
402
407
  ```
403
408
 
404
- _See code: [src/commands/environment/get.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/environment/get.ts)_
409
+ _See code: [src/commands/environment/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/environment/get.ts)_
405
410
 
406
411
  ## `agentia environment list`
407
412
 
@@ -409,7 +414,15 @@ List Copado environments
409
414
 
410
415
  ```
411
416
  USAGE
412
- $ agentia environment list [--json]
417
+ $ agentia environment list [--json] [--name <value>] [--org-id <value>] [--platform <value>] [--type
418
+ Production/Developer|Sandbox|Scratch Org|Custom Domain]
419
+
420
+ FLAGS
421
+ --name=<value> Filter by name
422
+ --org-id=<value> Filter by Salesforce org ID
423
+ --platform=<value> Filter by platform
424
+ --type=<option> Environment type
425
+ <options: Production/Developer|Sandbox|Scratch Org|Custom Domain>
413
426
 
414
427
  GLOBAL FLAGS
415
428
  --json Format output as json.
@@ -420,10 +433,12 @@ DESCRIPTION
420
433
  EXAMPLES
421
434
  $ agentia environment list
422
435
 
436
+ $ agentia environment list --name Dev --org-id 00D000000000000 --platform SFDX --type Sandbox
437
+
423
438
  $ agentia environment list --json
424
439
  ```
425
440
 
426
- _See code: [src/commands/environment/list.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/environment/list.ts)_
441
+ _See code: [src/commands/environment/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/environment/list.ts)_
427
442
 
428
443
  ## `agentia environment update ID`
429
444
 
@@ -469,7 +484,7 @@ EXAMPLES
469
484
  $ agentia environment update a0SKC000000CmZ2AU --name UAT --json
470
485
  ```
471
486
 
472
- _See code: [src/commands/environment/update.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/environment/update.ts)_
487
+ _See code: [src/commands/environment/update.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/environment/update.ts)_
473
488
 
474
489
  ## `agentia help [COMMAND]`
475
490
 
@@ -518,7 +533,7 @@ EXAMPLES
518
533
  $ agentia job get <job-id> --user-id <id> --organization-id <id> --json
519
534
  ```
520
535
 
521
- _See code: [src/commands/job/get.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/job/get.ts)_
536
+ _See code: [src/commands/job/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/job/get.ts)_
522
537
 
523
538
  ## `agentia job kill ID`
524
539
 
@@ -547,7 +562,7 @@ EXAMPLES
547
562
  $ agentia job kill <job-id> --user-id <id> --organization-id <id> --json
548
563
  ```
549
564
 
550
- _See code: [src/commands/job/kill.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/job/kill.ts)_
565
+ _See code: [src/commands/job/kill.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/job/kill.ts)_
551
566
 
552
567
  ## `agentia job list`
553
568
 
@@ -585,7 +600,7 @@ EXAMPLES
585
600
  $ agentia job list --user-id <id> --organization-id <id> --json
586
601
  ```
587
602
 
588
- _See code: [src/commands/job/list.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/job/list.ts)_
603
+ _See code: [src/commands/job/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/job/list.ts)_
589
604
 
590
605
  ## `agentia job pause ID`
591
606
 
@@ -614,7 +629,7 @@ EXAMPLES
614
629
  $ agentia job pause <job-id> --user-id <id> --organization-id <id> --json
615
630
  ```
616
631
 
617
- _See code: [src/commands/job/pause.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/job/pause.ts)_
632
+ _See code: [src/commands/job/pause.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/job/pause.ts)_
618
633
 
619
634
  ## `agentia job resume ID`
620
635
 
@@ -643,7 +658,7 @@ EXAMPLES
643
658
  $ agentia job resume <job-id> --user-id <id> --organization-id <id> --json
644
659
  ```
645
660
 
646
- _See code: [src/commands/job/resume.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/job/resume.ts)_
661
+ _See code: [src/commands/job/resume.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/job/resume.ts)_
647
662
 
648
663
  ## `agentia job run ID`
649
664
 
@@ -673,7 +688,7 @@ EXAMPLES
673
688
  $ agentia job run <job-id> --user-id <id> --organization-id <id> --restart --json
674
689
  ```
675
690
 
676
- _See code: [src/commands/job/run.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/job/run.ts)_
691
+ _See code: [src/commands/job/run.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/job/run.ts)_
677
692
 
678
693
  ## `agentia mcp start`
679
694
 
@@ -692,7 +707,7 @@ EXAMPLES
692
707
  $ agentia mcp start # long-running stdio MCP server for Cursor and other clients
693
708
  ```
694
709
 
695
- _See code: [src/commands/mcp/start.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/mcp/start.ts)_
710
+ _See code: [src/commands/mcp/start.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/mcp/start.ts)_
696
711
 
697
712
  ## `agentia metadata content compare`
698
713
 
@@ -735,7 +750,7 @@ EXAMPLES
735
750
  $ agentia metadata content compare --metadata-type ApexClass --api-name MyClass --json
736
751
  ```
737
752
 
738
- _See code: [src/commands/metadata/content/compare.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/metadata/content/compare.ts)_
753
+ _See code: [src/commands/metadata/content/compare.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/content/compare.ts)_
739
754
 
740
755
  ## `agentia metadata content get`
741
756
 
@@ -776,7 +791,7 @@ EXAMPLES
776
791
  $ agentia metadata content get --file requests.json --json
777
792
  ```
778
793
 
779
- _See code: [src/commands/metadata/content/get.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/metadata/content/get.ts)_
794
+ _See code: [src/commands/metadata/content/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/content/get.ts)_
780
795
 
781
796
  ## `agentia metadata dependency list`
782
797
 
@@ -824,7 +839,7 @@ EXAMPLES
824
839
  $ agentia metadata dependency list --from-changes --base-ref origin/main --retrieve-mode all --pipeline-id <id> --source-org-id <id> --source-credential-id <id>
825
840
  ```
826
841
 
827
- _See code: [src/commands/metadata/dependency/list.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/metadata/dependency/list.ts)_
842
+ _See code: [src/commands/metadata/dependency/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/dependency/list.ts)_
828
843
 
829
844
  ## `agentia metadata index compare`
830
845
 
@@ -858,7 +873,7 @@ EXAMPLES
858
873
  $ agentia metadata index compare --comparison-mode MIX --json
859
874
  ```
860
875
 
861
- _See code: [src/commands/metadata/index/compare.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/metadata/index/compare.ts)_
876
+ _See code: [src/commands/metadata/index/compare.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/index/compare.ts)_
862
877
 
863
878
  ## `agentia metadata list`
864
879
 
@@ -906,7 +921,7 @@ EXAMPLES
906
921
  $ agentia metadata list --source NewAndChanged --find-managed-packages --json
907
922
  ```
908
923
 
909
- _See code: [src/commands/metadata/list.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/metadata/list.ts)_
924
+ _See code: [src/commands/metadata/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/list.ts)_
910
925
 
911
926
  ## `agentia metadata refresh deleted`
912
927
 
@@ -938,7 +953,7 @@ EXAMPLES
938
953
  $ agentia metadata refresh deleted --env <environment-id> --user-id <id> --organization-id <id> --module-type vlocity --json
939
954
  ```
940
955
 
941
- _See code: [src/commands/metadata/refresh/deleted.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/metadata/refresh/deleted.ts)_
956
+ _See code: [src/commands/metadata/refresh/deleted.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/refresh/deleted.ts)_
942
957
 
943
958
  ## `agentia metadata refresh run`
944
959
 
@@ -981,7 +996,7 @@ EXAMPLES
981
996
  $ agentia metadata refresh run --env <environment-id> --user-id <id> --organization-id <id> --all --json
982
997
  ```
983
998
 
984
- _See code: [src/commands/metadata/refresh/run.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/metadata/refresh/run.ts)_
999
+ _See code: [src/commands/metadata/refresh/run.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/refresh/run.ts)_
985
1000
 
986
1001
  ## `agentia metadata refresh status`
987
1002
 
@@ -1013,7 +1028,7 @@ EXAMPLES
1013
1028
  $ agentia metadata refresh status --job-id <event-id> --user-id <id> --organization-id <id> --json
1014
1029
  ```
1015
1030
 
1016
- _See code: [src/commands/metadata/refresh/status.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/metadata/refresh/status.ts)_
1031
+ _See code: [src/commands/metadata/refresh/status.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/refresh/status.ts)_
1017
1032
 
1018
1033
  ## `agentia pipeline connection list`
1019
1034
 
@@ -1040,7 +1055,7 @@ EXAMPLES
1040
1055
  $ agentia pipeline connection list --pipeline-id <pipeline-id> --user-id <id> --organization-id <id> --json
1041
1056
  ```
1042
1057
 
1043
- _See code: [src/commands/pipeline/connection/list.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/pipeline/connection/list.ts)_
1058
+ _See code: [src/commands/pipeline/connection/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/pipeline/connection/list.ts)_
1044
1059
 
1045
1060
  ## `agentia pipeline get ID`
1046
1061
 
@@ -1069,7 +1084,7 @@ EXAMPLES
1069
1084
  $ agentia pipeline get <pipeline-id> --user-id <id> --organization-id <id> --json
1070
1085
  ```
1071
1086
 
1072
- _See code: [src/commands/pipeline/get.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/pipeline/get.ts)_
1087
+ _See code: [src/commands/pipeline/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/pipeline/get.ts)_
1073
1088
 
1074
1089
  ## `agentia pipeline list`
1075
1090
 
@@ -1095,7 +1110,7 @@ EXAMPLES
1095
1110
  $ agentia pipeline list --user-id <id> --organization-id <id> --json
1096
1111
  ```
1097
1112
 
1098
- _See code: [src/commands/pipeline/list.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/pipeline/list.ts)_
1113
+ _See code: [src/commands/pipeline/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/pipeline/list.ts)_
1099
1114
 
1100
1115
  ## `agentia plugins`
1101
1116
 
@@ -1422,7 +1437,7 @@ EXAMPLES
1422
1437
  $ agentia project default get --json
1423
1438
  ```
1424
1439
 
1425
- _See code: [src/commands/project/default/get.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/project/default/get.ts)_
1440
+ _See code: [src/commands/project/default/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/project/default/get.ts)_
1426
1441
 
1427
1442
  ## `agentia project default set`
1428
1443
 
@@ -1459,7 +1474,7 @@ EXAMPLES
1459
1474
  $ agentia project default set --project my-project --json
1460
1475
  ```
1461
1476
 
1462
- _See code: [src/commands/project/default/set.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/project/default/set.ts)_
1477
+ _See code: [src/commands/project/default/set.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/project/default/set.ts)_
1463
1478
 
1464
1479
  ## `agentia project default unset`
1465
1480
 
@@ -1496,7 +1511,34 @@ EXAMPLES
1496
1511
  $ agentia project default unset --project --json
1497
1512
  ```
1498
1513
 
1499
- _See code: [src/commands/project/default/unset.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/project/default/unset.ts)_
1514
+ _See code: [src/commands/project/default/unset.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/project/default/unset.ts)_
1515
+
1516
+ ## `agentia project list`
1517
+
1518
+ List Copado projects
1519
+
1520
+ ```
1521
+ USAGE
1522
+ $ agentia project list [--json] [--mine]
1523
+
1524
+ FLAGS
1525
+ --mine List only projects owned by or related to the current user
1526
+
1527
+ GLOBAL FLAGS
1528
+ --json Format output as json.
1529
+
1530
+ DESCRIPTION
1531
+ List Copado projects
1532
+
1533
+ EXAMPLES
1534
+ $ agentia project list
1535
+
1536
+ $ agentia project list --mine
1537
+
1538
+ $ agentia project list --mine --json
1539
+ ```
1540
+
1541
+ _See code: [src/commands/project/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/project/list.ts)_
1500
1542
 
1501
1543
  ## `agentia promotion conflict get ID`
1502
1544
 
@@ -1527,7 +1569,7 @@ EXAMPLES
1527
1569
  $ agentia promotion conflict get <conflict-id> -p <promotion-id> --json
1528
1570
  ```
1529
1571
 
1530
- _See code: [src/commands/promotion/conflict/get.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/promotion/conflict/get.ts)_
1572
+ _See code: [src/commands/promotion/conflict/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/promotion/conflict/get.ts)_
1531
1573
 
1532
1574
  ## `agentia promotion conflict list`
1533
1575
 
@@ -1552,7 +1594,7 @@ EXAMPLES
1552
1594
  $ agentia promotion conflict list -p <promotion-id> --json
1553
1595
  ```
1554
1596
 
1555
- _See code: [src/commands/promotion/conflict/list.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/promotion/conflict/list.ts)_
1597
+ _See code: [src/commands/promotion/conflict/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/promotion/conflict/list.ts)_
1556
1598
 
1557
1599
  ## `agentia promotion conflict resolve ID`
1558
1600
 
@@ -1585,7 +1627,7 @@ EXAMPLES
1585
1627
  $ agentia promotion conflict resolve <conflict-id> -p <promotion-id> --mode auto --json
1586
1628
  ```
1587
1629
 
1588
- _See code: [src/commands/promotion/conflict/resolve.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/promotion/conflict/resolve.ts)_
1630
+ _See code: [src/commands/promotion/conflict/resolve.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/promotion/conflict/resolve.ts)_
1589
1631
 
1590
1632
  ## `agentia promotion conflict unresolve ID`
1591
1633
 
@@ -1613,7 +1655,36 @@ EXAMPLES
1613
1655
  $ agentia promotion conflict unresolve <conflict-id> -p <promotion-id> --json
1614
1656
  ```
1615
1657
 
1616
- _See code: [src/commands/promotion/conflict/unresolve.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/promotion/conflict/unresolve.ts)_
1658
+ _See code: [src/commands/promotion/conflict/unresolve.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/promotion/conflict/unresolve.ts)_
1659
+
1660
+ ## `agentia user get`
1661
+
1662
+ Get a Copado user by ID (defaults to the authenticated user)
1663
+
1664
+ ```
1665
+ USAGE
1666
+ $ agentia user get [--json] [--id <value>]
1667
+
1668
+ FLAGS
1669
+ --id=<value> [default: me] User ID, or "me" for the authenticated user
1670
+
1671
+ GLOBAL FLAGS
1672
+ --json Format output as json.
1673
+
1674
+ DESCRIPTION
1675
+ Get a Copado user by ID (defaults to the authenticated user)
1676
+
1677
+ EXAMPLES
1678
+ $ agentia user get
1679
+
1680
+ $ agentia user get --id me
1681
+
1682
+ $ agentia user get --id 005000000000000
1683
+
1684
+ $ agentia user get --json
1685
+ ```
1686
+
1687
+ _See code: [src/commands/user/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/user/get.ts)_
1617
1688
 
1618
1689
  ## `agentia work create`
1619
1690
 
@@ -1668,7 +1739,7 @@ EXAMPLES
1668
1739
  $ agentia work create --title "My story" --json
1669
1740
  ```
1670
1741
 
1671
- _See code: [src/commands/work/create.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/work/create.ts)_
1742
+ _See code: [src/commands/work/create.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/work/create.ts)_
1672
1743
 
1673
1744
  ## `agentia work delete ID`
1674
1745
 
@@ -1693,7 +1764,7 @@ EXAMPLES
1693
1764
  $ agentia work delete a0SKC000000CmZ2AU --json
1694
1765
  ```
1695
1766
 
1696
- _See code: [src/commands/work/delete.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/work/delete.ts)_
1767
+ _See code: [src/commands/work/delete.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/work/delete.ts)_
1697
1768
 
1698
1769
  ## `agentia work get ID`
1699
1770
 
@@ -1718,7 +1789,7 @@ EXAMPLES
1718
1789
  $ agentia work get a0SKC000000CmZ2AU --json
1719
1790
  ```
1720
1791
 
1721
- _See code: [src/commands/work/get.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/work/get.ts)_
1792
+ _See code: [src/commands/work/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/work/get.ts)_
1722
1793
 
1723
1794
  ## `agentia work list`
1724
1795
 
@@ -1761,7 +1832,7 @@ EXAMPLES
1761
1832
  $ agentia work list --json
1762
1833
  ```
1763
1834
 
1764
- _See code: [src/commands/work/list.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/work/list.ts)_
1835
+ _See code: [src/commands/work/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/work/list.ts)_
1765
1836
 
1766
1837
  ## `agentia work update ID`
1767
1838
 
@@ -1819,5 +1890,5 @@ EXAMPLES
1819
1890
  $ agentia work update a0SKC000000CmZ2AU --status "In Progress" --json
1820
1891
  ```
1821
1892
 
1822
- _See code: [src/commands/work/update.ts](https://github.com/Copado/agentia-cli/blob/v0.10.0-alpha.0/src/commands/work/update.ts)_
1893
+ _See code: [src/commands/work/update.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/work/update.ts)_
1823
1894
  <!-- commandsstop -->
@@ -13,5 +13,11 @@ export declare function formatEnvironmentTable(environments: Environment[]): str
13
13
  export default class EnvironmentList extends AgentiaCommand {
14
14
  static description: string;
15
15
  static examples: string[];
16
+ static flags: {
17
+ readonly name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ readonly 'org-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ readonly platform: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ readonly type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
+ };
16
22
  run(): Promise<Environment[]>;
17
23
  }
@@ -1,5 +1,7 @@
1
1
  import { AgentiaCommand } from '../../lib/agentia-command.js';
2
2
  import { CicdGateway } from '../../lib/cicd-gateway.js';
3
+ import { buildEnvironmentListFilters, environmentListFilterFlags } from '../../lib/environment-flags.js';
4
+ import { environmentsListEndpoint } from '../../lib/environment-types.js';
3
5
  import { cellValue, table } from '../../lib/format.js';
4
6
  export function normalizeEnvironments(response) {
5
7
  if (Array.isArray(response.data)) {
@@ -43,12 +45,15 @@ export default class EnvironmentList extends AgentiaCommand {
43
45
  static description = 'List Copado environments';
44
46
  static examples = [
45
47
  '<%= config.bin %> <%= command.id %>',
48
+ '<%= config.bin %> <%= command.id %> --name Dev --org-id 00D000000000000 --platform SFDX --type Sandbox',
46
49
  '<%= config.bin %> <%= command.id %> --json',
47
50
  ];
51
+ static flags = environmentListFilterFlags;
48
52
  async run() {
49
- await this.parse(EnvironmentList);
53
+ const { flags } = await this.parse(EnvironmentList);
54
+ const filters = buildEnvironmentListFilters(flags);
50
55
  const response = await this.withSpinner('Fetching environments', () => CicdGateway.call({
51
- endpoint: '/corpus/environments',
56
+ endpoint: environmentsListEndpoint(filters),
52
57
  method: 'GET',
53
58
  }));
54
59
  const environments = normalizeEnvironments(response);
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/environment/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAA;AAErD,OAAO,EAAC,SAAS,EAAE,KAAK,EAAC,MAAM,qBAAqB,CAAA;AAIpD,MAAM,UAAU,qBAAqB,CAAC,QAA8B;IAClE,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACjC,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,OAAO,EAAE,CAAA;AACX,CAAC;AAED,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAAA;AAElD,MAAM,UAAU,iCAAiC,CAAC,YAA2B;IAK3E,MAAM,KAAK,GAAG,YAAY,CAAC,MAAM,CAAA;IACjC,MAAM,SAAS,GAAG,KAAK,GAAG,+BAA+B,CAAA;IAEzD,OAAO;QACL,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,+BAA+B,CAAC,CAAC,CAAC,CAAC,YAAY;QAC5F,KAAK;QACL,SAAS;KACV,CAAA;AACH,CAAC;AAED,MAAM,UAAU,uCAAuC,CAAC,KAAa;IACnE,OAAO,iBAAiB,+BAA+B,OAAO,KAAK,gBAAgB,CAAA;AACrF,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,YAA2B;IAChE,MAAM,MAAM,GAAG;QACb,EAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAC;QAC1B,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAC;QACjC,EAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAC;QAC9B,EA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
+ export default class ProjectList extends AgentiaCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ readonly mine: import("@oclif/core/interfaces").BooleanFlag<boolean>;
8
+ };
9
+ run(): Promise<Project[]>;
10
+ }
@@ -0,0 +1,31 @@
1
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
2
+ import { CicdGateway } from '../../lib/cicd-gateway.js';
3
+ import { buildProjectListFilters, projectListFlags } from '../../lib/project-flags.js';
4
+ import { formatProjectTable, normalizeProjects, projectsListEndpoint, } from '../../lib/project-types.js';
5
+ export default class ProjectList extends AgentiaCommand {
6
+ static description = 'List Copado projects';
7
+ static examples = [
8
+ '<%= config.bin %> <%= command.id %>',
9
+ '<%= config.bin %> <%= command.id %> --mine',
10
+ '<%= config.bin %> <%= command.id %> --mine --json',
11
+ ];
12
+ static flags = projectListFlags;
13
+ async run() {
14
+ const { flags } = await this.parse(ProjectList);
15
+ const filters = buildProjectListFilters(flags);
16
+ const response = await this.withSpinner('Fetching projects', () => CicdGateway.call({
17
+ endpoint: projectsListEndpoint(filters),
18
+ method: 'GET',
19
+ }));
20
+ const projects = normalizeProjects(response);
21
+ this.display(() => {
22
+ if (projects.length === 0) {
23
+ this.log('No projects found.');
24
+ return;
25
+ }
26
+ this.log(formatProjectTable(projects));
27
+ });
28
+ return projects;
29
+ }
30
+ }
31
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/project/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAC,uBAAuB,EAAE,gBAAgB,EAAC,MAAM,4BAA4B,CAAA;AACpF,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EAEjB,oBAAoB,GAErB,MAAM,4BAA4B,CAAA;AAEnC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,cAAc;IACrD,MAAM,CAAU,WAAW,GAAG,sBAAsB,CAAA;IACpD,MAAM,CAAU,QAAQ,GAAG;QACzB,qCAAqC;QACrC,4CAA4C;QAC5C,mDAAmD;KACpD,CAAA;IACD,MAAM,CAAU,KAAK,GAAG,gBAAgB,CAAA;IAEjC,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;QAC7C,MAAM,OAAO,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAA;QAE9C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAChE,WAAW,CAAC,IAAI,CAA+B;YAC7C,QAAQ,EAAE,oBAAoB,CAAC,OAAO,CAAC;YACvC,MAAM,EAAE,KAAK;SACd,CAAC,CACH,CAAA;QACD,MAAM,QAAQ,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAA;QAE5C,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC1B,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;gBAC9B,OAAM;YACR,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAA;QACxC,CAAC,CAAC,CAAA;QAEF,OAAO,QAAQ,CAAA;IACjB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
2
+ import { type User } from '../../lib/user-types.js';
3
+ export default class UserGet extends AgentiaCommand {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ id: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
+ };
9
+ run(): Promise<User>;
10
+ }
@@ -0,0 +1,32 @@
1
+ import { Flags } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
3
+ import { CicdGateway } from '../../lib/cicd-gateway.js';
4
+ import { DEFAULT_USER_ID, formatUserDetail, resolveUserId, userEndpoint } from '../../lib/user-types.js';
5
+ export default class UserGet extends AgentiaCommand {
6
+ static description = 'Get a Copado user by ID (defaults to the authenticated user)';
7
+ static examples = [
8
+ '<%= config.bin %> <%= command.id %>',
9
+ '<%= config.bin %> <%= command.id %> --id me',
10
+ '<%= config.bin %> <%= command.id %> --id 005000000000000',
11
+ '<%= config.bin %> <%= command.id %> --json',
12
+ ];
13
+ static flags = {
14
+ id: Flags.string({
15
+ default: DEFAULT_USER_ID,
16
+ description: 'User ID, or "me" for the authenticated user',
17
+ }),
18
+ };
19
+ async run() {
20
+ const { flags } = await this.parse(UserGet);
21
+ const userId = resolveUserId(flags.id);
22
+ const user = await this.withSpinner('Fetching user', () => CicdGateway.call({
23
+ endpoint: userEndpoint(userId),
24
+ method: 'GET',
25
+ }));
26
+ this.display(() => {
27
+ this.log(formatUserDetail(user));
28
+ });
29
+ return user;
30
+ }
31
+ }
32
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/commands/user/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAC,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAa,YAAY,EAAC,MAAM,yBAAyB,CAAA;AAEjH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,cAAc;IACjD,MAAM,CAAU,WAAW,GAAG,8DAA8D,CAAA;IAC5F,MAAM,CAAU,QAAQ,GAAG;QACzB,qCAAqC;QACrC,6CAA6C;QAC7C,0DAA0D;QAC1D,4CAA4C;KAC7C,CAAA;IACD,MAAM,CAAU,KAAK,GAAG;QACtB,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC;YACf,OAAO,EAAE,eAAe;YACxB,WAAW,EAAE,6CAA6C;SAC3D,CAAC;KACH,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QACzC,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QAEtC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,GAAG,EAAE,CACxD,WAAW,CAAC,IAAI,CAAO;YACrB,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC;YAC9B,MAAM,EAAE,KAAK;SACd,CAAC,CACH,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAA;QAClC,CAAC,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC"}
@@ -1,7 +1,17 @@
1
- import { type EnvironmentMutationPayload } from './environment-types.js';
1
+ import { type EnvironmentListFilters, type EnvironmentMutationPayload } from './environment-types.js';
2
2
  export declare const environmentPlatformFlag: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
3
3
  export declare const environmentTypeFlag: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
4
4
  export declare const environmentCreateTypeFlag: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
5
+ export declare const environmentListFilterFlags: {
6
+ readonly name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
+ readonly 'org-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ readonly platform: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ readonly type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ };
11
+ export type EnvironmentListFilterFlagValues = {
12
+ [K in keyof typeof environmentListFilterFlags]?: string;
13
+ };
14
+ export declare function buildEnvironmentListFilters(flags: EnvironmentListFilterFlagValues): EnvironmentListFilters;
5
15
  export declare const environmentMutationStringFlags: {
6
16
  readonly 'apex-test-level': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
17
  readonly name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;