earl 0.5.2

AI-safe CLI for AI agents
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
version = 1
provider = "gitlab"
categories = ["devops", "version-control", "ci-cd"]

command "get_current_user" {
  title       = "Get current user"
  summary     = "Get the currently authenticated GitLab user"
  description = "Retrieve profile information for the user associated with the provided token."
  categories  = ["users"]

  annotations {
    mode    = "read"
    secrets = ["gitlab.token"]
  }

  operation {
    protocol = "http"
    method   = "GET"
    url      = "https://gitlab.com/api/v4/user"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }
  }

  result {
    decode = "json"
    output = "{{ result.username }} ({{ result.name }}) — ID: {{ result.id }}, email: {{ result.email }}, state: {{ result.state }}"
  }
}

command "list_projects" {
  title       = "List projects"
  summary     = "List GitLab projects visible to the authenticated user"
  description = "Search and list projects. Filter by ownership, visibility, or search term."
  categories  = ["projects"]

  annotations {
    mode    = "read"
    secrets = ["gitlab.token"]
  }

  param "search" {
    type        = "string"
    required    = false
    description = "Search by name, path, or description"
  }

  param "owned" {
    type        = "boolean"
    required    = false
    default     = false
    description = "Only return projects owned by the current user"
  }

  param "visibility" {
    type        = "string"
    required    = false
    description = "Filter by visibility: public, internal, or private"
  }

  param "per_page" {
    type        = "integer"
    required    = false
    default     = 20
    description = "Number of results per page (max 100)"
  }

  operation {
    protocol = "http"
    method   = "GET"
    url      = "https://gitlab.com/api/v4/projects"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }

    query = {
      search     = "{{ args.search }}"
      owned      = "{{ args.owned }}"
      visibility = "{{ args.visibility }}"
      per_page   = "{{ args.per_page }}"
    }
  }

  result {
    decode = "json"
    output = "Found {{ result | length }} projects."
  }
}

command "get_project" {
  title       = "Get project"
  summary     = "Get details of a specific GitLab project"
  description = "Retrieve detailed information about a project by its numeric ID or URL-encoded path (e.g. my-group%2Fmy-project)."
  categories  = ["projects"]

  annotations {
    mode    = "read"
    secrets = ["gitlab.token"]
  }

  param "project_id" {
    type        = "string"
    required    = true
    description = "Project ID (integer) or URL-encoded namespace/path"
  }

  operation {
    protocol = "http"
    method   = "GET"
    url      = "https://gitlab.com/api/v4/projects/{{ args.project_id }}"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }
  }

  result {
    decode = "json"
    output = "{{ result.path_with_namespace }} (ID: {{ result.id }}) [{{ result.visibility }}] — default branch: {{ result.default_branch }}, stars: {{ result.star_count }}, forks: {{ result.forks_count }} — {{ result.web_url }}"
  }
}

command "create_project" {
  title       = "Create project"
  summary     = "Create a new GitLab project"
  description = "Create a new project. Optionally specify visibility, namespace, and whether to initialize with a README."
  categories  = ["projects"]

  annotations {
    mode    = "write"
    secrets = ["gitlab.token"]
  }

  param "name" {
    type        = "string"
    required    = true
    description = "Project name"
  }

  param "description" {
    type        = "string"
    required    = false
    description = "Project description"
  }

  param "visibility" {
    type        = "string"
    required    = false
    default     = "private"
    description = "Visibility level: private, internal, or public"
  }

  param "namespace_id" {
    type        = "integer"
    required    = false
    description = "Group or namespace ID to create the project in"
  }

  param "initialize_with_readme" {
    type        = "boolean"
    required    = false
    default     = false
    description = "Initialize the repository with a README"
  }

  operation {
    protocol = "http"
    method   = "POST"
    url      = "https://gitlab.com/api/v4/projects"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }

    body {
      kind = "json"
      value = {
        name                     = "{{ args.name }}"
        description              = "{{ args.description }}"
        visibility               = "{{ args.visibility }}"
        namespace_id             = "{{ args.namespace_id }}"
        initialize_with_readme   = "{{ args.initialize_with_readme }}"
      }
    }
  }

  result {
    decode = "json"
    output = "Created project {{ result.path_with_namespace }} (ID: {{ result.id }}) [{{ result.visibility }}] — {{ result.web_url }}"
  }
}

command "list_issues" {
  title       = "List issues"
  summary     = "List issues for a GitLab project"
  description = "List issues in a project with optional filters for state, labels, assignee, and milestone."
  categories  = ["issues"]

  annotations {
    mode    = "read"
    secrets = ["gitlab.token"]
  }

  param "project_id" {
    type        = "string"
    required    = true
    description = "Project ID or URL-encoded path"
  }

  param "state" {
    type        = "string"
    required    = false
    default     = "opened"
    description = "Filter by state: opened, closed, or all"
  }

  param "labels" {
    type        = "string"
    required    = false
    description = "Comma-separated label names to filter by"
  }

  param "search" {
    type        = "string"
    required    = false
    description = "Search in title and description"
  }

  param "per_page" {
    type        = "integer"
    required    = false
    default     = 20
    description = "Number of results per page (max 100)"
  }

  operation {
    protocol = "http"
    method   = "GET"
    url      = "https://gitlab.com/api/v4/projects/{{ args.project_id }}/issues"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }

    query = {
      state    = "{{ args.state }}"
      labels   = "{{ args.labels }}"
      search   = "{{ args.search }}"
      per_page = "{{ args.per_page }}"
    }
  }

  result {
    decode = "json"
    output = "Found {{ result | length }} issues."
  }
}

command "get_issue" {
  title       = "Get issue"
  summary     = "Get details of a specific issue"
  description = "Retrieve detailed information about a single issue by its project-scoped IID."
  categories  = ["issues"]

  annotations {
    mode    = "read"
    secrets = ["gitlab.token"]
  }

  param "project_id" {
    type        = "string"
    required    = true
    description = "Project ID or URL-encoded path"
  }

  param "issue_iid" {
    type        = "integer"
    required    = true
    description = "Project-scoped issue IID"
  }

  operation {
    protocol = "http"
    method   = "GET"
    url      = "https://gitlab.com/api/v4/projects/{{ args.project_id }}/issues/{{ args.issue_iid }}"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }
  }

  result {
    decode = "json"
    output = "Issue #{{ result.iid }}: {{ result.title }} [{{ result.state }}] — author: {{ result.author.username }}, labels: {{ result.labels | join(\", \") }}, {{ result.web_url }}"
  }
}

command "create_issue" {
  title       = "Create issue"
  summary     = "Create a new issue in a GitLab project"
  description = "Create a new issue with a title and optional description, labels, and assignees."
  categories  = ["issues"]

  annotations {
    mode    = "write"
    secrets = ["gitlab.token"]
  }

  param "project_id" {
    type        = "string"
    required    = true
    description = "Project ID or URL-encoded path"
  }

  param "title" {
    type        = "string"
    required    = true
    description = "Issue title"
  }

  param "description" {
    type        = "string"
    required    = false
    description = "Issue description (supports Markdown)"
  }

  param "labels" {
    type        = "string"
    required    = false
    description = "Comma-separated label names"
  }

  param "assignee_ids" {
    type        = "string"
    required    = false
    description = "Comma-separated user IDs to assign"
  }

  param "confidential" {
    type        = "boolean"
    required    = false
    default     = false
    description = "Mark as confidential"
  }

  operation {
    protocol = "http"
    method   = "POST"
    url      = "https://gitlab.com/api/v4/projects/{{ args.project_id }}/issues"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }

    body {
      kind = "json"
      value = {
        title         = "{{ args.title }}"
        description   = "{{ args.description }}"
        labels        = "{{ args.labels }}"
        assignee_ids  = "{{ args.assignee_ids }}"
        confidential  = "{{ args.confidential }}"
      }
    }
  }

  result {
    decode = "json"
    output = "Created issue #{{ result.iid }}: {{ result.title }} — {{ result.web_url }}"
  }
}

command "update_issue" {
  title       = "Update issue"
  summary     = "Update an existing issue"
  description = "Update an issue's title, description, state, labels, or assignees."
  categories  = ["issues"]

  annotations {
    mode    = "write"
    secrets = ["gitlab.token"]
  }

  param "project_id" {
    type        = "string"
    required    = true
    description = "Project ID or URL-encoded path"
  }

  param "issue_iid" {
    type        = "integer"
    required    = true
    description = "Project-scoped issue IID"
  }

  param "title" {
    type        = "string"
    required    = false
    description = "New issue title"
  }

  param "description" {
    type        = "string"
    required    = false
    description = "New issue description"
  }

  param "state_event" {
    type        = "string"
    required    = false
    description = "Change state: close or reopen"
  }

  param "labels" {
    type        = "string"
    required    = false
    description = "Replace all labels (comma-separated names)"
  }

  param "add_labels" {
    type        = "string"
    required    = false
    description = "Labels to add (comma-separated)"
  }

  operation {
    protocol = "http"
    method   = "PUT"
    url      = "https://gitlab.com/api/v4/projects/{{ args.project_id }}/issues/{{ args.issue_iid }}"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }

    body {
      kind = "json"
      value = {
        title       = "{{ args.title }}"
        description = "{{ args.description }}"
        state_event = "{{ args.state_event }}"
        labels      = "{{ args.labels }}"
        add_labels  = "{{ args.add_labels }}"
      }
    }
  }

  result {
    decode = "json"
    output = "Updated issue #{{ result.iid }}: {{ result.title }} [{{ result.state }}] — {{ result.web_url }}"
  }
}

command "list_merge_requests" {
  title       = "List merge requests"
  summary     = "List merge requests for a GitLab project"
  description = "List merge requests with optional filters for state, scope, labels, and search."
  categories  = ["merge-requests"]

  annotations {
    mode    = "read"
    secrets = ["gitlab.token"]
  }

  param "project_id" {
    type        = "string"
    required    = true
    description = "Project ID or URL-encoded path"
  }

  param "state" {
    type        = "string"
    required    = false
    default     = "opened"
    description = "Filter by state: opened, closed, merged, locked, or all"
  }

  param "scope" {
    type        = "string"
    required    = false
    description = "Filter by scope: created_by_me, assigned_to_me, or all"
  }

  param "labels" {
    type        = "string"
    required    = false
    description = "Comma-separated label names to filter by"
  }

  param "per_page" {
    type        = "integer"
    required    = false
    default     = 20
    description = "Number of results per page (max 100)"
  }

  operation {
    protocol = "http"
    method   = "GET"
    url      = "https://gitlab.com/api/v4/projects/{{ args.project_id }}/merge_requests"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }

    query = {
      state    = "{{ args.state }}"
      scope    = "{{ args.scope }}"
      labels   = "{{ args.labels }}"
      per_page = "{{ args.per_page }}"
    }
  }

  result {
    decode = "json"
    output = "Found {{ result | length }} merge requests."
  }
}

command "get_merge_request" {
  title       = "Get merge request"
  summary     = "Get details of a specific merge request"
  description = "Retrieve detailed information about a merge request including its status, branches, and pipeline state."
  categories  = ["merge-requests"]

  annotations {
    mode    = "read"
    secrets = ["gitlab.token"]
  }

  param "project_id" {
    type        = "string"
    required    = true
    description = "Project ID or URL-encoded path"
  }

  param "merge_request_iid" {
    type        = "integer"
    required    = true
    description = "Project-scoped merge request IID"
  }

  operation {
    protocol = "http"
    method   = "GET"
    url      = "https://gitlab.com/api/v4/projects/{{ args.project_id }}/merge_requests/{{ args.merge_request_iid }}"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }
  }

  result {
    decode = "json"
    output = "MR !{{ result.iid }}: {{ result.title }} [{{ result.state }}] — {{ result.source_branch }} -> {{ result.target_branch }}, author: {{ result.author.username }}, conflicts: {{ result.has_conflicts }}, {{ result.web_url }}"
  }
}

command "create_merge_request" {
  title       = "Create merge request"
  summary     = "Create a new merge request"
  description = "Create a merge request from a source branch to a target branch with optional reviewers and labels."
  categories  = ["merge-requests"]

  annotations {
    mode    = "write"
    secrets = ["gitlab.token"]
  }

  param "project_id" {
    type        = "string"
    required    = true
    description = "Project ID or URL-encoded path"
  }

  param "source_branch" {
    type        = "string"
    required    = true
    description = "Source branch name"
  }

  param "target_branch" {
    type        = "string"
    required    = true
    description = "Target branch name"
  }

  param "title" {
    type        = "string"
    required    = true
    description = "Merge request title"
  }

  param "description" {
    type        = "string"
    required    = false
    description = "Merge request description (supports Markdown)"
  }

  param "draft" {
    type        = "boolean"
    required    = false
    default     = false
    description = "Mark as draft"
  }

  param "squash" {
    type        = "boolean"
    required    = false
    default     = false
    description = "Squash commits when merging"
  }

  param "remove_source_branch" {
    type        = "boolean"
    required    = false
    default     = false
    description = "Delete source branch after merge"
  }

  operation {
    protocol = "http"
    method   = "POST"
    url      = "https://gitlab.com/api/v4/projects/{{ args.project_id }}/merge_requests"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }

    body {
      kind = "json"
      value = {
        source_branch        = "{{ args.source_branch }}"
        target_branch        = "{{ args.target_branch }}"
        title                = "{{ args.title }}"
        description          = "{{ args.description }}"
        draft                = "{{ args.draft }}"
        squash               = "{{ args.squash }}"
        remove_source_branch = "{{ args.remove_source_branch }}"
      }
    }
  }

  result {
    decode = "json"
    output = "Created MR !{{ result.iid }}: {{ result.title }} ({{ result.source_branch }} -> {{ result.target_branch }}) — {{ result.web_url }}"
  }
}

command "merge_merge_request" {
  title       = "Merge a merge request"
  summary     = "Merge an open merge request"
  description = "Accept and merge a merge request. Optionally squash commits, delete the source branch, or set auto-merge when the pipeline succeeds."
  categories  = ["merge-requests"]

  annotations {
    mode    = "write"
    secrets = ["gitlab.token"]
  }

  param "project_id" {
    type        = "string"
    required    = true
    description = "Project ID or URL-encoded path"
  }

  param "merge_request_iid" {
    type        = "integer"
    required    = true
    description = "Project-scoped merge request IID"
  }

  param "squash" {
    type        = "boolean"
    required    = false
    default     = false
    description = "Squash commits on merge"
  }

  param "should_remove_source_branch" {
    type        = "boolean"
    required    = false
    default     = false
    description = "Delete source branch after merge"
  }

  param "merge_when_pipeline_succeeds" {
    type        = "boolean"
    required    = false
    default     = false
    description = "Auto-merge when the pipeline passes"
  }

  operation {
    protocol = "http"
    method   = "PUT"
    url      = "https://gitlab.com/api/v4/projects/{{ args.project_id }}/merge_requests/{{ args.merge_request_iid }}/merge"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }

    body {
      kind = "json"
      value = {
        squash                       = "{{ args.squash }}"
        should_remove_source_branch  = "{{ args.should_remove_source_branch }}"
        merge_when_pipeline_succeeds = "{{ args.merge_when_pipeline_succeeds }}"
      }
    }
  }

  result {
    decode = "json"
    output = "Merged !{{ result.iid }}: {{ result.title }} ({{ result.source_branch }} -> {{ result.target_branch }}) — merge commit: {{ result.merge_commit_sha }}"
  }
}

command "list_pipelines" {
  title       = "List pipelines"
  summary     = "List CI/CD pipelines for a project"
  description = "List pipelines with optional filters for status, ref, and scope."
  categories  = ["ci-cd"]

  annotations {
    mode    = "read"
    secrets = ["gitlab.token"]
  }

  param "project_id" {
    type        = "string"
    required    = true
    description = "Project ID or URL-encoded path"
  }

  param "status" {
    type        = "string"
    required    = false
    description = "Filter by status: running, pending, success, failed, canceled, skipped, or manual"
  }

  param "ref" {
    type        = "string"
    required    = false
    description = "Filter by branch or tag name"
  }

  param "per_page" {
    type        = "integer"
    required    = false
    default     = 20
    description = "Number of results per page (max 100)"
  }

  operation {
    protocol = "http"
    method   = "GET"
    url      = "https://gitlab.com/api/v4/projects/{{ args.project_id }}/pipelines"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }

    query = {
      status   = "{{ args.status }}"
      ref      = "{{ args.ref }}"
      per_page = "{{ args.per_page }}"
    }
  }

  result {
    decode = "json"
    output = "Found {{ result | length }} pipelines."
  }
}

command "create_pipeline" {
  title       = "Create pipeline"
  summary     = "Trigger a new CI/CD pipeline"
  description = "Create and trigger a new pipeline on a given branch or tag."
  categories  = ["ci-cd"]

  annotations {
    mode    = "write"
    secrets = ["gitlab.token"]
  }

  param "project_id" {
    type        = "string"
    required    = true
    description = "Project ID or URL-encoded path"
  }

  param "ref" {
    type        = "string"
    required    = true
    description = "Branch or tag to run the pipeline on"
  }

  operation {
    protocol = "http"
    method   = "POST"
    url      = "https://gitlab.com/api/v4/projects/{{ args.project_id }}/pipeline"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }

    body {
      kind = "json"
      value = {
        ref = "{{ args.ref }}"
      }
    }
  }

  result {
    decode = "json"
    output = "Created pipeline #{{ result.id }} [{{ result.status }}] on ref {{ result.ref }} — {{ result.web_url }}"
  }
}

command "list_groups" {
  title       = "List groups"
  summary     = "List GitLab groups visible to the authenticated user"
  description = "List groups with optional filters for search, ownership, and visibility."
  categories  = ["groups"]

  annotations {
    mode    = "read"
    secrets = ["gitlab.token"]
  }

  param "search" {
    type        = "string"
    required    = false
    description = "Filter by group name or path"
  }

  param "owned" {
    type        = "boolean"
    required    = false
    default     = false
    description = "Only return groups owned by the current user"
  }

  param "visibility" {
    type        = "string"
    required    = false
    description = "Filter by visibility: public, internal, or private"
  }

  param "per_page" {
    type        = "integer"
    required    = false
    default     = 20
    description = "Number of results per page (max 100)"
  }

  operation {
    protocol = "http"
    method   = "GET"
    url      = "https://gitlab.com/api/v4/groups"

    auth {
      kind     = "api_key"
      location = "header"
      name     = "PRIVATE-TOKEN"
      secret   = "gitlab.token"
    }

    query = {
      search     = "{{ args.search }}"
      owned      = "{{ args.owned }}"
      visibility = "{{ args.visibility }}"
      per_page   = "{{ args.per_page }}"
    }
  }

  result {
    decode = "json"
    output = "Found {{ result | length }} groups."
  }
}