@olegkoval/agent-skills 1.0.0-beta.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 (79) hide show
  1. package/.claude-plugin/marketplace.json +58 -0
  2. package/.cursor-plugin/index.json +55 -0
  3. package/LICENSE +21 -0
  4. package/README.md +181 -0
  5. package/catalog/skills.json +202 -0
  6. package/collections/creative-tools.json +5 -0
  7. package/collections/docs-tools.json +5 -0
  8. package/collections/git-tools.json +5 -0
  9. package/collections/marketing.json +5 -0
  10. package/collections/music.json +5 -0
  11. package/collections/photography.json +5 -0
  12. package/collections/product-tools.json +5 -0
  13. package/collections/prompt-tools.json +5 -0
  14. package/collections/release-tools.json +5 -0
  15. package/collections/software-development.json +13 -0
  16. package/package.json +47 -0
  17. package/packages/marketing/viral-launch/SKILL.md +101 -0
  18. package/packages/marketing/viral-launch/adapters/claude/plugin.json +10 -0
  19. package/packages/marketing/viral-launch/adapters/codex/README.md +3 -0
  20. package/packages/marketing/viral-launch/adapters/cursor/plugin.json +6 -0
  21. package/packages/marketing/viral-launch/adapters/cursor/skills/viral-launch/SKILL.md +103 -0
  22. package/packages/marketing/viral-launch/references/external-skills.md +12 -0
  23. package/packages/marketing/viral-launch/references/launch-checklist.md +42 -0
  24. package/packages/music/fill-music-player/LICENSE +21 -0
  25. package/packages/music/fill-music-player/SKILL.md +108 -0
  26. package/packages/music/fill-music-player/adapters/claude/plugin.json +10 -0
  27. package/packages/music/fill-music-player/adapters/codex/README.md +3 -0
  28. package/packages/music/fill-music-player/adapters/cursor/plugin.json +6 -0
  29. package/packages/music/fill-music-player/adapters/cursor/skills/fill-music-player/SKILL.md +110 -0
  30. package/packages/photography/gallery/.skillfish.json +10 -0
  31. package/packages/photography/gallery/SKILL.md +233 -0
  32. package/packages/photography/gallery/adapters/claude/plugin.json +10 -0
  33. package/packages/photography/gallery/adapters/codex/README.md +3 -0
  34. package/packages/photography/gallery/adapters/cursor/plugin.json +6 -0
  35. package/packages/photography/gallery/adapters/cursor/skills/gallery/SKILL.md +235 -0
  36. package/packages/software-development/changelog-generator/SKILL.md +111 -0
  37. package/packages/software-development/changelog-generator/adapters/claude/plugin.json +10 -0
  38. package/packages/software-development/changelog-generator/adapters/codex/README.md +3 -0
  39. package/packages/software-development/changelog-generator/adapters/cursor/plugin.json +6 -0
  40. package/packages/software-development/changelog-generator/adapters/cursor/skills/changelog-generator/SKILL.md +113 -0
  41. package/packages/software-development/docs-index-keeper/SKILL.md +62 -0
  42. package/packages/software-development/docs-index-keeper/adapters/claude/plugin.json +10 -0
  43. package/packages/software-development/docs-index-keeper/adapters/codex/README.md +5 -0
  44. package/packages/software-development/docs-index-keeper/adapters/cursor/plugin.json +6 -0
  45. package/packages/software-development/docs-index-keeper/adapters/cursor/skills/docs-index-keeper/SKILL.md +64 -0
  46. package/packages/software-development/gh-cli/SKILL.md +2196 -0
  47. package/packages/software-development/gh-cli/adapters/claude/plugin.json +10 -0
  48. package/packages/software-development/gh-cli/adapters/codex/README.md +3 -0
  49. package/packages/software-development/gh-cli/adapters/cursor/plugin.json +6 -0
  50. package/packages/software-development/gh-cli/adapters/cursor/skills/gh-cli/SKILL.md +2198 -0
  51. package/packages/software-development/git-commit/SKILL.md +131 -0
  52. package/packages/software-development/git-commit/adapters/claude/plugin.json +10 -0
  53. package/packages/software-development/git-commit/adapters/codex/README.md +3 -0
  54. package/packages/software-development/git-commit/adapters/cursor/plugin.json +6 -0
  55. package/packages/software-development/git-commit/adapters/cursor/skills/git-commit/SKILL.md +133 -0
  56. package/packages/software-development/product-builder/LICENSE +21 -0
  57. package/packages/software-development/product-builder/SKILL.md +221 -0
  58. package/packages/software-development/product-builder/adapters/claude/plugin.json +10 -0
  59. package/packages/software-development/product-builder/adapters/codex/README.md +3 -0
  60. package/packages/software-development/product-builder/adapters/cursor/plugin.json +6 -0
  61. package/packages/software-development/product-builder/adapters/cursor/skills/product-builder/SKILL.md +223 -0
  62. package/packages/software-development/promptctl/SKILL.md +86 -0
  63. package/packages/software-development/promptctl/adapters/claude/plugin.json +10 -0
  64. package/packages/software-development/promptctl/adapters/codex/README.md +3 -0
  65. package/packages/software-development/promptctl/adapters/cursor/plugin.json +6 -0
  66. package/packages/software-development/promptctl/adapters/cursor/skills/promptctl/SKILL.md +88 -0
  67. package/packages/software-development/semantic-release-beta/SKILL.md +55 -0
  68. package/packages/software-development/semantic-release-beta/adapters/claude/plugin.json +10 -0
  69. package/packages/software-development/semantic-release-beta/adapters/codex/README.md +3 -0
  70. package/packages/software-development/semantic-release-beta/adapters/cursor/plugin.json +6 -0
  71. package/packages/software-development/semantic-release-beta/adapters/cursor/skills/semantic-release-beta/SKILL.md +57 -0
  72. package/packages/software-development/semantic-release-beta/references/github-actions.md +16 -0
  73. package/packages/software-development/semantic-release-beta/references/node-semantic-release.md +13 -0
  74. package/packages/software-development/semantic-release-beta/references/preset.md +47 -0
  75. package/packages/software-development/semantic-release-beta/references/validation.md +17 -0
  76. package/scripts/build-adapters.sh +115 -0
  77. package/scripts/install-codex-symlinks.sh +37 -0
  78. package/scripts/sync-from-sources.sh +44 -0
  79. package/scripts/validate-catalog.sh +90 -0
@@ -0,0 +1,2198 @@
1
+ <!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
2
+
3
+ ---
4
+ name: gh-cli
5
+ description: GitHub CLI (gh) comprehensive reference for repositories, issues, pull requests, Actions, projects, releases, gists, codespaces, organizations, extensions, and all GitHub operations from the command line.
6
+ compatibility: Codex, Claude Code, Cursor, and other Agent Skills compatible tools. Requires the GitHub CLI and valid GitHub authentication.
7
+ metadata:
8
+ author: Oleg Koval
9
+ tags:
10
+ - github
11
+ - gh
12
+ - cli
13
+ - pull-requests
14
+ - actions
15
+ ---
16
+
17
+ # GitHub CLI (gh)
18
+
19
+ Comprehensive reference for GitHub CLI (gh) - work seamlessly with GitHub from the command line.
20
+
21
+ **Version:** 2.85.0 (current as of January 2026)
22
+
23
+ ## Prerequisites
24
+
25
+ ### Installation
26
+
27
+ ```bash
28
+ # macOS
29
+ brew install gh
30
+
31
+ # Linux
32
+ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
33
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
34
+ sudo apt update
35
+ sudo apt install gh
36
+
37
+ # Windows
38
+ winget install --id GitHub.cli
39
+
40
+ # Verify installation
41
+ gh --version
42
+ ```
43
+
44
+ ### Authentication
45
+
46
+ ```bash
47
+ # Interactive login (default: github.com)
48
+ gh auth login
49
+
50
+ # Login with specific hostname
51
+ gh auth login --hostname enterprise.internal
52
+
53
+ # Login with token
54
+ gh auth login --with-token < mytoken.txt
55
+
56
+ # Check authentication status
57
+ gh auth status
58
+
59
+ # Switch accounts
60
+ gh auth switch --hostname github.com --user username
61
+
62
+ # Logout
63
+ gh auth logout --hostname github.com --user username
64
+ ```
65
+
66
+ ### Setup Git Integration
67
+
68
+ ```bash
69
+ # Configure git to use gh as credential helper
70
+ gh auth setup-git
71
+
72
+ # View active token
73
+ gh auth token
74
+
75
+ # Refresh authentication scopes
76
+ gh auth refresh --scopes write:org,read:public_key
77
+ ```
78
+
79
+ ## CLI Structure
80
+
81
+ ```
82
+ gh # Root command
83
+ ├── auth # Authentication
84
+ │ ├── login
85
+ │ ├── logout
86
+ │ ├── refresh
87
+ │ ├── setup-git
88
+ │ ├── status
89
+ │ ├── switch
90
+ │ └── token
91
+ ├── browse # Open in browser
92
+ ├── codespace # GitHub Codespaces
93
+ │ ├── code
94
+ │ ├── cp
95
+ │ ├── create
96
+ │ ├── delete
97
+ │ ├── edit
98
+ │ ├── jupyter
99
+ │ ├── list
100
+ │ ├── logs
101
+ │ ├── ports
102
+ │ ├── rebuild
103
+ │ ├── ssh
104
+ │ ├── stop
105
+ │ └── view
106
+ ├── gist # Gists
107
+ │ ├── clone
108
+ │ ├── create
109
+ │ ├── delete
110
+ │ ├── edit
111
+ │ ├── list
112
+ │ ├── rename
113
+ │ └── view
114
+ ├── issue # Issues
115
+ │ ├── create
116
+ │ ├── list
117
+ │ ├── status
118
+ │ ├── close
119
+ │ ├── comment
120
+ │ ├── delete
121
+ │ ├── develop
122
+ │ ├── edit
123
+ │ ├── lock
124
+ │ ├── pin
125
+ │ ├── reopen
126
+ │ ├── transfer
127
+ │ ├── unlock
128
+ │ └── view
129
+ ├── org # Organizations
130
+ │ └── list
131
+ ├── pr # Pull Requests
132
+ │ ├── create
133
+ │ ├── list
134
+ │ ├── status
135
+ │ ├── checkout
136
+ │ ├── checks
137
+ │ ├── close
138
+ │ ├── comment
139
+ │ ├── diff
140
+ │ ├── edit
141
+ │ ├── lock
142
+ │ ├── merge
143
+ │ ├── ready
144
+ │ ├── reopen
145
+ │ ├── revert
146
+ │ ├── review
147
+ │ ├── unlock
148
+ │ ├── update-branch
149
+ │ └── view
150
+ ├── project # Projects
151
+ │ ├── close
152
+ │ ├── copy
153
+ │ ├── create
154
+ │ ├── delete
155
+ │ ├── edit
156
+ │ ├── field-create
157
+ │ ├── field-delete
158
+ │ ├── field-list
159
+ │ ├── item-add
160
+ │ ├── item-archive
161
+ │ ├── item-create
162
+ │ ├── item-delete
163
+ │ ├── item-edit
164
+ │ ├── item-list
165
+ │ ├── link
166
+ │ ├── list
167
+ │ ├── mark-template
168
+ │ ├── unlink
169
+ │ └── view
170
+ ├── release # Releases
171
+ │ ├── create
172
+ │ ├── list
173
+ │ ├── delete
174
+ │ ├── delete-asset
175
+ │ ├── download
176
+ │ ├── edit
177
+ │ ├── upload
178
+ │ ├── verify
179
+ │ ├── verify-asset
180
+ │ └── view
181
+ ├── repo # Repositories
182
+ │ ├── create
183
+ │ ├── list
184
+ │ ├── archive
185
+ │ ├── autolink
186
+ │ ├── clone
187
+ │ ├── delete
188
+ │ ├── deploy-key
189
+ │ ├── edit
190
+ │ ├── fork
191
+ │ ├── gitignore
192
+ │ ├── license
193
+ │ ├── rename
194
+ │ ├── set-default
195
+ │ ├── sync
196
+ │ ├── unarchive
197
+ │ └── view
198
+ ├── cache # Actions caches
199
+ │ ├── delete
200
+ │ └── list
201
+ ├── run # Workflow runs
202
+ │ ├── cancel
203
+ │ ├── delete
204
+ │ ├── download
205
+ │ ├── list
206
+ │ ├── rerun
207
+ │ ├── view
208
+ │ └── watch
209
+ ├── workflow # Workflows
210
+ │ ├── disable
211
+ │ ├── enable
212
+ │ ├── list
213
+ │ ├── run
214
+ │ └── view
215
+ ├── agent-task # Agent tasks
216
+ ├── alias # Command aliases
217
+ │ ├── delete
218
+ │ ├── import
219
+ │ ├── list
220
+ │ └── set
221
+ ├── api # API requests
222
+ ├── attestation # Artifact attestations
223
+ │ ├── download
224
+ │ ├── trusted-root
225
+ │ └── verify
226
+ ├── completion # Shell completion
227
+ ├── config # Configuration
228
+ │ ├── clear-cache
229
+ │ ├── get
230
+ │ ├── list
231
+ │ └── set
232
+ ├── extension # Extensions
233
+ │ ├── browse
234
+ │ ├── create
235
+ │ ├── exec
236
+ │ ├── install
237
+ │ ├── list
238
+ │ ├── remove
239
+ │ ├── search
240
+ │ └── upgrade
241
+ ├── gpg-key # GPG keys
242
+ │ ├── add
243
+ │ ├── delete
244
+ │ └── list
245
+ ├── label # Labels
246
+ │ ├── clone
247
+ │ ├── create
248
+ │ ├── delete
249
+ │ ├── edit
250
+ │ └── list
251
+ ├── preview # Preview features
252
+ ├── ruleset # Rulesets
253
+ │ ├── check
254
+ │ ├── list
255
+ │ └── view
256
+ ├── search # Search
257
+ │ ├── code
258
+ │ ├── commits
259
+ │ ├── issues
260
+ │ ├── prs
261
+ │ └── repos
262
+ ├── secret # Secrets
263
+ │ ├── delete
264
+ │ ├── list
265
+ │ └── set
266
+ ├── ssh-key # SSH keys
267
+ │ ├── add
268
+ │ ├── delete
269
+ │ └── list
270
+ ├── status # Status overview
271
+ └── variable # Variables
272
+ ├── delete
273
+ ├── get
274
+ ├── list
275
+ └── set
276
+ ```
277
+
278
+ ## Configuration
279
+
280
+ ### Global Configuration
281
+
282
+ ```bash
283
+ # List all configuration
284
+ gh config list
285
+
286
+ # Get specific configuration value
287
+ gh config list git_protocol
288
+ gh config get editor
289
+
290
+ # Set configuration value
291
+ gh config set editor vim
292
+ gh config set git_protocol ssh
293
+ gh config set prompt disabled
294
+ gh config set pager "less -R"
295
+
296
+ # Clear configuration cache
297
+ gh config clear-cache
298
+ ```
299
+
300
+ ### Environment Variables
301
+
302
+ ```bash
303
+ # GitHub token (for automation)
304
+ export GH_TOKEN=ghp_xxxxxxxxxxxx
305
+
306
+ # GitHub hostname
307
+ export GH_HOST=github.com
308
+
309
+ # Disable prompts
310
+ export GH_PROMPT_DISABLED=true
311
+
312
+ # Custom editor
313
+ export GH_EDITOR=vim
314
+
315
+ # Custom pager
316
+ export GH_PAGER=less
317
+
318
+ # HTTP timeout
319
+ export GH_TIMEOUT=30
320
+
321
+ # Custom repository (override default)
322
+ export GH_REPO=owner/repo
323
+
324
+ # Custom git protocol
325
+ export GH_ENTERPRISE_HOSTNAME=hostname
326
+ ```
327
+
328
+ ## Authentication (gh auth)
329
+
330
+ ### Login
331
+
332
+ ```bash
333
+ # Interactive login
334
+ gh auth login
335
+
336
+ # Web-based authentication
337
+ gh auth login --web
338
+
339
+ # With clipboard for OAuth code
340
+ gh auth login --web --clipboard
341
+
342
+ # With specific git protocol
343
+ gh auth login --git-protocol ssh
344
+
345
+ # With custom hostname (GitHub Enterprise)
346
+ gh auth login --hostname enterprise.internal
347
+
348
+ # Login with token from stdin
349
+ gh auth login --with-token < token.txt
350
+
351
+ # Insecure storage (plain text)
352
+ gh auth login --insecure-storage
353
+ ```
354
+
355
+ ### Status
356
+
357
+ ```bash
358
+ # Show all authentication status
359
+ gh auth status
360
+
361
+ # Show active account only
362
+ gh auth status --active
363
+
364
+ # Show specific hostname
365
+ gh auth status --hostname github.com
366
+
367
+ # Show token in output
368
+ gh auth status --show-token
369
+
370
+ # JSON output
371
+ gh auth status --json hosts
372
+
373
+ # Filter with jq
374
+ gh auth status --json hosts --jq '.hosts | add'
375
+ ```
376
+
377
+ ### Switch Accounts
378
+
379
+ ```bash
380
+ # Interactive switch
381
+ gh auth switch
382
+
383
+ # Switch to specific user/host
384
+ gh auth switch --hostname github.com --user monalisa
385
+ ```
386
+
387
+ ### Token
388
+
389
+ ```bash
390
+ # Print authentication token
391
+ gh auth token
392
+
393
+ # Token for specific host/user
394
+ gh auth token --hostname github.com --user monalisa
395
+ ```
396
+
397
+ ### Refresh
398
+
399
+ ```bash
400
+ # Refresh credentials
401
+ gh auth refresh
402
+
403
+ # Add scopes
404
+ gh auth refresh --scopes write:org,read:public_key
405
+
406
+ # Remove scopes
407
+ gh auth refresh --remove-scopes delete_repo
408
+
409
+ # Reset to default scopes
410
+ gh auth refresh --reset-scopes
411
+
412
+ # With clipboard
413
+ gh auth refresh --clipboard
414
+ ```
415
+
416
+ ### Setup Git
417
+
418
+ ```bash
419
+ # Setup git credential helper
420
+ gh auth setup-git
421
+
422
+ # Setup for specific host
423
+ gh auth setup-git --hostname enterprise.internal
424
+
425
+ # Force setup even if host not known
426
+ gh auth setup-git --hostname enterprise.internal --force
427
+ ```
428
+
429
+ ## Browse (gh browse)
430
+
431
+ ```bash
432
+ # Open repository in browser
433
+ gh browse
434
+
435
+ # Open specific path
436
+ gh browse script/
437
+ gh browse main.go:312
438
+
439
+ # Open issue or PR
440
+ gh browse 123
441
+
442
+ # Open commit
443
+ gh browse 77507cd94ccafcf568f8560cfecde965fcfa63
444
+
445
+ # Open with specific branch
446
+ gh browse main.go --branch bug-fix
447
+
448
+ # Open different repository
449
+ gh browse --repo owner/repo
450
+
451
+ # Open specific pages
452
+ gh browse --actions # Actions tab
453
+ gh browse --projects # Projects tab
454
+ gh browse --releases # Releases tab
455
+ gh browse --settings # Settings page
456
+ gh browse --wiki # Wiki page
457
+
458
+ # Print URL instead of opening
459
+ gh browse --no-browser
460
+ ```
461
+
462
+ ## Repositories (gh repo)
463
+
464
+ ### Create Repository
465
+
466
+ ```bash
467
+ # Create new repository
468
+ gh repo create my-repo
469
+
470
+ # Create with description
471
+ gh repo create my-repo --description "My awesome project"
472
+
473
+ # Create public repository
474
+ gh repo create my-repo --public
475
+
476
+ # Create private repository
477
+ gh repo create my-repo --private
478
+
479
+ # Create with homepage
480
+ gh repo create my-repo --homepage https://example.com
481
+
482
+ # Create with license
483
+ gh repo create my-repo --license mit
484
+
485
+ # Create with gitignore
486
+ gh repo create my-repo --gitignore python
487
+
488
+ # Initialize as template repository
489
+ gh repo create my-repo --template
490
+
491
+ # Create repository in organization
492
+ gh repo create org/my-repo
493
+
494
+ # Create without cloning locally
495
+ gh repo create my-repo --source=.
496
+
497
+ # Disable issues
498
+ gh repo create my-repo --disable-issues
499
+
500
+ # Disable wiki
501
+ gh repo create my-repo --disable-wiki
502
+ ```
503
+
504
+ ### Clone Repository
505
+
506
+ ```bash
507
+ # Clone repository
508
+ gh repo clone owner/repo
509
+
510
+ # Clone to specific directory
511
+ gh repo clone owner/repo my-directory
512
+
513
+ # Clone with different branch
514
+ gh repo clone owner/repo --branch develop
515
+ ```
516
+
517
+ ### List Repositories
518
+
519
+ ```bash
520
+ # List all repositories
521
+ gh repo list
522
+
523
+ # List repositories for owner
524
+ gh repo list owner
525
+
526
+ # Limit results
527
+ gh repo list --limit 50
528
+
529
+ # Public repositories only
530
+ gh repo list --public
531
+
532
+ # Source repositories only (not forks)
533
+ gh repo list --source
534
+
535
+ # JSON output
536
+ gh repo list --json name,visibility,owner
537
+
538
+ # Table output
539
+ gh repo list --limit 100 | tail -n +2
540
+
541
+ # Filter with jq
542
+ gh repo list --json name --jq '.[].name'
543
+ ```
544
+
545
+ ### View Repository
546
+
547
+ ```bash
548
+ # View repository details
549
+ gh repo view
550
+
551
+ # View specific repository
552
+ gh repo view owner/repo
553
+
554
+ # JSON output
555
+ gh repo view --json name,description,defaultBranchRef
556
+
557
+ # View in browser
558
+ gh repo view --web
559
+ ```
560
+
561
+ ### Edit Repository
562
+
563
+ ```bash
564
+ # Edit description
565
+ gh repo edit --description "New description"
566
+
567
+ # Set homepage
568
+ gh repo edit --homepage https://example.com
569
+
570
+ # Change visibility
571
+ gh repo edit --visibility private
572
+ gh repo edit --visibility public
573
+
574
+ # Enable/disable features
575
+ gh repo edit --enable-issues
576
+ gh repo edit --disable-issues
577
+ gh repo edit --enable-wiki
578
+ gh repo edit --disable-wiki
579
+ gh repo edit --enable-projects
580
+ gh repo edit --disable-projects
581
+
582
+ # Set default branch
583
+ gh repo edit --default-branch main
584
+
585
+ # Rename repository
586
+ gh repo rename new-name
587
+
588
+ # Archive repository
589
+ gh repo archive
590
+ gh repo unarchive
591
+ ```
592
+
593
+ ### Delete Repository
594
+
595
+ ```bash
596
+ # Delete repository
597
+ gh repo delete owner/repo
598
+
599
+ # Confirm without prompt
600
+ gh repo delete owner/repo --yes
601
+ ```
602
+
603
+ ### Fork Repository
604
+
605
+ ```bash
606
+ # Fork repository
607
+ gh repo fork owner/repo
608
+
609
+ # Fork to organization
610
+ gh repo fork owner/repo --org org-name
611
+
612
+ # Clone after forking
613
+ gh repo fork owner/repo --clone
614
+
615
+ # Remote name for fork
616
+ gh repo fork owner/repo --remote-name upstream
617
+ ```
618
+
619
+ ### Sync Fork
620
+
621
+ ```bash
622
+ # Sync fork with upstream
623
+ gh repo sync
624
+
625
+ # Sync specific branch
626
+ gh repo sync --branch feature
627
+
628
+ # Force sync
629
+ gh repo sync --force
630
+ ```
631
+
632
+ ### Set Default Repository
633
+
634
+ ```bash
635
+ # Set default repository for current directory
636
+ gh repo set-default
637
+
638
+ # Set default explicitly
639
+ gh repo set-default owner/repo
640
+
641
+ # Unset default
642
+ gh repo set-default --unset
643
+ ```
644
+
645
+ ### Repository Autolinks
646
+
647
+ ```bash
648
+ # List autolinks
649
+ gh repo autolink list
650
+
651
+ # Add autolink
652
+ gh repo autolink add \
653
+ --key-prefix JIRA- \
654
+ --url-template https://jira.example.com/browse/<num>
655
+
656
+ # Delete autolink
657
+ gh repo autolink delete 12345
658
+ ```
659
+
660
+ ### Repository Deploy Keys
661
+
662
+ ```bash
663
+ # List deploy keys
664
+ gh repo deploy-key list
665
+
666
+ # Add deploy key
667
+ gh repo deploy-key add ~/.ssh/id_rsa.pub \
668
+ --title "Production server" \
669
+ --read-only
670
+
671
+ # Delete deploy key
672
+ gh repo deploy-key delete 12345
673
+ ```
674
+
675
+ ### Gitignore and License
676
+
677
+ ```bash
678
+ # View gitignore template
679
+ gh repo gitignore
680
+
681
+ # View license template
682
+ gh repo license mit
683
+
684
+ # License with full name
685
+ gh repo license mit --fullname "John Doe"
686
+ ```
687
+
688
+ ## Issues (gh issue)
689
+
690
+ ### Create Issue
691
+
692
+ ```bash
693
+ # Create issue interactively
694
+ gh issue create
695
+
696
+ # Create with title
697
+ gh issue create --title "Bug: Login not working"
698
+
699
+ # Create with title and body
700
+ gh issue create \
701
+ --title "Bug: Login not working" \
702
+ --body "Steps to reproduce..."
703
+
704
+ # Create with body from file
705
+ gh issue create --body-file issue.md
706
+
707
+ # Create with labels
708
+ gh issue create --title "Fix bug" --labels bug,high-priority
709
+
710
+ # Create with assignees
711
+ gh issue create --title "Fix bug" --assignee user1,user2
712
+
713
+ # Create in specific repository
714
+ gh issue create --repo owner/repo --title "Issue title"
715
+
716
+ # Create issue from web
717
+ gh issue create --web
718
+ ```
719
+
720
+ ### List Issues
721
+
722
+ ```bash
723
+ # List all open issues
724
+ gh issue list
725
+
726
+ # List all issues (including closed)
727
+ gh issue list --state all
728
+
729
+ # List closed issues
730
+ gh issue list --state closed
731
+
732
+ # Limit results
733
+ gh issue list --limit 50
734
+
735
+ # Filter by assignee
736
+ gh issue list --assignee username
737
+ gh issue list --assignee @me
738
+
739
+ # Filter by labels
740
+ gh issue list --labels bug,enhancement
741
+
742
+ # Filter by milestone
743
+ gh issue list --milestone "v1.0"
744
+
745
+ # Search/filter
746
+ gh issue list --search "is:open is:issue label:bug"
747
+
748
+ # JSON output
749
+ gh issue list --json number,title,state,author
750
+
751
+ # Table view
752
+ gh issue list --json number,title,labels --jq '.[] | [.number, .title, .labels[].name] | @tsv'
753
+
754
+ # Show comments count
755
+ gh issue list --json number,title,comments --jq '.[] | [.number, .title, .comments]'
756
+
757
+ # Sort by
758
+ gh issue list --sort created --order desc
759
+ ```
760
+
761
+ ### View Issue
762
+
763
+ ```bash
764
+ # View issue
765
+ gh issue view 123
766
+
767
+ # View with comments
768
+ gh issue view 123 --comments
769
+
770
+ # View in browser
771
+ gh issue view 123 --web
772
+
773
+ # JSON output
774
+ gh issue view 123 --json title,body,state,labels,comments
775
+
776
+ # View specific fields
777
+ gh issue view 123 --json title --jq '.title'
778
+ ```
779
+
780
+ ### Edit Issue
781
+
782
+ ```bash
783
+ # Edit interactively
784
+ gh issue edit 123
785
+
786
+ # Edit title
787
+ gh issue edit 123 --title "New title"
788
+
789
+ # Edit body
790
+ gh issue edit 123 --body "New description"
791
+
792
+ # Add labels
793
+ gh issue edit 123 --add-label bug,high-priority
794
+
795
+ # Remove labels
796
+ gh issue edit 123 --remove-label stale
797
+
798
+ # Add assignees
799
+ gh issue edit 123 --add-assignee user1,user2
800
+
801
+ # Remove assignees
802
+ gh issue edit 123 --remove-assignee user1
803
+
804
+ # Set milestone
805
+ gh issue edit 123 --milestone "v1.0"
806
+ ```
807
+
808
+ ### Close/Reopen Issue
809
+
810
+ ```bash
811
+ # Close issue
812
+ gh issue close 123
813
+
814
+ # Close with comment
815
+ gh issue close 123 --comment "Fixed in PR #456"
816
+
817
+ # Reopen issue
818
+ gh issue reopen 123
819
+ ```
820
+
821
+ ### Comment on Issue
822
+
823
+ ```bash
824
+ # Add comment
825
+ gh issue comment 123 --body "This looks good!"
826
+
827
+ # Edit comment
828
+ gh issue comment 123 --edit 456789 --body "Updated comment"
829
+
830
+ # Delete comment
831
+ gh issue comment 123 --delete 456789
832
+ ```
833
+
834
+ ### Issue Status
835
+
836
+ ```bash
837
+ # Show issue status summary
838
+ gh issue status
839
+
840
+ # Status for specific repository
841
+ gh issue status --repo owner/repo
842
+ ```
843
+
844
+ ### Pin/Unpin Issues
845
+
846
+ ```bash
847
+ # Pin issue (pinned to repo dashboard)
848
+ gh issue pin 123
849
+
850
+ # Unpin issue
851
+ gh issue unpin 123
852
+ ```
853
+
854
+ ### Lock/Unlock Issue
855
+
856
+ ```bash
857
+ # Lock conversation
858
+ gh issue lock 123
859
+
860
+ # Lock with reason
861
+ gh issue lock 123 --reason off-topic
862
+
863
+ # Unlock
864
+ gh issue unlock 123
865
+ ```
866
+
867
+ ### Transfer Issue
868
+
869
+ ```bash
870
+ # Transfer to another repository
871
+ gh issue transfer 123 --repo owner/new-repo
872
+ ```
873
+
874
+ ### Delete Issue
875
+
876
+ ```bash
877
+ # Delete issue
878
+ gh issue delete 123
879
+
880
+ # Confirm without prompt
881
+ gh issue delete 123 --yes
882
+ ```
883
+
884
+ ### Develop Issue (Draft PR)
885
+
886
+ ```bash
887
+ # Create draft PR from issue
888
+ gh issue develop 123
889
+
890
+ # Create in specific branch
891
+ gh issue develop 123 --branch fix/issue-123
892
+
893
+ # Create with base branch
894
+ gh issue develop 123 --base main
895
+ ```
896
+
897
+ ## Pull Requests (gh pr)
898
+
899
+ ### Create Pull Request
900
+
901
+ ```bash
902
+ # Create PR interactively
903
+ gh pr create
904
+
905
+ # Create with title
906
+ gh pr create --title "Feature: Add new functionality"
907
+
908
+ # Create with title and body
909
+ gh pr create \
910
+ --title "Feature: Add new functionality" \
911
+ --body "This PR adds..."
912
+
913
+ # Fill body from template
914
+ gh pr create --body-file .github/PULL_REQUEST_TEMPLATE.md
915
+
916
+ # Set base branch
917
+ gh pr create --base main
918
+
919
+ # Set head branch (default: current branch)
920
+ gh pr create --head feature-branch
921
+
922
+ # Create draft PR
923
+ gh pr create --draft
924
+
925
+ # Add assignees
926
+ gh pr create --assignee user1,user2
927
+
928
+ # Add reviewers
929
+ gh pr create --reviewer user1,user2
930
+
931
+ # Add labels
932
+ gh pr create --labels enhancement,feature
933
+
934
+ # Link to issue
935
+ gh pr create --issue 123
936
+
937
+ # Create in specific repository
938
+ gh pr create --repo owner/repo
939
+
940
+ # Open in browser after creation
941
+ gh pr create --web
942
+ ```
943
+
944
+ ### List Pull Requests
945
+
946
+ ```bash
947
+ # List open PRs
948
+ gh pr list
949
+
950
+ # List all PRs
951
+ gh pr list --state all
952
+
953
+ # List merged PRs
954
+ gh pr list --state merged
955
+
956
+ # List closed (not merged) PRs
957
+ gh pr list --state closed
958
+
959
+ # Filter by head branch
960
+ gh pr list --head feature-branch
961
+
962
+ # Filter by base branch
963
+ gh pr list --base main
964
+
965
+ # Filter by author
966
+ gh pr list --author username
967
+ gh pr list --author @me
968
+
969
+ # Filter by assignee
970
+ gh pr list --assignee username
971
+
972
+ # Filter by labels
973
+ gh pr list --labels bug,enhancement
974
+
975
+ # Limit results
976
+ gh pr list --limit 50
977
+
978
+ # Search
979
+ gh pr list --search "is:open is:pr label:review-required"
980
+
981
+ # JSON output
982
+ gh pr list --json number,title,state,author,headRefName
983
+
984
+ # Show check status
985
+ gh pr list --json number,title,statusCheckRollup --jq '.[] | [.number, .title, .statusCheckRollup[]?.status]'
986
+
987
+ # Sort by
988
+ gh pr list --sort created --order desc
989
+ ```
990
+
991
+ ### View Pull Request
992
+
993
+ ```bash
994
+ # View PR
995
+ gh pr view 123
996
+
997
+ # View with comments
998
+ gh pr view 123 --comments
999
+
1000
+ # View in browser
1001
+ gh pr view 123 --web
1002
+
1003
+ # JSON output
1004
+ gh pr view 123 --json title,body,state,author,commits,files
1005
+
1006
+ # View diff
1007
+ gh pr view 123 --json files --jq '.files[].path'
1008
+
1009
+ # View with jq query
1010
+ gh pr view 123 --json title,state --jq '"\(.title): \(.state)"'
1011
+ ```
1012
+
1013
+ ### Checkout Pull Request
1014
+
1015
+ ```bash
1016
+ # Checkout PR branch
1017
+ gh pr checkout 123
1018
+
1019
+ # Checkout with specific branch name
1020
+ gh pr checkout 123 --branch name-123
1021
+
1022
+ # Force checkout
1023
+ gh pr checkout 123 --force
1024
+ ```
1025
+
1026
+ ### Diff Pull Request
1027
+
1028
+ ```bash
1029
+ # View PR diff
1030
+ gh pr diff 123
1031
+
1032
+ # View diff with color
1033
+ gh pr diff 123 --color always
1034
+
1035
+ # Output to file
1036
+ gh pr diff 123 > pr-123.patch
1037
+
1038
+ # View diff of specific files
1039
+ gh pr diff 123 --name-only
1040
+ ```
1041
+
1042
+ ### Merge Pull Request
1043
+
1044
+ ```bash
1045
+ # Merge PR
1046
+ gh pr merge 123
1047
+
1048
+ # Merge with specific method
1049
+ gh pr merge 123 --merge
1050
+ gh pr merge 123 --squash
1051
+ gh pr merge 123 --rebase
1052
+
1053
+ # Delete branch after merge
1054
+ gh pr merge 123 --delete-branch
1055
+
1056
+ # Merge with comment
1057
+ gh pr merge 123 --subject "Merge PR #123" --body "Merging feature"
1058
+
1059
+ # Merge draft PR
1060
+ gh pr merge 123 --admin
1061
+
1062
+ # Force merge (skip checks)
1063
+ gh pr merge 123 --admin
1064
+ ```
1065
+
1066
+ ### Close Pull Request
1067
+
1068
+ ```bash
1069
+ # Close PR (as draft, not merge)
1070
+ gh pr close 123
1071
+
1072
+ # Close with comment
1073
+ gh pr close 123 --comment "Closing due to..."
1074
+ ```
1075
+
1076
+ ### Reopen Pull Request
1077
+
1078
+ ```bash
1079
+ # Reopen closed PR
1080
+ gh pr reopen 123
1081
+ ```
1082
+
1083
+ ### Edit Pull Request
1084
+
1085
+ ```bash
1086
+ # Edit interactively
1087
+ gh pr edit 123
1088
+
1089
+ # Edit title
1090
+ gh pr edit 123 --title "New title"
1091
+
1092
+ # Edit body
1093
+ gh pr edit 123 --body "New description"
1094
+
1095
+ # Add labels
1096
+ gh pr edit 123 --add-label bug,enhancement
1097
+
1098
+ # Remove labels
1099
+ gh pr edit 123 --remove-label stale
1100
+
1101
+ # Add assignees
1102
+ gh pr edit 123 --add-assignee user1,user2
1103
+
1104
+ # Remove assignees
1105
+ gh pr edit 123 --remove-assignee user1
1106
+
1107
+ # Add reviewers
1108
+ gh pr edit 123 --add-reviewer user1,user2
1109
+
1110
+ # Remove reviewers
1111
+ gh pr edit 123 --remove-reviewer user1
1112
+
1113
+ # Mark as ready for review
1114
+ gh pr edit 123 --ready
1115
+ ```
1116
+
1117
+ ### Ready for Review
1118
+
1119
+ ```bash
1120
+ # Mark draft PR as ready
1121
+ gh pr ready 123
1122
+ ```
1123
+
1124
+ ### Pull Request Checks
1125
+
1126
+ ```bash
1127
+ # View PR checks
1128
+ gh pr checks 123
1129
+
1130
+ # Watch checks in real-time
1131
+ gh pr checks 123 --watch
1132
+
1133
+ # Watch interval (seconds)
1134
+ gh pr checks 123 --watch --interval 5
1135
+ ```
1136
+
1137
+ ### Comment on Pull Request
1138
+
1139
+ ```bash
1140
+ # Add comment
1141
+ gh pr comment 123 --body "Looks good!"
1142
+
1143
+ # Comment on specific line
1144
+ gh pr comment 123 --body "Fix this" \
1145
+ --repo owner/repo \
1146
+ --head-owner owner --head-branch feature
1147
+
1148
+ # Edit comment
1149
+ gh pr comment 123 --edit 456789 --body "Updated"
1150
+
1151
+ # Delete comment
1152
+ gh pr comment 123 --delete 456789
1153
+ ```
1154
+
1155
+ ### Review Pull Request
1156
+
1157
+ ```bash
1158
+ # Review PR (opens editor)
1159
+ gh pr review 123
1160
+
1161
+ # Approve PR
1162
+ gh pr review 123 --approve --body "LGTM!"
1163
+
1164
+ # Request changes
1165
+ gh pr review 123 --request-changes \
1166
+ --body "Please fix these issues"
1167
+
1168
+ # Comment on PR
1169
+ gh pr review 123 --comment --body "Some thoughts..."
1170
+
1171
+ # Dismiss review
1172
+ gh pr review 123 --dismiss
1173
+ ```
1174
+
1175
+ ### Update Branch
1176
+
1177
+ ```bash
1178
+ # Update PR branch with latest base branch
1179
+ gh pr update-branch 123
1180
+
1181
+ # Force update
1182
+ gh pr update-branch 123 --force
1183
+
1184
+ # Use merge strategy
1185
+ gh pr update-branch 123 --merge
1186
+ ```
1187
+
1188
+ ### Lock/Unlock Pull Request
1189
+
1190
+ ```bash
1191
+ # Lock PR conversation
1192
+ gh pr lock 123
1193
+
1194
+ # Lock with reason
1195
+ gh pr lock 123 --reason off-topic
1196
+
1197
+ # Unlock
1198
+ gh pr unlock 123
1199
+ ```
1200
+
1201
+ ### Revert Pull Request
1202
+
1203
+ ```bash
1204
+ # Revert merged PR
1205
+ gh pr revert 123
1206
+
1207
+ # Revert with specific branch name
1208
+ gh pr revert 123 --branch revert-pr-123
1209
+ ```
1210
+
1211
+ ### Pull Request Status
1212
+
1213
+ ```bash
1214
+ # Show PR status summary
1215
+ gh pr status
1216
+
1217
+ # Status for specific repository
1218
+ gh pr status --repo owner/repo
1219
+ ```
1220
+
1221
+ ## GitHub Actions
1222
+
1223
+ ### Workflow Runs (gh run)
1224
+
1225
+ ```bash
1226
+ # List workflow runs
1227
+ gh run list
1228
+
1229
+ # List for specific workflow
1230
+ gh run list --workflow "ci.yml"
1231
+
1232
+ # List for specific branch
1233
+ gh run list --branch main
1234
+
1235
+ # Limit results
1236
+ gh run list --limit 20
1237
+
1238
+ # JSON output
1239
+ gh run list --json databaseId,status,conclusion,headBranch
1240
+
1241
+ # View run details
1242
+ gh run view 123456789
1243
+
1244
+ # View run with verbose logs
1245
+ gh run view 123456789 --log
1246
+
1247
+ # View specific job
1248
+ gh run view 123456789 --job 987654321
1249
+
1250
+ # View in browser
1251
+ gh run view 123456789 --web
1252
+
1253
+ # Watch run in real-time
1254
+ gh run watch 123456789
1255
+
1256
+ # Watch with interval
1257
+ gh run watch 123456789 --interval 5
1258
+
1259
+ # Rerun failed run
1260
+ gh run rerun 123456789
1261
+
1262
+ # Rerun specific job
1263
+ gh run rerun 123456789 --job 987654321
1264
+
1265
+ # Cancel run
1266
+ gh run cancel 123456789
1267
+
1268
+ # Delete run
1269
+ gh run delete 123456789
1270
+
1271
+ # Download run artifacts
1272
+ gh run download 123456789
1273
+
1274
+ # Download specific artifact
1275
+ gh run download 123456789 --name build
1276
+
1277
+ # Download to directory
1278
+ gh run download 123456789 --dir ./artifacts
1279
+ ```
1280
+
1281
+ ### Workflows (gh workflow)
1282
+
1283
+ ```bash
1284
+ # List workflows
1285
+ gh workflow list
1286
+
1287
+ # View workflow details
1288
+ gh workflow view ci.yml
1289
+
1290
+ # View workflow YAML
1291
+ gh workflow view ci.yml --yaml
1292
+
1293
+ # View in browser
1294
+ gh workflow view ci.yml --web
1295
+
1296
+ # Enable workflow
1297
+ gh workflow enable ci.yml
1298
+
1299
+ # Disable workflow
1300
+ gh workflow disable ci.yml
1301
+
1302
+ # Run workflow manually
1303
+ gh workflow run ci.yml
1304
+
1305
+ # Run with inputs
1306
+ gh workflow run ci.yml \
1307
+ --raw-field \
1308
+ version="1.0.0" \
1309
+ environment="production"
1310
+
1311
+ # Run from specific branch
1312
+ gh workflow run ci.yml --ref develop
1313
+ ```
1314
+
1315
+ ### Action Caches (gh cache)
1316
+
1317
+ ```bash
1318
+ # List caches
1319
+ gh cache list
1320
+
1321
+ # List for specific branch
1322
+ gh cache list --branch main
1323
+
1324
+ # List with limit
1325
+ gh cache list --limit 50
1326
+
1327
+ # Delete cache
1328
+ gh cache delete 123456789
1329
+
1330
+ # Delete all caches
1331
+ gh cache delete --all
1332
+ ```
1333
+
1334
+ ### Action Secrets (gh secret)
1335
+
1336
+ ```bash
1337
+ # List secrets
1338
+ gh secret list
1339
+
1340
+ # Set secret (prompts for value)
1341
+ gh secret set MY_SECRET
1342
+
1343
+ # Set secret from environment
1344
+ echo "$MY_SECRET" | gh secret set MY_SECRET
1345
+
1346
+ # Set secret for specific environment
1347
+ gh secret set MY_SECRET --env production
1348
+
1349
+ # Set secret for organization
1350
+ gh secret set MY_SECRET --org orgname
1351
+
1352
+ # Delete secret
1353
+ gh secret delete MY_SECRET
1354
+
1355
+ # Delete from environment
1356
+ gh secret delete MY_SECRET --env production
1357
+ ```
1358
+
1359
+ ### Action Variables (gh variable)
1360
+
1361
+ ```bash
1362
+ # List variables
1363
+ gh variable list
1364
+
1365
+ # Set variable
1366
+ gh variable set MY_VAR "some-value"
1367
+
1368
+ # Set variable for environment
1369
+ gh variable set MY_VAR "value" --env production
1370
+
1371
+ # Set variable for organization
1372
+ gh variable set MY_VAR "value" --org orgname
1373
+
1374
+ # Get variable value
1375
+ gh variable get MY_VAR
1376
+
1377
+ # Delete variable
1378
+ gh variable delete MY_VAR
1379
+
1380
+ # Delete from environment
1381
+ gh variable delete MY_VAR --env production
1382
+ ```
1383
+
1384
+ ## Projects (gh project)
1385
+
1386
+ ```bash
1387
+ # List projects
1388
+ gh project list
1389
+
1390
+ # List for owner
1391
+ gh project list --owner owner
1392
+
1393
+ # Open projects
1394
+ gh project list --open
1395
+
1396
+ # View project
1397
+ gh project view 123
1398
+
1399
+ # View project items
1400
+ gh project view 123 --format json
1401
+
1402
+ # Create project
1403
+ gh project create --title "My Project"
1404
+
1405
+ # Create in organization
1406
+ gh project create --title "Project" --org orgname
1407
+
1408
+ # Create with readme
1409
+ gh project create --title "Project" --readme "Description here"
1410
+
1411
+ # Edit project
1412
+ gh project edit 123 --title "New Title"
1413
+
1414
+ # Delete project
1415
+ gh project delete 123
1416
+
1417
+ # Close project
1418
+ gh project close 123
1419
+
1420
+ # Copy project
1421
+ gh project copy 123 --owner target-owner --title "Copy"
1422
+
1423
+ # Mark template
1424
+ gh project mark-template 123
1425
+
1426
+ # List fields
1427
+ gh project field-list 123
1428
+
1429
+ # Create field
1430
+ gh project field-create 123 --title "Status" --datatype single_select
1431
+
1432
+ # Delete field
1433
+ gh project field-delete 123 --id 456
1434
+
1435
+ # List items
1436
+ gh project item-list 123
1437
+
1438
+ # Create item
1439
+ gh project item-create 123 --title "New item"
1440
+
1441
+ # Add item to project
1442
+ gh project item-add 123 --owner-owner --repo repo --issue 456
1443
+
1444
+ # Edit item
1445
+ gh project item-edit 123 --id 456 --title "Updated title"
1446
+
1447
+ # Delete item
1448
+ gh project item-delete 123 --id 456
1449
+
1450
+ # Archive item
1451
+ gh project item-archive 123 --id 456
1452
+
1453
+ # Link items
1454
+ gh project link 123 --id 456 --link-id 789
1455
+
1456
+ # Unlink items
1457
+ gh project unlink 123 --id 456 --link-id 789
1458
+
1459
+ # View project in browser
1460
+ gh project view 123 --web
1461
+ ```
1462
+
1463
+ ## Releases (gh release)
1464
+
1465
+ ```bash
1466
+ # List releases
1467
+ gh release list
1468
+
1469
+ # View latest release
1470
+ gh release view
1471
+
1472
+ # View specific release
1473
+ gh release view v1.0.0
1474
+
1475
+ # View in browser
1476
+ gh release view v1.0.0 --web
1477
+
1478
+ # Create release
1479
+ gh release create v1.0.0 \
1480
+ --notes "Release notes here"
1481
+
1482
+ # Create release with notes from file
1483
+ gh release create v1.0.0 --notes-file notes.md
1484
+
1485
+ # Create release with target
1486
+ gh release create v1.0.0 --target main
1487
+
1488
+ # Create release as draft
1489
+ gh release create v1.0.0 --draft
1490
+
1491
+ # Create pre-release
1492
+ gh release create v1.0.0 --prerelease
1493
+
1494
+ # Create release with title
1495
+ gh release create v1.0.0 --title "Version 1.0.0"
1496
+
1497
+ # Upload asset to release
1498
+ gh release upload v1.0.0 ./file.tar.gz
1499
+
1500
+ # Upload multiple assets
1501
+ gh release upload v1.0.0 ./file1.tar.gz ./file2.tar.gz
1502
+
1503
+ # Upload with label (casing sensitive)
1504
+ gh release upload v1.0.0 ./file.tar.gz --casing
1505
+
1506
+ # Delete release
1507
+ gh release delete v1.0.0
1508
+
1509
+ # Delete with cleanup tag
1510
+ gh release delete v1.0.0 --yes
1511
+
1512
+ # Delete specific asset
1513
+ gh release delete-asset v1.0.0 file.tar.gz
1514
+
1515
+ # Download release assets
1516
+ gh release download v1.0.0
1517
+
1518
+ # Download specific asset
1519
+ gh release download v1.0.0 --pattern "*.tar.gz"
1520
+
1521
+ # Download to directory
1522
+ gh release download v1.0.0 --dir ./downloads
1523
+
1524
+ # Download archive (zip/tar)
1525
+ gh release download v1.0.0 --archive zip
1526
+
1527
+ # Edit release
1528
+ gh release edit v1.0.0 --notes "Updated notes"
1529
+
1530
+ # Verify release signature
1531
+ gh release verify v1.0.0
1532
+
1533
+ # Verify specific asset
1534
+ gh release verify-asset v1.0.0 file.tar.gz
1535
+ ```
1536
+
1537
+ ## Gists (gh gist)
1538
+
1539
+ ```bash
1540
+ # List gists
1541
+ gh gist list
1542
+
1543
+ # List all gists (including private)
1544
+ gh gist list --public
1545
+
1546
+ # Limit results
1547
+ gh gist list --limit 20
1548
+
1549
+ # View gist
1550
+ gh gist view abc123
1551
+
1552
+ # View gist files
1553
+ gh gist view abc123 --files
1554
+
1555
+ # Create gist
1556
+ gh gist create script.py
1557
+
1558
+ # Create gist with description
1559
+ gh gist create script.py --desc "My script"
1560
+
1561
+ # Create public gist
1562
+ gh gist create script.py --public
1563
+
1564
+ # Create multi-file gist
1565
+ gh gist create file1.py file2.py
1566
+
1567
+ # Create from stdin
1568
+ echo "print('hello')" | gh gist create
1569
+
1570
+ # Edit gist
1571
+ gh gist edit abc123
1572
+
1573
+ # Delete gist
1574
+ gh gist delete abc123
1575
+
1576
+ # Rename gist file
1577
+ gh gist rename abc123 --filename old.py new.py
1578
+
1579
+ # Clone gist
1580
+ gh gist clone abc123
1581
+
1582
+ # Clone to directory
1583
+ gh gist clone abc123 my-directory
1584
+ ```
1585
+
1586
+ ## Codespaces (gh codespace)
1587
+
1588
+ ```bash
1589
+ # List codespaces
1590
+ gh codespace list
1591
+
1592
+ # Create codespace
1593
+ gh codespace create
1594
+
1595
+ # Create with specific repository
1596
+ gh codespace create --repo owner/repo
1597
+
1598
+ # Create with branch
1599
+ gh codespace create --branch develop
1600
+
1601
+ # Create with specific machine
1602
+ gh codespace create --machine premiumLinux
1603
+
1604
+ # View codespace details
1605
+ gh codespace view
1606
+
1607
+ # SSH into codespace
1608
+ gh codespace ssh
1609
+
1610
+ # SSH with specific command
1611
+ gh codespace ssh --command "cd /workspaces && ls"
1612
+
1613
+ # Open codespace in browser
1614
+ gh codespace code
1615
+
1616
+ # Open in VS Code
1617
+ gh codespace code --codec
1618
+
1619
+ # Open with specific path
1620
+ gh codespace code --path /workspaces/repo
1621
+
1622
+ # Stop codespace
1623
+ gh codespace stop
1624
+
1625
+ # Delete codespace
1626
+ gh codespace delete
1627
+
1628
+ # View logs
1629
+ gh codespace logs
1630
+
1631
+ --tail 100
1632
+
1633
+ # View ports
1634
+ gh codespace ports
1635
+
1636
+ # Forward port
1637
+ gh codespace cp 8080:8080
1638
+
1639
+ # Rebuild codespace
1640
+ gh codespace rebuild
1641
+
1642
+ # Edit codespace
1643
+ gh codespace edit --machine standardLinux
1644
+
1645
+ # Jupyter support
1646
+ gh codespace jupyter
1647
+
1648
+ # Copy files to/from codespace
1649
+ gh codespace cp file.txt :/workspaces/file.txt
1650
+ gh codespace cp :/workspaces/file.txt ./file.txt
1651
+ ```
1652
+
1653
+ ## Organizations (gh org)
1654
+
1655
+ ```bash
1656
+ # List organizations
1657
+ gh org list
1658
+
1659
+ # List for user
1660
+ gh org list --user username
1661
+
1662
+ # JSON output
1663
+ gh org list --json login,name,description
1664
+
1665
+ # View organization
1666
+ gh org view orgname
1667
+
1668
+ # View organization members
1669
+ gh org view orgname --json members --jq '.members[] | .login'
1670
+ ```
1671
+
1672
+ ## Search (gh search)
1673
+
1674
+ ```bash
1675
+ # Search code
1676
+ gh search code "TODO"
1677
+
1678
+ # Search in specific repository
1679
+ gh search code "TODO" --repo owner/repo
1680
+
1681
+ # Search commits
1682
+ gh search commits "fix bug"
1683
+
1684
+ # Search issues
1685
+ gh search issues "label:bug state:open"
1686
+
1687
+ # Search PRs
1688
+ gh search prs "is:open is:pr review:required"
1689
+
1690
+ # Search repositories
1691
+ gh search repos "stars:>1000 language:python"
1692
+
1693
+ # Limit results
1694
+ gh search repos "topic:api" --limit 50
1695
+
1696
+ # JSON output
1697
+ gh search repos "stars:>100" --json name,description,stargazers
1698
+
1699
+ # Order results
1700
+ gh search repos "language:rust" --order desc --sort stars
1701
+
1702
+ # Search with extensions
1703
+ gh search code "import" --extension py
1704
+
1705
+ # Web search (open in browser)
1706
+ gh search prs "is:open" --web
1707
+ ```
1708
+
1709
+ ## Labels (gh label)
1710
+
1711
+ ```bash
1712
+ # List labels
1713
+ gh label list
1714
+
1715
+ # Create label
1716
+ gh label create bug --color "d73a4a" --description "Something isn't working"
1717
+
1718
+ # Create with hex color
1719
+ gh label create enhancement --color "#a2eeef"
1720
+
1721
+ # Edit label
1722
+ gh label edit bug --name "bug-report" --color "ff0000"
1723
+
1724
+ # Delete label
1725
+ gh label delete bug
1726
+
1727
+ # Clone labels from repository
1728
+ gh label clone owner/repo
1729
+
1730
+ # Clone to specific repository
1731
+ gh label clone owner/repo --repo target/repo
1732
+ ```
1733
+
1734
+ ## SSH Keys (gh ssh-key)
1735
+
1736
+ ```bash
1737
+ # List SSH keys
1738
+ gh ssh-key list
1739
+
1740
+ # Add SSH key
1741
+ gh ssh-key add ~/.ssh/id_rsa.pub --title "My laptop"
1742
+
1743
+ # Add key with type
1744
+ gh ssh-key add ~/.ssh/id_ed25519.pub --type "authentication"
1745
+
1746
+ # Delete SSH key
1747
+ gh ssh-key delete 12345
1748
+
1749
+ # Delete by title
1750
+ gh ssh-key delete --title "My laptop"
1751
+ ```
1752
+
1753
+ ## GPG Keys (gh gpg-key)
1754
+
1755
+ ```bash
1756
+ # List GPG keys
1757
+ gh gpg-key list
1758
+
1759
+ # Add GPG key
1760
+ gh gpg-key add ~/.ssh/id_rsa.pub
1761
+
1762
+ # Delete GPG key
1763
+ gh gpg-key delete 12345
1764
+
1765
+ # Delete by key ID
1766
+ gh gpg-key delete ABCD1234
1767
+ ```
1768
+
1769
+ ## Status (gh status)
1770
+
1771
+ ```bash
1772
+ # Show status overview
1773
+ gh status
1774
+
1775
+ # Status for specific repositories
1776
+ gh status --repo owner/repo
1777
+
1778
+ # JSON output
1779
+ gh status --json
1780
+ ```
1781
+
1782
+ ## Configuration (gh config)
1783
+
1784
+ ```bash
1785
+ # List all config
1786
+ gh config list
1787
+
1788
+ # Get specific value
1789
+ gh config get editor
1790
+
1791
+ # Set value
1792
+ gh config set editor vim
1793
+
1794
+ # Set git protocol
1795
+ gh config set git_protocol ssh
1796
+
1797
+ # Clear cache
1798
+ gh config clear-cache
1799
+
1800
+ # Set prompt behavior
1801
+ gh config set prompt disabled
1802
+ gh config set prompt enabled
1803
+ ```
1804
+
1805
+ ## Extensions (gh extension)
1806
+
1807
+ ```bash
1808
+ # List installed extensions
1809
+ gh extension list
1810
+
1811
+ # Search extensions
1812
+ gh extension search github
1813
+
1814
+ # Install extension
1815
+ gh extension install owner/extension-repo
1816
+
1817
+ # Install from branch
1818
+ gh extension install owner/extension-repo --branch develop
1819
+
1820
+ # Upgrade extension
1821
+ gh extension upgrade extension-name
1822
+
1823
+ # Remove extension
1824
+ gh extension remove extension-name
1825
+
1826
+ # Create new extension
1827
+ gh extension create my-extension
1828
+
1829
+ # Browse extensions
1830
+ gh extension browse
1831
+
1832
+ # Execute extension command
1833
+ gh extension exec my-extension --arg value
1834
+ ```
1835
+
1836
+ ## Aliases (gh alias)
1837
+
1838
+ ```bash
1839
+ # List aliases
1840
+ gh alias list
1841
+
1842
+ # Set alias
1843
+ gh alias set prview 'pr view --web'
1844
+
1845
+ # Set shell alias
1846
+ gh alias set co 'pr checkout' --shell
1847
+
1848
+ # Delete alias
1849
+ gh alias delete prview
1850
+
1851
+ # Import aliases
1852
+ gh alias import ./aliases.sh
1853
+ ```
1854
+
1855
+ ## API Requests (gh api)
1856
+
1857
+ ```bash
1858
+ # Make API request
1859
+ gh api /user
1860
+
1861
+ # Request with method
1862
+ gh api --method POST /repos/owner/repo/issues \
1863
+ --field title="Issue title" \
1864
+ --field body="Issue body"
1865
+
1866
+ # Request with headers
1867
+ gh api /user \
1868
+ --header "Accept: application/vnd.github.v3+json"
1869
+
1870
+ # Request with pagination
1871
+ gh api /user/repos --paginate
1872
+
1873
+ # Raw output (no formatting)
1874
+ gh api /user --raw
1875
+
1876
+ # Include headers in output
1877
+ gh api /user --include
1878
+
1879
+ # Silent mode (no progress output)
1880
+ gh api /user --silent
1881
+
1882
+ # Input from file
1883
+ gh api --input request.json
1884
+
1885
+ # jq query on response
1886
+ gh api /user --jq '.login'
1887
+
1888
+ # Field from response
1889
+ gh api /repos/owner/repo --jq '.stargazers_count'
1890
+
1891
+ # GitHub Enterprise
1892
+ gh api /user --hostname enterprise.internal
1893
+
1894
+ # GraphQL query
1895
+ gh api graphql \
1896
+ -f query='
1897
+ {
1898
+ viewer {
1899
+ login
1900
+ repositories(first: 5) {
1901
+ nodes {
1902
+ name
1903
+ }
1904
+ }
1905
+ }
1906
+ }'
1907
+ ```
1908
+
1909
+ ## Rulesets (gh ruleset)
1910
+
1911
+ ```bash
1912
+ # List rulesets
1913
+ gh ruleset list
1914
+
1915
+ # View ruleset
1916
+ gh ruleset view 123
1917
+
1918
+ # Check ruleset
1919
+ gh ruleset check --branch feature
1920
+
1921
+ # Check specific repository
1922
+ gh ruleset check --repo owner/repo --branch main
1923
+ ```
1924
+
1925
+ ## Attestations (gh attestation)
1926
+
1927
+ ```bash
1928
+ # Download attestation
1929
+ gh attestation download owner/repo \
1930
+ --artifact-id 123456
1931
+
1932
+ # Verify attestation
1933
+ gh attestation verify owner/repo
1934
+
1935
+ # Get trusted root
1936
+ gh attestation trusted-root
1937
+ ```
1938
+
1939
+ ## Completion (gh completion)
1940
+
1941
+ ```bash
1942
+ # Generate shell completion
1943
+ gh completion -s bash > ~/.gh-complete.bash
1944
+ gh completion -s zsh > ~/.gh-complete.zsh
1945
+ gh completion -s fish > ~/.gh-complete.fish
1946
+ gh completion -s powershell > ~/.gh-complete.ps1
1947
+
1948
+ # Shell-specific instructions
1949
+ gh completion --shell=bash
1950
+ gh completion --shell=zsh
1951
+ ```
1952
+
1953
+ ## Preview (gh preview)
1954
+
1955
+ ```bash
1956
+ # List preview features
1957
+ gh preview
1958
+
1959
+ # Run preview script
1960
+ gh preview prompter
1961
+ ```
1962
+
1963
+ ## Agent Tasks (gh agent-task)
1964
+
1965
+ ```bash
1966
+ # List agent tasks
1967
+ gh agent-task list
1968
+
1969
+ # View agent task
1970
+ gh agent-task view 123
1971
+
1972
+ # Create agent task
1973
+ gh agent-task create --description "My task"
1974
+ ```
1975
+
1976
+ ## Global Flags
1977
+
1978
+ | Flag | Description |
1979
+ | -------------------------- | -------------------------------------- |
1980
+ | `--help` / `-h` | Show help for command |
1981
+ | `--version` | Show gh version |
1982
+ | `--repo [HOST/]OWNER/REPO` | Select another repository |
1983
+ | `--hostname HOST` | GitHub hostname |
1984
+ | `--jq EXPRESSION` | Filter JSON output |
1985
+ | `--json FIELDS` | Output JSON with specified fields |
1986
+ | `--template STRING` | Format JSON using Go template |
1987
+ | `--web` | Open in browser |
1988
+ | `--paginate` | Make additional API calls |
1989
+ | `--verbose` | Show verbose output |
1990
+ | `--debug` | Show debug output |
1991
+ | `--timeout SECONDS` | Maximum API request duration |
1992
+ | `--cache CACHE` | Cache control (default, force, bypass) |
1993
+
1994
+ ## Output Formatting
1995
+
1996
+ ### JSON Output
1997
+
1998
+ ```bash
1999
+ # Basic JSON
2000
+ gh repo view --json name,description
2001
+
2002
+ # Nested fields
2003
+ gh repo view --json owner,name --jq '.owner.login + "/" + .name'
2004
+
2005
+ # Array operations
2006
+ gh pr list --json number,title --jq '.[] | select(.number > 100)'
2007
+
2008
+ # Complex queries
2009
+ gh issue list --json number,title,labels \
2010
+ --jq '.[] | {number, title: .title, tags: [.labels[].name]}'
2011
+ ```
2012
+
2013
+ ### Template Output
2014
+
2015
+ ```bash
2016
+ # Custom template
2017
+ gh repo view \
2018
+ --template '{{.name}}: {{.description}}'
2019
+
2020
+ # Multiline template
2021
+ gh pr view 123 \
2022
+ --template 'Title: {{.title}}
2023
+ Author: {{.author.login}}
2024
+ State: {{.state}}
2025
+ '
2026
+ ```
2027
+
2028
+ ## Common Workflows
2029
+
2030
+ ### Create PR from Issue
2031
+
2032
+ ```bash
2033
+ # Create branch from issue
2034
+ gh issue develop 123 --branch feature/issue-123
2035
+
2036
+ # Make changes, commit, push
2037
+ git add .
2038
+ git commit -m "Fix issue #123"
2039
+ git push
2040
+
2041
+ # Create PR linking to issue
2042
+ gh pr create --title "Fix #123" --body "Closes #123"
2043
+ ```
2044
+
2045
+ ### Bulk Operations
2046
+
2047
+ ```bash
2048
+ # Close multiple issues
2049
+ gh issue list --search "label:stale" \
2050
+ --json number \
2051
+ --jq '.[].number' | \
2052
+ xargs -I {} gh issue close {} --comment "Closing as stale"
2053
+
2054
+ # Add label to multiple PRs
2055
+ gh pr list --search "review:required" \
2056
+ --json number \
2057
+ --jq '.[].number' | \
2058
+ xargs -I {} gh pr edit {} --add-label needs-review
2059
+ ```
2060
+
2061
+ ### Repository Setup Workflow
2062
+
2063
+ ```bash
2064
+ # Create repository with initial setup
2065
+ gh repo create my-project --public \
2066
+ --description "My awesome project" \
2067
+ --clone \
2068
+ --gitignore python \
2069
+ --license mit
2070
+
2071
+ cd my-project
2072
+
2073
+ # Set up branches
2074
+ git checkout -b develop
2075
+ git push -u origin develop
2076
+
2077
+ # Create labels
2078
+ gh label create bug --color "d73a4a" --description "Bug report"
2079
+ gh label create enhancement --color "a2eeef" --description "Feature request"
2080
+ gh label create documentation --color "0075ca" --description "Documentation"
2081
+ ```
2082
+
2083
+ ### CI/CD Workflow
2084
+
2085
+ ```bash
2086
+ # Run workflow and wait
2087
+ RUN_ID=$(gh workflow run ci.yml --ref main --jq '.databaseId')
2088
+
2089
+ # Watch the run
2090
+ gh run watch "$RUN_ID"
2091
+
2092
+ # Download artifacts on completion
2093
+ gh run download "$RUN_ID" --dir ./artifacts
2094
+ ```
2095
+
2096
+ ### Fork Sync Workflow
2097
+
2098
+ ```bash
2099
+ # Fork repository
2100
+ gh repo fork original/repo --clone
2101
+
2102
+ cd repo
2103
+
2104
+ # Add upstream remote
2105
+ git remote add upstream https://github.com/original/repo.git
2106
+
2107
+ # Sync fork
2108
+ gh repo sync
2109
+
2110
+ # Or manual sync
2111
+ git fetch upstream
2112
+ git checkout main
2113
+ git merge upstream/main
2114
+ git push origin main
2115
+ ```
2116
+
2117
+ ## Environment Setup
2118
+
2119
+ ### Shell Integration
2120
+
2121
+ ```bash
2122
+ # Add to ~/.bashrc or ~/.zshrc
2123
+ eval "$(gh completion -s bash)" # or zsh/fish
2124
+
2125
+ # Create useful aliases
2126
+ alias gs='gh status'
2127
+ alias gpr='gh pr view --web'
2128
+ alias gir='gh issue view --web'
2129
+ alias gco='gh pr checkout'
2130
+ ```
2131
+
2132
+ ### Git Configuration
2133
+
2134
+ ```bash
2135
+ # Use gh as credential helper
2136
+ gh auth setup-git
2137
+
2138
+ # Set gh as default for repo operations
2139
+ git config --global credential.helper 'gh !gh auth setup-git'
2140
+
2141
+ # Or manually
2142
+ git config --global credential.helper github
2143
+ ```
2144
+
2145
+ ## Best Practices
2146
+
2147
+ 1. **Authentication**: Use environment variables for automation
2148
+
2149
+ ```bash
2150
+ export GH_TOKEN=$(gh auth token)
2151
+ ```
2152
+
2153
+ 2. **Default Repository**: Set default to avoid repetition
2154
+
2155
+ ```bash
2156
+ gh repo set-default owner/repo
2157
+ ```
2158
+
2159
+ 3. **JSON Parsing**: Use jq for complex data extraction
2160
+
2161
+ ```bash
2162
+ gh pr list --json number,title --jq '.[] | select(.title | contains("fix"))'
2163
+ ```
2164
+
2165
+ 4. **Pagination**: Use --paginate for large result sets
2166
+
2167
+ ```bash
2168
+ gh issue list --state all --paginate
2169
+ ```
2170
+
2171
+ 5. **Caching**: Use cache control for frequently accessed data
2172
+ ```bash
2173
+ gh api /user --cache force
2174
+ ```
2175
+
2176
+ ## Getting Help
2177
+
2178
+ ```bash
2179
+ # General help
2180
+ gh --help
2181
+
2182
+ # Command help
2183
+ gh pr --help
2184
+ gh issue create --help
2185
+
2186
+ # Help topics
2187
+ gh help formatting
2188
+ gh help environment
2189
+ gh help exit-codes
2190
+ gh help accessibility
2191
+ ```
2192
+
2193
+ ## References
2194
+
2195
+ - Official Manual: https://cli.github.com/manual/
2196
+ - GitHub Docs: https://docs.github.com/en/github-cli
2197
+ - REST API: https://docs.github.com/en/rest
2198
+ - GraphQL API: https://docs.github.com/en/graphql