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