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