From 7f0944bcfe1b80c000dcbb02a48f89c257b34615 Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sun, 30 Nov 2025 09:01:17 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 12 + README.md | 3 + plugin.lock.json | 100 + skills/skill/SKILL.md | 221 ++ skills/skill/references/actions.md | 506 ++++ skills/skill/references/comparison.md | 168 ++ skills/skill/references/discovery.md | 315 +++ skills/skill/references/extensions.md | 99 + skills/skill/references/getting_started.md | 39 + skills/skill/references/index.md | 39 + skills/skill/references/issues.md | 477 ++++ skills/skill/references/other.md | 1725 ++++++++++++ skills/skill/references/pull_requests.md | 823 ++++++ skills/skill/references/releases.md | 254 ++ skills/skill/references/remote-analysis.md | 92 + skills/skill/references/repositories.md | 2763 ++++++++++++++++++++ skills/skill/references/search.md | 372 +++ skills/skill/references/syntax.md | 432 +++ 18 files changed, 8440 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 plugin.lock.json create mode 100644 skills/skill/SKILL.md create mode 100644 skills/skill/references/actions.md create mode 100644 skills/skill/references/comparison.md create mode 100644 skills/skill/references/discovery.md create mode 100644 skills/skill/references/extensions.md create mode 100644 skills/skill/references/getting_started.md create mode 100644 skills/skill/references/index.md create mode 100644 skills/skill/references/issues.md create mode 100644 skills/skill/references/other.md create mode 100644 skills/skill/references/pull_requests.md create mode 100644 skills/skill/references/releases.md create mode 100644 skills/skill/references/remote-analysis.md create mode 100644 skills/skill/references/repositories.md create mode 100644 skills/skill/references/search.md create mode 100644 skills/skill/references/syntax.md diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..e6e896d --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,12 @@ +{ + "name": "gh-cli", + "description": "Skill: Full GitHub CLI capabilities for repos & code", + "version": "0.0.0-2025.11.28", + "author": { + "name": "Misha Kolesnik", + "email": "misha@kolesnik.io" + }, + "skills": [ + "./skills/skill" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..fddfcb8 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# gh-cli + +Skill: Full GitHub CLI capabilities for repos & code diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..bf18c95 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,100 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:tenequm/claude-plugins:gh-cli", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "a97f7a90630162dbe4d00da4d842339f4c4027aa", + "treeHash": "3ffcb828dabf032fdf2ec2768c44dd1efe948f91d91ab5244d18258f75e00154", + "generatedAt": "2025-11-28T10:28:37.070743Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "gh-cli", + "description": "Skill: Full GitHub CLI capabilities for repos & code" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "2e178177a771b95f230f14491a67b14486dbff98531eec826eb2c4f8c39a7e95" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "c3433b6188e12c1eaf07c37c7274aaff6460fdf5a177ddf1f004043fbd4c3c9e" + }, + { + "path": "skills/skill/SKILL.md", + "sha256": "daff453ec7b9144393241dc74d1bc70eae9b9a4419983c44cbad22fc5f58889a" + }, + { + "path": "skills/skill/references/syntax.md", + "sha256": "f1affb42d2397378b04179b1f6edf412d6bc95a2b5df642e4ce9134abfb6632b" + }, + { + "path": "skills/skill/references/search.md", + "sha256": "af14e76cc546cf4057a5ee6d986bdbf0a64fbdb6feb96df83058ec821e975f54" + }, + { + "path": "skills/skill/references/repositories.md", + "sha256": "7642cdb41f4e63e6319a248a434a94ac0e51e40a07722276e3be36d4074192c5" + }, + { + "path": "skills/skill/references/releases.md", + "sha256": "dbb37afa8fcd585ac937e864c459d7595637ce0450d64703184b2bfe835fb6a1" + }, + { + "path": "skills/skill/references/extensions.md", + "sha256": "46a684052e6dd3ba8f7607f90013ed918a2e758c36fc0d66ee0f6462d4d27ef1" + }, + { + "path": "skills/skill/references/comparison.md", + "sha256": "7efc2363c71628f98702ebb87256d393ff10fe9d5a0dfc7fdaece5bbce217683" + }, + { + "path": "skills/skill/references/pull_requests.md", + "sha256": "64adc3f9d37f6c73a300bce640174a4a1cf84072f26de590857b64234ee23f83" + }, + { + "path": "skills/skill/references/getting_started.md", + "sha256": "5ab3edbdb0a3e2fc2ca9c7eab1d3a01b9ef63b0a54ac13715264993879683b33" + }, + { + "path": "skills/skill/references/discovery.md", + "sha256": "0b6a78d39e8b4d32f2942d8f688e0bf1cfffef21ec3933b7a0d42c6fda3d5a4f" + }, + { + "path": "skills/skill/references/index.md", + "sha256": "119451be258e07ef5e6238adc3f5c21447d7bb33ca3e712f059d712480cb5b35" + }, + { + "path": "skills/skill/references/issues.md", + "sha256": "809478db2975d5b0ed932feddf3e188004651c7252aae8e1be5ee2ef4eef826b" + }, + { + "path": "skills/skill/references/other.md", + "sha256": "22f6975d87f5d0489840993b13caf9ae694290c1204648ccab34f79930d9d286" + }, + { + "path": "skills/skill/references/actions.md", + "sha256": "ce7a03d1c9f88d3e7542f8f281af4d49a064e2512346b8abea66fdb77dc924b5" + }, + { + "path": "skills/skill/references/remote-analysis.md", + "sha256": "266b6be1fd9ca0e4a815fa0d1939a58e76b762635a767ef8913f96bd06cc42c3" + } + ], + "dirSha256": "3ffcb828dabf032fdf2ec2768c44dd1efe948f91d91ab5244d18258f75e00154" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file diff --git a/skills/skill/SKILL.md b/skills/skill/SKILL.md new file mode 100644 index 0000000..ae35b65 --- /dev/null +++ b/skills/skill/SKILL.md @@ -0,0 +1,221 @@ +--- +name: gh-cli +description: GitHub CLI for remote repository analysis, file fetching, codebase comparison, and discovering trending code/repos. Use when analyzing repos without cloning, comparing codebases, or searching for popular GitHub projects. +--- + +# GitHub CLI - Remote Analysis & Discovery + +Remote repository operations, codebase comparison, and code discovery without cloning. + +## When to Use + +- Analyze repositories without cloning +- Compare codebases side-by-side +- Fetch specific files from any repo +- Find trending repositories and code patterns +- Search code across GitHub + +## Quick Operations + +### Fetch a file remotely + +```bash +gh api repos/OWNER/REPO/contents/path/file.ts | jq -r '.content' | base64 -d +``` + +### Get directory listing + +```bash +gh api repos/OWNER/REPO/contents/PATH +``` + +### Search code + +```bash +gh search code "pattern" --language=typescript +``` + +### Find trending repos + +```bash +gh search repos --language=rust --sort stars --order desc +``` + +## Compare Two Codebases + +Systematic workflow for comparing repositories to identify similarities and differences. + +**Example use**: "Compare solana-fm/explorer-kit and tenequm/solana-idls" + +### Step 1: Fetch directory structures + +```bash +gh api repos/OWNER-A/REPO-A/contents/PATH > repo1.json +gh api repos/OWNER-B/REPO-B/contents/PATH > repo2.json +``` + +If comparing a monorepo package, specify the path (e.g., `packages/explorerkit-idls`). + +### Step 2: Compare file lists + +```bash +jq -r '.[].name' repo1.json > repo1-files.txt +jq -r '.[].name' repo2.json > repo2-files.txt +diff repo1-files.txt repo2-files.txt +``` + +Shows files unique to each repo and common files. + +### Step 3: Fetch key files for comparison + +Compare package dependencies: + +```bash +gh api repos/OWNER-A/REPO-A/contents/package.json | jq -r '.content' | base64 -d > repo1-pkg.json +gh api repos/OWNER-B/REPO-B/contents/package.json | jq -r '.content' | base64 -d > repo2-pkg.json +``` + +Compare main entry points: + +```bash +gh api repos/OWNER-A/REPO-A/contents/src/index.ts | jq -r '.content' | base64 -d > repo1-index.ts +gh api repos/OWNER-B/REPO-B/contents/src/index.ts | jq -r '.content' | base64 -d > repo2-index.ts +``` + +### Step 4: Analyze differences + +Compare the fetched files to identify: + +**API Surface** +- What functions/classes are exported? +- Are the APIs similar or completely different? + +**Dependencies** +- Shared dependencies (same approach) +- Different dependencies (different implementation) + +**Unique Features** +- Features only in repo1 +- Features only in repo2 + +For detailed comparison strategies, see [references/comparison.md](references/comparison.md). + +## Discover Trending Content + +### Find trending repositories + +```bash +# Most starred repos +gh search repos --sort stars --order desc --limit 20 + +# Trending in specific language +gh search repos --language=rust --sort stars --order desc + +# Recently popular (created in last month) +gh search repos "created:>2024-10-01" --sort stars --order desc + +# Trending in specific topic +gh search repos "topic:machine-learning" --sort stars --order desc +``` + +### Discover popular code patterns + +```bash +# Find popular implementations +gh search code "function useWallet" --language=typescript --sort indexed + +# Find code in popular repos only +gh search code "implementation" "stars:>1000" + +# Search specific organization +gh search code "authentication" --owner=anthropics +``` + +For complete discovery queries and patterns, see [references/discovery.md](references/discovery.md). + +## Search Basics + +### Code search + +```bash +# Search across all repositories +gh search code "API endpoint" --language=python + +# Search in specific organization +gh search code "auth" --owner=anthropics + +# Exclude results with negative qualifiers +gh search issues -- "bug report -label:wontfix" +``` + +### Issue & PR search + +```bash +# Find open bugs +gh search issues --label=bug --state=open + +# Search assigned issues +gh search issues --assignee=@me --state=open +``` + +For advanced search syntax, see [references/search.md](references/search.md). + +## Special Syntax + +### Field name inconsistencies + +**IMPORTANT:** GitHub CLI uses inconsistent field names across commands: + +| Field | `gh repo view` | `gh search repos` | +|-------|----------------|-------------------| +| Stars | `stargazerCount` | `stargazersCount` | +| Forks | `forkCount` | `forksCount` | + +**Examples:** + +```bash +# ✅ Correct for gh repo view +gh repo view owner/repo --json stargazerCount,forkCount + +# ✅ Correct for gh search repos +gh search repos "query" --json stargazersCount,forksCount +``` + +### Excluding search results + +When using negative qualifiers (like `-label:bug`), use `--` to prevent the hyphen from being interpreted as a flag: + +```bash +gh search issues -- "query -label:bug" +``` + +For more syntax gotchas, see [references/syntax.md](references/syntax.md). + +## Advanced Workflows + +For detailed documentation on specific workflows: + +**Core Workflows:** +- [remote-analysis.md](references/remote-analysis.md) - Advanced file fetching patterns +- [comparison.md](references/comparison.md) - Complete codebase comparison guide +- [discovery.md](references/discovery.md) - All trending and discovery queries +- [search.md](references/search.md) - Advanced search syntax +- [syntax.md](references/syntax.md) - Special syntax and command quirks + +**GitHub Operations:** +- [repositories.md](references/repositories.md) - Repository operations +- [pull_requests.md](references/pull_requests.md) - PR workflows +- [issues.md](references/issues.md) - Issue management +- [actions.md](references/actions.md) - GitHub Actions +- [releases.md](references/releases.md) - Release management + +**Setup & Configuration:** +- [getting_started.md](references/getting_started.md) - Installation and auth +- [other.md](references/other.md) - Environment variables, aliases, config +- [extensions.md](references/extensions.md) - CLI extensions + +## Resources + +- Official docs: https://cli.github.com/manual/ +- GitHub CLI: https://github.com/cli/cli +- Search syntax: https://docs.github.com/en/search-github diff --git a/skills/skill/references/actions.md b/skills/skill/references/actions.md new file mode 100644 index 0000000..0dab442 --- /dev/null +++ b/skills/skill/references/actions.md @@ -0,0 +1,506 @@ +# Gh-Cli - Actions + +**Pages:** 15 + +--- + +## gh workflow run + +**URL:** https://cli.github.com/manual/gh_workflow_run + +**Contents:** +- gh workflow run + - Options + - Options inherited from parent commands + - Examples + - See also + +Create a workflow_dispatch event for a given workflow. + +This command will trigger GitHub Actions to run a given workflow file. The given workflow file must support an on.workflow_dispatch trigger in order to be run in this way. + +If the workflow file supports inputs, they can be specified in a few ways: + +**Examples:** + +Example 1 (unknown): +```unknown +gh workflow run [ | ] [flags] +``` + +Example 2 (bash): +```bash +# Have gh prompt you for what workflow you'd like to run and interactively collect inputs +$ gh workflow run + +# Run the workflow file 'triage.yml' at the remote's default branch +$ gh workflow run triage.yml + +# Run the workflow file 'triage.yml' at a specified ref +$ gh workflow run triage.yml --ref my-branch + +# Run the workflow file 'triage.yml' with command line inputs +$ gh workflow run triage.yml -f name=scully -f greeting=hello + +# Run the workflow file 'triage.yml' with JSON via standard input +$ echo '{"name":"scully", "greeting":"hello"}' | gh workflow run triage.yml --json +``` + +--- + +## gh run view + +**URL:** https://cli.github.com/manual/gh_run_view + +**Contents:** +- gh run view + - Options + - Options inherited from parent commands + - JSON Fields + - Examples + - See also + +View a summary of a workflow run. + +Due to platform limitations, gh may not always be able to associate jobs with their corresponding logs when using the primary method of fetching logs in zip format. + +In such cases, gh will attempt to fetch logs for each job individually via the API. This fallback is slower and more resource-intensive. If more than 25 job logs are missing, the operation will fail with an error. + +Additionally, due to similar platform constraints, some log lines may not be associated with a specific step within a job. In these cases, the step name will appear as UNKNOWN STEP in the log output. + +attempt, conclusion, createdAt, databaseId, displayTitle, event, headBranch, headSha, jobs, name, number, startedAt, status, updatedAt, url, workflowDatabaseId, workflowName + +**Examples:** + +Example 1 (unknown): +```unknown +gh run view [] [flags] +``` + +Example 2 (bash): +```bash +# Interactively select a run to view, optionally selecting a single job +$ gh run view + +# View a specific run +$ gh run view 12345 + +# View a specific run with specific attempt number +$ gh run view 12345 --attempt 3 + +# View a specific job within a run +$ gh run view --job 456789 + +# View the full log for a specific job +$ gh run view --log --job 456789 + +# Exit non-zero if a run failed +$ gh run view 0451 --exit-status && echo "run pending or passed" +``` + +--- + +## gh workflow enable + +**URL:** https://cli.github.com/manual/gh_workflow_enable + +**Contents:** +- gh workflow enable + - Options inherited from parent commands + - See also + +Enable a workflow, allowing it to be run and show up when listing workflows. + +**Examples:** + +Example 1 (unknown): +```unknown +gh workflow enable [ | ] +``` + +--- + +## gh workflow + +**URL:** https://cli.github.com/manual/gh_workflow + +**Contents:** +- gh workflow + - Available commands + - Options + - See also + +List, view, and run workflows in GitHub Actions. + +--- + +## gh run + +**URL:** https://cli.github.com/manual/gh_run + +**Contents:** +- gh run + - Available commands + - Options + - See also + +List, view, and watch recent workflow runs from GitHub Actions. + +--- + +## gh run rerun + +**URL:** https://cli.github.com/manual/gh_run_rerun + +**Contents:** +- gh run rerun + - Options + - Options inherited from parent commands + - See also + +Rerun an entire run, only failed jobs, or a specific job from a run. + +Note that due to historical reasons, the --job flag may not take what you expect. Specifically, when navigating to a job in the browser, the URL looks like this: https://github.com///actions/runs//jobs/. + +However, this should not be used with the --job flag and will result in the API returning 404 NOT FOUND. Instead, you can get the correct job IDs using the following command: + +You will need to use databaseId field for triggering job re-runs. + +**Examples:** + +Example 1 (unknown): +```unknown +gh run rerun [] [flags] +``` + +Example 2 (unknown): +```unknown +gh run view --json jobs --jq '.jobs[] | {name, databaseId}' +``` + +--- + +## gh run watch + +**URL:** https://cli.github.com/manual/gh_run_watch + +**Contents:** +- gh run watch + - Options + - Options inherited from parent commands + - Examples + - See also + +Watch a run until it completes, showing its progress. + +By default, all steps are displayed. The --compact option can be used to only show the relevant/failed steps. + +This command does not support authenticating via fine grained PATs as it is not currently possible to create a PAT with the checks:read permission. + +**Examples:** + +Example 1 (unknown): +```unknown +gh run watch [flags] +``` + +Example 2 (bash): +```bash +# Watch a run until it's done +$ gh run watch + +# Watch a run in compact mode +$ gh run watch --compact + +# Run some other command when the run is finished +$ gh run watch && notify-send 'run is done!' +``` + +--- + +## gh workflow list + +**URL:** https://cli.github.com/manual/gh_workflow_list + +**Contents:** +- gh workflow list + - Options + - Options inherited from parent commands + - ALIASES + - JSON Fields + - See also + +List workflow files, hiding disabled workflows by default. + +id, name, path, state + +**Examples:** + +Example 1 (unknown): +```unknown +gh workflow list [flags] +``` + +--- + +## gh run list + +**URL:** https://cli.github.com/manual/gh_run_list + +**Contents:** +- gh run list + - Options + - Options inherited from parent commands + - ALIASES + - JSON Fields + - See also + +List recent workflow runs. + +Note that providing the workflow_name to the -w flag will not fetch disabled workflows. Also pass the -a flag to fetch disabled workflow runs using the workflow_name and the -w flag. + +Runs created by organization and enterprise ruleset workflows will not display a workflow name due to GitHub API limitations. + +attempt, conclusion, createdAt, databaseId, displayTitle, event, headBranch, headSha, name, number, startedAt, status, updatedAt, url, workflowDatabaseId, workflowName + +**Examples:** + +Example 1 (unknown): +```unknown +gh run list [flags] +``` + +--- + +## gh run download + +**URL:** https://cli.github.com/manual/gh_run_download + +**Contents:** +- gh run download + - Options + - Options inherited from parent commands + - Examples + - See also + +Download artifacts generated by a GitHub Actions workflow run. + +The contents of each artifact will be extracted under separate directories based on the artifact name. If only a single artifact is specified, it will be extracted into the current directory. + +By default, this command downloads the latest artifact created and uploaded through GitHub Actions. Because workflows can delete or overwrite artifacts, must be used to select an artifact from a specific workflow run. + +**Examples:** + +Example 1 (unknown): +```unknown +gh run download [] [flags] +``` + +Example 2 (bash): +```bash +# Download all artifacts generated by a workflow run +$ gh run download + +# Download a specific artifact within a run +$ gh run download -n + +# Download specific artifacts across all runs in a repository +$ gh run download -n -n + +# Select artifacts to download interactively +$ gh run download +``` + +--- + +## gh workflow disable + +**URL:** https://cli.github.com/manual/gh_workflow_disable + +**Contents:** +- gh workflow disable + - Options inherited from parent commands + - See also + +Disable a workflow, preventing it from running or showing up when listing workflows. + +**Examples:** + +Example 1 (unknown): +```unknown +gh workflow disable [ | ] +``` + +--- + +## gh run cancel + +**URL:** https://cli.github.com/manual/gh_run_cancel + +**Contents:** +- gh run cancel + - Options + - Options inherited from parent commands + - See also + +Cancel a workflow run + +**Examples:** + +Example 1 (unknown): +```unknown +gh run cancel [] [flags] +``` + +--- + +## gh run delete + +**URL:** https://cli.github.com/manual/gh_run_delete + +**Contents:** +- gh run delete + - Options inherited from parent commands + - Examples + - See also + +Delete a workflow run + +**Examples:** + +Example 1 (unknown): +```unknown +gh run delete [] +``` + +Example 2 (bash): +```bash +# Interactively select a run to delete +$ gh run delete + +# Delete a specific run +$ gh run delete 12345 +``` + +--- + +## gh workflow view + +**URL:** https://cli.github.com/manual/gh_workflow_view + +**Contents:** +- gh workflow view + - Options + - Options inherited from parent commands + - Examples + - See also + +View the summary of a workflow + +**Examples:** + +Example 1 (unknown): +```unknown +gh workflow view [ | | ] [flags] +``` + +Example 2 (bash): +```bash +# Interactively select a workflow to view +$ gh workflow view + +# View a specific workflow +$ gh workflow view 0451 +``` + +--- + +## gh attestation verify + +**URL:** https://cli.github.com/manual/gh_attestation_verify + +**Contents:** +- gh attestation verify +- Understanding Verification +- Loading Artifacts And Attestations +- Additional Policy Enforcement + - Options + - Examples + - See also + +Verify the integrity and provenance of an artifact using its associated cryptographically signed attestations. + +An attestation is a claim (i.e. a provenance statement) made by an actor (i.e. a GitHub Actions workflow) regarding a subject (i.e. an artifact). + +In order to verify an attestation, you must provide an artifact and validate: + +By default, this command enforces the https://slsa.dev/provenance/v1 predicate type. To verify other attestation predicate types use the --predicate-type flag. + +The "actor identity" consists of: + +This identity is then validated against the attestation's certificate's SourceRepository, SourceRepositoryOwner, and SubjectAlternativeName (SAN) fields, among others. + +It is up to you to decide how precisely you want to enforce this identity. + +At a minimum, this command requires either: + +The more precisely you specify the identity, the more control you will have over the security guarantees offered by the verification process. + +Ideally, the path of the signer workflow is also validated using the --signer-workflow or --cert-identity flags. + +Please note: if your attestation was generated via a reusable workflow then that reusable workflow is the signer whose identity needs to be validated. In this situation, you must use either the --signer-workflow or the --signer-repo flag. + +For more options, see the other available flags. + +To specify the artifact, this command requires: + +By default, this command will attempt to fetch relevant attestations via the GitHub API using the values provided to --owner or --repo. + +To instead fetch attestations from your artifact's OCI registry, use the --bundle-from-oci flag. + +For offline verification using attestations stored on disk (c.f. the download command) provide a path to the --bundle flag. + +Given the --format=json flag, upon successful verification this command will output a JSON array containing one entry per verified attestation. + +This output can then be used for additional policy enforcement, i.e. by being piped into a policy engine. + +Each object in the array contains two properties: + +Within the verificationResult object you will find: + +IMPORTANT: please note that only the signature.certificate and the verifiedTimestamps properties contain values that cannot be manipulated by the workflow that originated the attestation. + +When dealing with attestations created within GitHub Actions, the contents of signature.certificate are populated directly from the OpenID Connect token that GitHub has generated. The contents of the verifiedTimestamps array are populated from the signed timestamps originating from either a transparency log or a timestamp authority – and likewise cannot be forged by users. + +When designing policy enforcement using this output, special care must be taken when examining the contents of the statement.predicate property: should an attacker gain access to your workflow's execution context, they could then falsify the contents of the statement.predicate. + +To mitigate this attack vector, consider using a "trusted builder": when generating an artifact, have the build and attestation signing occur within a reusable workflow whose execution cannot be influenced by input provided through the caller workflow. + +See above re: --signer-workflow. + +**Examples:** + +Example 1 (unknown): +```unknown +gh attestation verify [ | oci://] [--owner | --repo] [flags] +``` + +Example 2 (bash): +```bash +# Verify an artifact linked with a repository +$ gh attestation verify example.bin --repo github/example + +# Verify an artifact linked with an organization +$ gh attestation verify example.bin --owner github + +# Verify an artifact and output the full verification result +$ gh attestation verify example.bin --owner github --format json + +# Verify an OCI image using attestations stored on disk +$ gh attestation verify oci:// --owner github --bundle sha256:foo.jsonl + +# Verify an artifact signed with a reusable workflow +$ gh attestation verify example.bin --owner github --signer-repo actions/example +``` + +--- diff --git a/skills/skill/references/comparison.md b/skills/skill/references/comparison.md new file mode 100644 index 0000000..f09b0a3 --- /dev/null +++ b/skills/skill/references/comparison.md @@ -0,0 +1,168 @@ +# Compare Two Codebases + +Systematic workflow for comparing repositories to identify similarities, differences, and unique features. + +## When to Use + +- "Are repo-a and repo-b providing the same functionality?" +- "What's different between these two implementations?" +- "Which repo has more features?" +- "Can I replace library X with library Y?" + +## 4-Step Comparison Workflow + +### Step 1: Fetch directory structures + +```bash +gh api repos/OWNER-A/REPO-A/contents/PATH > repo1.json +gh api repos/OWNER-B/REPO-B/contents/PATH > repo2.json +``` + +If comparing a monorepo package, specify the path (e.g., `packages/explorerkit-idls`). + +### Step 2: Compare file lists + +```bash +jq -r '.[].name' repo1.json > repo1-files.txt +jq -r '.[].name' repo2.json > repo2-files.txt +diff repo1-files.txt repo2-files.txt +``` + +This shows: +- Files unique to repo1 (prefixed with `<`) +- Files unique to repo2 (prefixed with `>`) +- Common files (no prefix) + +### Step 3: Fetch key files for comparison + +Compare the most important files: + +#### Package dependencies + +```bash +gh api repos/OWNER-A/REPO-A/contents/package.json | jq -r '.content' | base64 -d > repo1-pkg.json +gh api repos/OWNER-B/REPO-B/contents/package.json | jq -r '.content' | base64 -d > repo2-pkg.json +``` + +Then compare dependencies: + +```bash +jq '.dependencies' repo1-pkg.json +jq '.dependencies' repo2-pkg.json +``` + +#### Main entry points + +```bash +gh api repos/OWNER-A/REPO-A/contents/src/index.ts | jq -r '.content' | base64 -d > repo1-index.ts +gh api repos/OWNER-B/REPO-B/contents/src/index.ts | jq -r '.content' | base64 -d > repo2-index.ts +``` + +### Step 4: Analyze differences + +Compare the fetched files to identify: + +**API Surface** +- What functions/classes are exported? +- Are the APIs similar or completely different? +- Which repo has more comprehensive exports? + +**Dependencies** +- Shared dependencies (same approach) +- Different dependencies (different implementation) +- Dependency versions (maintenance status) + +**Unique Features** +- Features only in repo1 +- Features only in repo2 +- Similar features with different implementations + +## Example: Compare Solana IDL Libraries + +```bash +# Repo 1: solana-fm/explorer-kit (monorepo package) +gh api repos/solana-fm/explorer-kit/contents/packages/explorerkit-idls > repo1.json + +# Repo 2: tenequm/solana-idls (standalone) +gh api repos/tenequm/solana-idls/contents/ > repo2.json + +# Compare file structures +jq -r '.[].name' repo1.json > repo1-files.txt +jq -r '.[].name' repo2.json > repo2-files.txt +diff repo1-files.txt repo2-files.txt + +# Fetch package.json from both +gh api repos/solana-fm/explorer-kit/contents/packages/explorerkit-idls/package.json | jq -r '.content' | base64 -d > repo1-pkg.json +gh api repos/tenequm/solana-idls/contents/package.json | jq -r '.content' | base64 -d > repo2-pkg.json + +# Compare dependencies +echo "=== Repo 1 Dependencies ===" +jq '.dependencies' repo1-pkg.json +echo "=== Repo 2 Dependencies ===" +jq '.dependencies' repo2-pkg.json + +# Fetch main entry points +gh api repos/solana-fm/explorer-kit/contents/packages/explorerkit-idls/src/index.ts | jq -r '.content' | base64 -d > repo1-index.ts +gh api repos/tenequm/solana-idls/contents/src/index.ts | jq -r '.content' | base64 -d > repo2-index.ts + +# Compare exports +echo "=== Repo 1 Exports ===" +grep -E "^export" repo1-index.ts +echo "=== Repo 2 Exports ===" +grep -E "^export" repo2-index.ts +``` + +## Analysis Framework + +After fetching files, analyze systematically: + +### 1. Purpose & Scope +- What problem does each repo solve? +- Same problem or different use cases? + +### 2. API Design +- Are the APIs compatible? +- Which is more user-friendly? +- Breaking changes if switching? + +### 3. Dependencies +- Shared ecosystem (similar approach) +- Different dependencies (different implementation) +- Heavy vs lightweight + +### 4. Maintenance +- Last commit dates +- Release frequency +- Issue/PR activity + +### 5. Features +- Core features both have +- Unique to repo1 +- Unique to repo2 + +## Tips + +**Compare READMEs first** + +```bash +gh api repos/OWNER-A/REPO-A/contents/README.md | jq -r '.content' | base64 -d > repo1-readme.md +gh api repos/OWNER-B/REPO-B/contents/README.md | jq -r '.content' | base64 -d > repo2-readme.md +``` + +This gives you a high-level understanding before diving into code. + +**Check for common file patterns** + +- `package.json` - Dependencies and metadata +- `tsconfig.json` - TypeScript configuration +- `src/index.ts` - Main entry point +- `README.md` - Documentation and examples +- `CHANGELOG.md` - Version history + +**Use git tree for overview** + +```bash +gh api repos/OWNER/REPO/git/trees/main?recursive=1 | jq '.tree[] | select(.type == "blob") | .path' | grep -E "\.(ts|js|json)$" +``` + +Gets all TypeScript/JavaScript/JSON files quickly. diff --git a/skills/skill/references/discovery.md b/skills/skill/references/discovery.md new file mode 100644 index 0000000..6520723 --- /dev/null +++ b/skills/skill/references/discovery.md @@ -0,0 +1,315 @@ +# Discovering Trending Content + +Complete guide to finding popular repositories, code patterns, and active projects on GitHub. + +## Find Trending Repositories + +### By popularity + +```bash +# Most starred repositories (all time) +gh search repos --sort stars --order desc --limit 20 + +# Most forked repos +gh search repos --sort forks --order desc + +# Most watched repos +gh search repos --sort help-wanted-issues --order desc +``` + +### By language + +```bash +# Trending repos in specific language +gh search repos --language=rust --sort stars --order desc +gh search repos --language=typescript --sort stars --order desc +gh search repos --language=python --sort stars --order desc +``` + +### By recency + +```bash +# Recently popular (created in last month, sorted by stars) +gh search repos "created:>2024-10-01" --sort stars --order desc + +# Created this year +gh search repos "created:>2024-01-01" --sort stars --order desc + +# Recently updated popular repos +gh search repos "stars:>100 pushed:>2024-10-01" --sort updated --order desc +``` + +### By topic + +```bash +# Trending in specific topic +gh search repos "topic:machine-learning" --sort stars --order desc +gh search repos "topic:blockchain" --sort stars --order desc +gh search repos "topic:react" --sort stars --order desc + +# Multiple topics (AND) +gh search repos "topic:blockchain topic:typescript" --sort stars --order desc +``` + +### By activity + +```bash +# Most active repos (by recent updates) +gh search repos --sort updated --order desc + +# Active repos (many recent commits) +gh search repos "pushed:>2024-10-01" --sort stars + +# Repos with many open issues (active community) +gh search repos "good-first-issues:>5" --sort stars --order desc +``` + +## Advanced Discovery Queries + +### Unique projects + +```bash +# Repos with many stars but few forks (unique ideas) +gh search repos "stars:>1000 forks:<100" + +# High star-to-fork ratio (original content) +gh search repos "stars:>500 forks:<50" +``` + +### By file presence + +```bash +# Find repos by file presence (e.g., has Dockerfile) +gh search code "filename:Dockerfile" --sort indexed + +# Has specific config files +gh search code "filename:vite.config.ts" --sort indexed +gh search code "filename:wxt.config.ts" --sort indexed +``` + +### By description keywords + +```bash +# Combined filters: Popular Solana repos updated recently +gh search repos "solana in:name,description stars:>100" --sort updated --order desc + +# Specific keywords in description +gh search repos "machine learning in:description stars:>1000" +``` + +### By size and license + +```bash +# Small but popular repos (easy to learn from) +gh search repos "stars:>1000 size:<1000" --language=typescript + +# Specific license +gh search repos "license:mit stars:>500" --language=rust +``` + +### By organization + +```bash +# Popular repos from specific org +gh search repos "org:vercel stars:>100" +gh search repos "org:anthropics" +``` + +## Discover Popular Code Patterns + +### Find implementations + +```bash +# Find popular implementations +gh search code "function useWallet" --language=typescript --sort indexed +gh search code "async fn main" --language=rust + +# Specific patterns +gh search code "createContext" --language=typescript --sort indexed +gh search code "impl Display for" --language=rust +``` + +### By popularity + +```bash +# Most starred code in specific language +gh search code "authentication" --language=typescript --sort stars + +# Find code in popular repos only +gh search code "implementation" "stars:>1000" +gh search code "middleware" "stars:>500" --language=typescript +``` + +### By organization + +```bash +# Search specific organization's popular code +gh search code "authentication" --owner=anthropics +gh search code "config" --owner=vercel +``` + +### By recency + +```bash +# Find recent code examples +gh search code "React hooks" "created:>2024-01-01" +gh search code "Solana program" "created:>2024-06-01" --language=rust +``` + +## Combining Filters + +### Examples of powerful combinations + +```bash +# Popular TypeScript repos updated this month +gh search repos "language:typescript stars:>500 pushed:>2024-10-01" --sort updated + +# New promising projects (recent, growing fast) +gh search repos "created:>2024-06-01 stars:>100" --sort stars --order desc + +# Active open-source with good first issues +gh search repos "good-first-issues:>3 stars:>100 pushed:>2024-10-01" + +# Well-maintained projects (recent activity + documentation) +gh search repos "stars:>1000 pushed:>2024-10-01" --language=typescript | grep -i "readme" +``` + +## Qualifiers Reference + +### Date qualifiers + +- `created:>YYYY-MM-DD` - Created after date +- `created:YYYY-MM-DD` - Updated after date +- `pushed:N` - More than N stars +- `stars:N..M` - Between N and M stars +- `forks:>N` - More than N forks +- `size:100" + +# 3. Filter by recency +gh search repos "solana stars:>100 pushed:>2024-10-01" + +# 4. Add language +gh search repos "solana stars:>100 pushed:>2024-10-01" --language=rust +``` + +### Use topics for precision + +Topics are more precise than text search: + +```bash +# Better: Use topic +gh search repos "topic:web3" --sort stars + +# Less precise: Text search +gh search repos "web3" --sort stars +``` + +### Check activity indicators + +High stars but old updates = abandoned: + +```bash +# Good: Popular AND recently updated +gh search repos "stars:>1000 pushed:>2024-10-01" + +# Risk: Popular but potentially stale +gh search repos "stars:>1000" +``` + +### Look for hidden gems + +Sometimes the best code isn't the most popular: + +```bash +# Well-maintained but not famous +gh search repos "stars:10..100 pushed:>2024-10-01" --language=rust + +# Recent projects gaining traction +gh search repos "created:>2024-09-01 stars:>10" --sort stars +``` + +## Output formatting + +### Get specific fields + +```bash +# Just repo names +gh search repos "topic:react" --json name --jq '.[].name' + +# Name and star count +gh search repos "topic:react" --limit 5 --json name,stargazersCount --jq '.[] | "\(.name): \(.stargazersCount) stars"' + +# Full URLs +gh search repos "topic:rust" --json url --jq '.[].url' +``` + +### Limit results + +```bash +# Top 10 only +gh search repos "language:typescript" --sort stars --limit 10 + +# Top 50 +gh search repos "topic:machine-learning" --limit 50 +``` + +## Common Discovery Workflows + +### "Find similar repos to X" + +```bash +# 1. Check topics of repo X +gh repo view OWNER/REPO --json repositoryTopics + +# 2. Search by those topics +gh search repos "topic:web3 topic:solana" --sort stars --order desc +``` + +### "What's trending in [language] this month?" + +```bash +gh search repos "language:rust created:>2024-10-01" --sort stars --order desc --limit 20 +``` + +### "Find actively maintained [topic] projects" + +```bash +gh search repos "topic:blockchain pushed:>2024-10-01 stars:>50" --sort updated --order desc +``` + +### "Discover new tools for [task]" + +```bash +# Example: PDF processing tools +gh search repos "pdf in:name,description language:python stars:>50" --sort stars +``` diff --git a/skills/skill/references/extensions.md b/skills/skill/references/extensions.md new file mode 100644 index 0000000..fcafd1e --- /dev/null +++ b/skills/skill/references/extensions.md @@ -0,0 +1,99 @@ +# Gh-Cli - Extensions + +**Pages:** 4 + +--- + +## gh extension upgrade + +**URL:** https://cli.github.com/manual/gh_extension_upgrade + +**Contents:** +- gh extension upgrade + - Options + - See also + +Upgrade installed extensions + +**Examples:** + +Example 1 (unknown): +```unknown +gh extension upgrade { | --all} [flags] +``` + +--- + +## gh extension browse + +**URL:** https://cli.github.com/manual/gh_extension_browse + +**Contents:** +- gh extension browse + - Options + - See also + +This command will take over your terminal and run a fully interactive interface for browsing, adding, and removing gh extensions. A terminal width greater than 100 columns is recommended. + +To learn how to control this interface, press ? after running to see the help text. + +Running this command with --single-column should make this command more intelligible for users who rely on assistive technology like screen readers or high zoom. + +For a more traditional way to discover extensions, see: + +along with gh ext install, gh ext remove, and gh repo view. + +**Examples:** + +Example 1 (unknown): +```unknown +gh extension browse [flags] +``` + +Example 2 (unknown): +```unknown +gh ext search +``` + +--- + +## gh extension list + +**URL:** https://cli.github.com/manual/gh_extension_list + +**Contents:** +- gh extension list + - ALIASES + - See also + +List installed extension commands + +gh extension ls, gh extensions ls, gh ext ls + +**Examples:** + +Example 1 (unknown): +```unknown +gh extension list +``` + +--- + +## gh extension remove + +**URL:** https://cli.github.com/manual/gh_extension_remove + +**Contents:** +- gh extension remove + - See also + +Remove an installed extension + +**Examples:** + +Example 1 (unknown): +```unknown +gh extension remove +``` + +--- diff --git a/skills/skill/references/getting_started.md b/skills/skill/references/getting_started.md new file mode 100644 index 0000000..9d9f11c --- /dev/null +++ b/skills/skill/references/getting_started.md @@ -0,0 +1,39 @@ +# Gh-Cli - Getting Started + +**Pages:** 1 + +--- + +## gh auth setup-git + +**URL:** https://cli.github.com/manual/gh_auth_setup-git + +**Contents:** +- gh auth setup-git + - Options + - Examples + - See also + +This command configures git to use GitHub CLI as a credential helper. For more information on git credential helpers please reference: https://git-scm.com/docs/gitcredentials. + +By default, GitHub CLI will be set as the credential helper for all authenticated hosts. If there is no authenticated hosts the command fails with an error. + +Alternatively, use the --hostname flag to specify a single host to be configured. If the host is not authenticated with, the command fails with an error. + +**Examples:** + +Example 1 (unknown): +```unknown +gh auth setup-git [flags] +``` + +Example 2 (bash): +```bash +# Configure git to use GitHub CLI as the credential helper for all authenticated hosts +$ gh auth setup-git + +# Configure git to use GitHub CLI as the credential helper for enterprise.internal host +$ gh auth setup-git --hostname enterprise.internal +``` + +--- diff --git a/skills/skill/references/index.md b/skills/skill/references/index.md new file mode 100644 index 0000000..16659b9 --- /dev/null +++ b/skills/skill/references/index.md @@ -0,0 +1,39 @@ +# Gh-Cli Documentation Index + +## Categories + +### Actions +**File:** `actions.md` +**Pages:** 15 + +### Extensions +**File:** `extensions.md` +**Pages:** 4 + +### Getting Started +**File:** `getting_started.md` +**Pages:** 1 + +### Issues +**File:** `issues.md` +**Pages:** 15 + +### Other +**File:** `other.md` +**Pages:** 60 + +### Pull Requests +**File:** `pull_requests.md` +**Pages:** 31 + +### Releases +**File:** `releases.md` +**Pages:** 9 + +### Repositories +**File:** `repositories.md` +**Pages:** 72 + +### Search +**File:** `search.md` +**Pages:** 7 diff --git a/skills/skill/references/issues.md b/skills/skill/references/issues.md new file mode 100644 index 0000000..4b606fb --- /dev/null +++ b/skills/skill/references/issues.md @@ -0,0 +1,477 @@ +# Gh-Cli - Issues + +**Pages:** 15 + +--- + +## gh issue lock + +**URL:** https://cli.github.com/manual/gh_issue_lock + +**Contents:** +- gh issue lock + - Options + - Options inherited from parent commands + - See also + +Lock issue conversation + +**Examples:** + +Example 1 (unknown): +```unknown +gh issue lock { | } [flags] +``` + +--- + +## gh issue delete + +**URL:** https://cli.github.com/manual/gh_issue_delete + +**Contents:** +- gh issue delete + - Options + - Options inherited from parent commands + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh issue delete { | } [flags] +``` + +--- + +## gh label + +**URL:** https://cli.github.com/manual/gh_label + +**Contents:** +- gh label + - Available commands + - Options + - See also + +Work with GitHub labels. + +--- + +## gh issue develop + +**URL:** https://cli.github.com/manual/gh_issue_develop + +**Contents:** +- gh issue develop + - Options + - Options inherited from parent commands + - Examples + - See also + +Manage linked branches for an issue. + +When using the --base flag, the new development branch will be created from the specified remote branch. The new branch will be configured as the base branch for pull requests created using gh pr create. + +**Examples:** + +Example 1 (unknown): +```unknown +gh issue develop { | } [flags] +``` + +Example 2 (bash): +```bash +# List branches for issue 123 +$ gh issue develop --list 123 + +# List branches for issue 123 in repo cli/cli +$ gh issue develop --list --repo cli/cli 123 + +# Create a branch for issue 123 based on the my-feature branch +$ gh issue develop 123 --base my-feature + +# Create a branch for issue 123 and checkout it out +$ gh issue develop 123 --checkout + +# Create a branch in repo monalisa/cli for issue 123 in repo cli/cli +$ gh issue develop 123 --repo cli/cli --branch-repo monalisa/cli +``` + +--- + +## gh label edit + +**URL:** https://cli.github.com/manual/gh_label_edit + +**Contents:** +- gh label edit + - Options + - Options inherited from parent commands + - Examples + - See also + +Update a label on GitHub. + +A label can be renamed using the --name flag. + +The label color needs to be 6 character hex value. + +**Examples:** + +Example 1 (unknown): +```unknown +gh label edit [flags] +``` + +Example 2 (bash): +```bash +# Update the color of the bug label +$ gh label edit bug --color FF0000 + +# Rename and edit the description of the bug label +$ gh label edit bug --name big-bug --description "Bigger than normal bug" +``` + +--- + +## gh auth status + +**URL:** https://cli.github.com/manual/gh_auth_status + +**Contents:** +- gh auth status + - Options + - JSON Fields + - Examples + - See also + +Display active account and authentication state on each known GitHub host. + +For each host, the authentication state of each known account is tested and any issues are included in the output. Each host section will indicate the active account, which will be used when targeting that host. + +If an account on any host (or only the one given via --hostname) has authentication issues, the command will exit with 1 and output to stderr. Note that when using the --json option, the command will always exit with zero regardless of any authentication issues, unless there is a fatal error. + +To change the active account for a host, see gh auth switch. + +**Examples:** + +Example 1 (unknown): +```unknown +gh auth status [flags] +``` + +Example 2 (bash): +```bash +# Display authentication status for all accounts on all hosts +$ gh auth status + +# Display authentication status for the active account on a specific host +$ gh auth status --active --hostname github.example.com + +# Display tokens in plain text +$ gh auth status --show-token + +# Format authentication status as JSON +$ gh auth status --json hosts + +# Include plain text token in JSON output +$ gh auth status --json hosts --show-token + +# Format hosts as a flat JSON array +$ gh auth status --json hosts --jq '.hosts | add' +``` + +--- + +## gh issue unlock + +**URL:** https://cli.github.com/manual/gh_issue_unlock + +**Contents:** +- gh issue unlock + - Options inherited from parent commands + - See also + +Unlock issue conversation + +**Examples:** + +Example 1 (unknown): +```unknown +gh issue unlock { | } +``` + +--- + +## gh alias set + +**URL:** https://cli.github.com/manual/gh_alias_set + +**Contents:** +- gh alias set + - Options + - Examples + - See also + +Define a word that will expand to a full gh command when invoked. + +The expansion may specify additional arguments and flags. If the expansion includes positional placeholders such as $1, extra arguments that follow the alias will be inserted appropriately. Otherwise, extra arguments will be appended to the expanded command. + +Use - as expansion argument to read the expansion string from standard input. This is useful to avoid quoting issues when defining expansions. + +If the expansion starts with ! or if --shell was given, the expansion is a shell expression that will be evaluated through the sh interpreter when the alias is invoked. This allows for chaining multiple commands via piping and redirection. + +**Examples:** + +Example 1 (unknown): +```unknown +gh alias set [flags] +``` + +Example 2 (bash): +```bash +# Note: Command Prompt on Windows requires using double quotes for arguments +$ gh alias set pv 'pr view' +$ gh pv -w 123 #=> gh pr view -w 123 + +$ gh alias set bugs 'issue list --label=bugs' +$ gh bugs + +$ gh alias set homework 'issue list --assignee @me' +$ gh homework + +$ gh alias set 'issue mine' 'issue list --mention @me' +$ gh issue mine + +$ gh alias set epicsBy 'issue list --author="$1" --label="epic"' +$ gh epicsBy vilmibm #=> gh issue list --author="vilmibm" --label="epic" + +$ gh alias set --shell igrep 'gh issue list --label="$1" | grep "$2"' +$ gh igrep epic foo #=> gh issue list --label="epic" | grep "foo" +``` + +--- + +## gh project item-edit + +**URL:** https://cli.github.com/manual/gh_project_item-edit + +**Contents:** +- gh project item-edit + - Options + - Examples + - See also + +Edit either a draft issue or a project item. Both usages require the ID of the item to edit. + +For non-draft issues, the ID of the project is also required, and only a single field value can be updated per invocation. + +Remove project item field value using --clear flag. + +**Examples:** + +Example 1 (unknown): +```unknown +gh project item-edit [flags] +``` + +Example 2 (bash): +```bash +# Edit an item's text field value +$ gh project item-edit --id --field-id --project-id --text "new text" + +# Clear an item's field value +$ gh project item-edit --id --field-id --project-id --clear +``` + +--- + +## gh issue status + +**URL:** https://cli.github.com/manual/gh_issue_status + +**Contents:** +- gh issue status + - Options + - Options inherited from parent commands + - JSON Fields + - See also + - In use + +Show status of relevant issues + +assignees, author, body, closed, closedAt, closedByPullRequestsReferences, comments, createdAt, id, isPinned, labels, milestone, number, projectCards, projectItems, reactionGroups, state, stateReason, title, updatedAt, url + +**Examples:** + +Example 1 (unknown): +```unknown +gh issue status [flags] +``` + +Example 2 (unknown): +```unknown +# Viewing issues relevant to you +~/Projects/my-project$ gh issue status +Issues assigned to you + #8509 [Fork] Improve how Desktop handles forks (epic:fork, meta) + +Issues mentioning you + #8938 [Fork] Add create fork flow entry point at commit warning (epic:fork) + #8509 [Fork] Improve how Desktop handles forks (epic:fork, meta) + +Issues opened by you + #8936 [Fork] Hide PR number badges on branches that have an upstream PR (epic:fork) + #6386 Improve no editor detected state on conflicts modal (enhancement) + +~/Projects/my-project$ +``` + +--- + +## gh issue + +**URL:** https://cli.github.com/manual/gh_issue + +**Contents:** +- gh issue + - General commands + - Targeted commands + - Options + - Examples + - See also + +Work with GitHub issues. + +**Examples:** + +Example 1 (bash): +```bash +$ gh issue list +$ gh issue create --label bug +$ gh issue view 123 --web +``` + +--- + +## gh issue view + +**URL:** https://cli.github.com/manual/gh_issue_view + +**Contents:** +- gh issue view + - Options + - Options inherited from parent commands + - JSON Fields + - See also + - In use + - In terminal + - In the browser + +Display the title, body, and other information about an issue. + +With --web flag, open the issue in a web browser instead. + +assignees, author, body, closed, closedAt, closedByPullRequestsReferences, comments, createdAt, id, isPinned, labels, milestone, number, projectCards, projectItems, reactionGroups, state, stateReason, title, updatedAt, url + +By default, we will display items in the terminal. + +Quickly open an item in the browser using --web or -w + +**Examples:** + +Example 1 (unknown): +```unknown +gh issue view { | } [flags] +``` + +Example 2 (unknown): +```unknown +# Viewing an issue in terminal +~/Projects/my-project$ gh issue view 21 +Issue title +opened by user. 0 comments. (label) + + Issue body + +View this issue on GitHub: https://github.com/owner/repo/issues/21 +~/Projects/my-project$ +``` + +Example 3 (unknown): +```unknown +# Viewing an issue in the browser +~/Projects/my-project$ gh issue view 21 --web +Opening https://github.com/owner/repo/issues/21 in your browser. +~/Projects/my-project$ +``` + +--- + +## gh issue reopen + +**URL:** https://cli.github.com/manual/gh_issue_reopen + +**Contents:** +- gh issue reopen + - Options + - Options inherited from parent commands + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh issue reopen { | } [flags] +``` + +--- + +## gh issue comment + +**URL:** https://cli.github.com/manual/gh_issue_comment + +**Contents:** +- gh issue comment + - Options + - Options inherited from parent commands + - Examples + - See also + +Add a comment to a GitHub issue. + +Without the body text supplied through flags, the command will interactively prompt for the comment text. + +**Examples:** + +Example 1 (unknown): +```unknown +gh issue comment { | } [flags] +``` + +Example 2 (bash): +```bash +$ gh issue comment 12 --body "Hi from GitHub CLI" +``` + +--- + +## gh issue close + +**URL:** https://cli.github.com/manual/gh_issue_close + +**Contents:** +- gh issue close + - Options + - Options inherited from parent commands + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh issue close { | } [flags] +``` + +--- diff --git a/skills/skill/references/other.md b/skills/skill/references/other.md new file mode 100644 index 0000000..0d895af --- /dev/null +++ b/skills/skill/references/other.md @@ -0,0 +1,1725 @@ +# Gh-Cli - Other + +**Pages:** 60 + +--- + +## gh config get + +**URL:** https://cli.github.com/manual/gh_config_get + +**Contents:** +- gh config get + - Options + - Examples + - See also + +Print the value of a given configuration key + +**Examples:** + +Example 1 (unknown): +```unknown +gh config get [flags] +``` + +Example 2 (bash): +```bash +$ gh config get git_protocol +``` + +--- + +## gh environment + +**URL:** https://cli.github.com/manual/gh_help_environment + +**Contents:** +- gh environment + - See also + +GH_TOKEN, GITHUB_TOKEN (in order of precedence): an authentication token that will be used when a command targets either github.com or a subdomain of ghe.com. Setting this avoids being prompted to authenticate and takes precedence over previously stored credentials. + +GH_ENTERPRISE_TOKEN, GITHUB_ENTERPRISE_TOKEN (in order of precedence): an authentication token that will be used when a command targets a GitHub Enterprise Server host. + +GH_HOST: specify the GitHub hostname for commands where a hostname has not been provided, or cannot be inferred from the context of a local Git repository. If this host was previously authenticated with, the stored credentials will be used. Otherwise, setting GH_TOKEN or GH_ENTERPRISE_TOKEN is required, depending on the targeted host. + +GH_REPO: specify the GitHub repository in the [HOST/]OWNER/REPO format for commands that otherwise operate on a local repository. + +GH_EDITOR, GIT_EDITOR, VISUAL, EDITOR (in order of precedence): the editor tool to use for authoring text. + +GH_BROWSER, BROWSER (in order of precedence): the web browser to use for opening links. + +GH_DEBUG: set to a truthy value to enable verbose output on standard error. Set to api to additionally log details of HTTP traffic. + +DEBUG (deprecated): set to 1, true, or yes to enable verbose output on standard error. + +GH_PAGER, PAGER (in order of precedence): a terminal paging program to send standard output to, e.g. less. + +GLAMOUR_STYLE: the style to use for rendering Markdown. See https://github.com/charmbracelet/glamour#styles + +NO_COLOR: set to any value to avoid printing ANSI escape sequences for color output. + +CLICOLOR: set to 0 to disable printing ANSI colors in output. + +CLICOLOR_FORCE: set to a value other than 0 to keep ANSI colors in output even when the output is piped. + +GH_COLOR_LABELS: set to any value to display labels using their RGB hex color codes in terminals that support truecolor. + +GH_ACCESSIBLE_COLORS (preview): set to a truthy value to use customizable, 4-bit accessible colors. + +GH_FORCE_TTY: set to any value to force terminal-style output even when the output is redirected. When the value is a number, it is interpreted as the number of columns available in the viewport. When the value is a percentage, it will be applied against the number of columns available in the current viewport. + +GH_NO_UPDATE_NOTIFIER: set to any value to disable GitHub CLI update notifications. When any command is executed, gh checks for new versions once every 24 hours. If a newer version was found, an upgrade notice is displayed on standard error. + +GH_NO_EXTENSION_UPDATE_NOTIFIER: set to any value to disable GitHub CLI extension update notifications. When an extension is executed, gh checks for new versions for the executed extension once every 24 hours. If a newer version was found, an upgrade notice is displayed on standard error. + +GH_CONFIG_DIR: the directory where gh will store configuration files. If not specified, the default value will be one of the following paths (in order of precedence): + +GH_PROMPT_DISABLED: set to any value to disable interactive prompting in the terminal. + +GH_PATH: set the path to the gh executable, useful for when gh can not properly determine its own path such as in the cygwin terminal. + +GH_MDWIDTH: default maximum width for markdown render wrapping. The max width of lines wrapped on the terminal will be taken as the lesser of the terminal width, this value, or 120 if not specified. This value is used, for example, with pr view subcommand. + +GH_ACCESSIBLE_PROMPTER (preview): set to a truthy value to enable prompts that are more compatible with speech synthesis and braille screen readers. + +GH_SPINNER_DISABLED: set to a truthy value to replace the spinner animation with a textual progress indicator. + +--- + +## gh org + +**URL:** https://cli.github.com/manual/gh_org + +**Contents:** +- gh org + - General commands + - Examples + - See also + +Work with GitHub organizations. + +**Examples:** + +Example 1 (bash): +```bash +$ gh org list +``` + +--- + +## gh codespace + +**URL:** https://cli.github.com/manual/gh_codespace + +**Contents:** +- gh codespace + - Available commands + - ALIASES + - See also + +Connect to and manage codespaces + +--- + +## gh gist + +**URL:** https://cli.github.com/manual/gh_gist + +**Contents:** +- gh gist + - Available commands + - See also + +Work with GitHub gists. + +--- + +## gh alias list + +**URL:** https://cli.github.com/manual/gh_alias_list + +**Contents:** +- gh alias list + - ALIASES + - See also + +This command prints out all of the aliases gh is configured to use. + +**Examples:** + +Example 1 (unknown): +```unknown +gh alias list +``` + +--- + +## gh cache + +**URL:** https://cli.github.com/manual/gh_cache + +**Contents:** +- gh cache + - Available commands + - Options + - Examples + - See also + +Work with GitHub Actions caches. + +**Examples:** + +Example 1 (bash): +```bash +$ gh cache list +$ gh cache delete --all +``` + +--- + +## gh codespace ports forward + +**URL:** https://cli.github.com/manual/gh_codespace_ports_forward + +**Contents:** +- gh codespace ports forward + - Options inherited from parent commands + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh codespace ports forward :... +``` + +--- + +## gh codespace edit + +**URL:** https://cli.github.com/manual/gh_codespace_edit + +**Contents:** +- gh codespace edit + - Options + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh codespace edit [flags] +``` + +--- + +## gh auth login + +**URL:** https://cli.github.com/manual/gh_auth_login + +**Contents:** +- gh auth login + - Options + - Examples + - See also + +Authenticate with a GitHub host. + +The default hostname is github.com. This can be overridden using the --hostname flag. + +The default authentication mode is a web-based browser flow. After completion, an authentication token will be stored securely in the system credential store. If a credential store is not found or there is an issue using it gh will fallback to writing the token to a plain text file. See gh auth status for its stored location. + +Alternatively, use --with-token to pass in a personal access token (classic) on standard input. The minimum required scopes for the token are: repo, read:org, and gist. Take care when passing a fine-grained personal access token to --with-token as the inherent scoping to certain resources may cause confusing behaviour when interacting with other resources. Favour setting GH_TOKEN for fine-grained personal access token usage. + +Alternatively, gh will use the authentication token found in environment variables. This method is most suitable for "headless" use of gh such as in automation. See gh help environment for more info. + +To use gh in GitHub Actions, add GH_TOKEN: ${{ github.token }} to env. + +The git protocol to use for git operations on this host can be set with --git-protocol, or during the interactive prompting. Although login is for a single account on a host, setting the git protocol will take effect for all users on the host. + +Specifying ssh for the git protocol will detect existing SSH keys to upload, prompting to create and upload a new key if one is not found. This can be skipped with --skip-ssh-key flag. + +For more information on OAuth scopes, see https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps/. + +**Examples:** + +Example 1 (unknown): +```unknown +gh auth login [flags] +``` + +Example 2 (bash): +```bash +# Start interactive setup +$ gh auth login + +# Open a browser to authenticate and copy one-time OAuth code to clipboard +$ gh auth login --web --clipboard + +# Authenticate against github.com by reading the token from a file +$ gh auth login --with-token < mytoken.txt + +# Authenticate with specific host +$ gh auth login --hostname enterprise.internal +``` + +--- + +## gh attestation trusted-root + +**URL:** https://cli.github.com/manual/gh_attestation_trusted-root + +**Contents:** +- gh attestation trusted-root + - Options + - Examples + - See also + +Output contents for a trusted_root.jsonl file, likely for offline verification. + +When using gh attestation verify, if your machine is on the internet, this will happen automatically. But to do offline verification, you need to supply a trusted root file with --custom-trusted-root; this command will help you fetch a trusted_root.jsonl file for that purpose. + +You can call this command without any flags to get a trusted root file covering the Sigstore Public Good Instance as well as GitHub's Sigstore instance. + +Otherwise you can use --tuf-url to specify the URL of a custom TUF repository mirror, and --tuf-root should be the path to the root.json file that you securely obtained out-of-band. + +If you just want to verify the integrity of your local TUF repository, and don't want the contents of a trusted_root.jsonl file, use --verify-only. + +**Examples:** + +Example 1 (unknown): +```unknown +gh attestation trusted-root [--tuf-url --tuf-root ] [--verify-only] [flags] +``` + +Example 2 (bash): +```bash +# Get a trusted_root.jsonl for both Sigstore Public Good and GitHub's instance +$ gh attestation trusted-root +``` + +--- + +## gh gist edit + +**URL:** https://cli.github.com/manual/gh_gist_edit + +**Contents:** +- gh gist edit + - Options + - See also + +Edit one of your gists + +**Examples:** + +Example 1 (unknown): +```unknown +gh gist edit { | } [] [flags] +``` + +--- + +## gh config list + +**URL:** https://cli.github.com/manual/gh_config_list + +**Contents:** +- gh config list + - Options + - ALIASES + - See also + +Print a list of configuration keys and values + +**Examples:** + +Example 1 (unknown): +```unknown +gh config list [flags] +``` + +--- + +## gh variable set + +**URL:** https://cli.github.com/manual/gh_variable_set + +**Contents:** +- gh variable set + - Options + - Options inherited from parent commands + - Examples + - See also + +Set a value for a variable on one of the following levels: + +Organization variable can optionally be restricted to only be available to specific repositories. + +**Examples:** + +Example 1 (unknown): +```unknown +gh variable set [flags] +``` + +Example 2 (bash): +```bash +# Add variable value for the current repository in an interactive prompt +$ gh variable set MYVARIABLE + +# Read variable value from an environment variable +$ gh variable set MYVARIABLE --body "$ENV_VALUE" + +# Read variable value from a file +$ gh variable set MYVARIABLE < myfile.txt + +# Set variable for a deployment environment in the current repository +$ gh variable set MYVARIABLE --env myenvironment + +# Set organization-level variable visible to both public and private repositories +$ gh variable set MYVARIABLE --org myOrg --visibility all + +# Set organization-level variable visible to specific repositories +$ gh variable set MYVARIABLE --org myOrg --repos repo1,repo2,repo3 + +# Set multiple variables imported from the ".env" file +$ gh variable set -f .env +``` + +--- + +## gh gist view + +**URL:** https://cli.github.com/manual/gh_gist_view + +**Contents:** +- gh gist view + - Options + - See also + +View the given gist or select from recent gists. + +**Examples:** + +Example 1 (unknown): +```unknown +gh gist view [ | ] [flags] +``` + +--- + +## gh alias delete + +**URL:** https://cli.github.com/manual/gh_alias_delete + +**Contents:** +- gh alias delete + - Options + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh alias delete { | --all} [flags] +``` + +--- + +## gh alias import + +**URL:** https://cli.github.com/manual/gh_alias_import + +**Contents:** +- gh alias import + - Options + - Examples + - See also + +Import aliases from the contents of a YAML file. + +Aliases should be defined as a map in YAML, where the keys represent aliases and the values represent the corresponding expansions. An example file should look like the following: + +Use - to read aliases (in YAML format) from standard input. + +The output from gh alias list can be used to produce a YAML file containing your aliases, which you can use to import them from one machine to another. Run gh help alias list to learn more. + +**Examples:** + +Example 1 (unknown): +```unknown +gh alias import [ | -] [flags] +``` + +Example 2 (unknown): +```unknown +bugs: issue list --label=bug +igrep: '!gh issue list --label="$1" | grep "$2"' +features: |- + issue list + --label=enhancement +``` + +Example 3 (bash): +```bash +# Import aliases from a file +$ gh alias import aliases.yml + +# Import aliases from standard input +$ gh alias import - +``` + +--- + +## gh codespace cp + +**URL:** https://cli.github.com/manual/gh_codespace_cp + +**Contents:** +- gh codespace cp + - Options + - Examples + - See also + +The cp command copies files between the local and remote file systems. + +As with the UNIX cp command, the first argument specifies the source and the last specifies the destination; additional sources may be specified after the first, if the destination is a directory. + +The --recursive flag is required if any source is a directory. + +A remote: prefix on any file name argument indicates that it refers to the file system of the remote (Codespace) machine. It is resolved relative to the home directory of the remote user. + +By default, remote file names are interpreted literally. With the --expand flag, each such argument is treated in the manner of scp, as a Bash expression to be evaluated on the remote machine, subject to expansion of tildes, braces, globs, environment variables, and backticks. For security, do not use this flag with arguments provided by untrusted users; see https://lwn.net/Articles/835962/ for discussion. + +By default, the cp command will create a public/private ssh key pair to authenticate with the codespace inside the ~/.ssh directory. + +**Examples:** + +Example 1 (unknown): +```unknown +gh codespace cp [-e] [-r] [-- [...]] ... +``` + +Example 2 (bash): +```bash +$ gh codespace cp -e README.md 'remote:/workspaces/$RepositoryName/' +$ gh codespace cp -e 'remote:~/*.go' ./gofiles/ +$ gh codespace cp -e 'remote:/workspaces/myproj/go.{mod,sum}' ./gofiles/ +$ gh codespace cp -e -- -F ~/.ssh/codespaces_config 'remote:~/*.go' ./gofiles/ +``` + +--- + +## gh attestation + +**URL:** https://cli.github.com/manual/gh_attestation + +**Contents:** +- gh attestation + - Available commands + - ALIASES + - See also + +Download and verify artifact attestations. + +--- + +## gh codespace jupyter + +**URL:** https://cli.github.com/manual/gh_codespace_jupyter + +**Contents:** +- gh codespace jupyter + - Options + - See also + +Open a codespace in JupyterLab + +**Examples:** + +Example 1 (unknown): +```unknown +gh codespace jupyter [flags] +``` + +--- + +## gh gist rename + +**URL:** https://cli.github.com/manual/gh_gist_rename + +**Contents:** +- gh gist rename + - See also + +Rename a file in the given gist ID / URL. + +**Examples:** + +Example 1 (unknown): +```unknown +gh gist rename { | } +``` + +--- + +## gh completion + +**URL:** https://cli.github.com/manual/gh_completion + +**Contents:** +- gh completion + - bash + - zsh + - fish + - PowerShell + - Options + - See also + +Generate shell completion scripts for GitHub CLI commands. + +When installing GitHub CLI through a package manager, it's possible that no additional shell configuration is necessary to gain completion support. For Homebrew, see https://docs.brew.sh/Shell-Completion + +If you need to set up completions manually, follow the instructions below. The exact config file locations might vary based on your system. Make sure to restart your shell before testing whether completions are working. + +First, ensure that you install bash-completion using your package manager. + +After, add this to your ~/.bash_profile: + +Generate a _gh completion script and put it somewhere in your $fpath: + +Ensure that the following is present in your ~/.zshrc: + +Zsh version 5.7 or later is recommended. + +Generate a gh.fish completion script: + +Open your profile script with: + +Add the line and save the file: + +**Examples:** + +Example 1 (unknown): +```unknown +gh completion -s +``` + +Example 2 (unknown): +```unknown +eval "$(gh completion -s bash)" +``` + +Example 3 (unknown): +```unknown +gh completion -s zsh > /usr/local/share/zsh/site-functions/_gh +``` + +Example 4 (unknown): +```unknown +autoload -U compinit +compinit -i +``` + +--- + +## gh + +**URL:** https://cli.github.com/manual/gh + +**Contents:** +- gh + - Core commands + - GitHub Actions commands + - Additional commands + - Options + - Examples + +Work seamlessly with GitHub from the command line. + +**Examples:** + +Example 1 (bash): +```bash +$ gh issue create +$ gh repo clone cli/cli +$ gh pr checkout 321 +``` + +--- + +## gh gpg-key add + +**URL:** https://cli.github.com/manual/gh_gpg-key_add + +**Contents:** +- gh gpg-key add + - Options + - See also + +Add a GPG key to your GitHub account + +**Examples:** + +Example 1 (unknown): +```unknown +gh gpg-key add [] [flags] +``` + +--- + +## gh codespace ports visibility + +**URL:** https://cli.github.com/manual/gh_codespace_ports_visibility + +**Contents:** +- gh codespace ports visibility + - Options inherited from parent commands + - Examples + - See also + +Change the visibility of the forwarded port + +**Examples:** + +Example 1 (unknown): +```unknown +gh codespace ports visibility :{public|private|org}... +``` + +Example 2 (bash): +```bash +$ gh codespace ports visibility 80:org 3000:private 8000:public +``` + +--- + +## gh status + +**URL:** https://cli.github.com/manual/gh_status + +**Contents:** +- gh status + - Options + - Examples + - See also + +The status command prints information about your work on GitHub across all the repositories you're subscribed to, including: + +**Examples:** + +Example 1 (unknown): +```unknown +gh status [flags] +``` + +Example 2 (bash): +```bash +$ gh status -e cli/cli -e cli/go-gh # Exclude multiple repositories +$ gh status -o cli # Limit results to a single organization +``` + +--- + +## gh gpg-key delete + +**URL:** https://cli.github.com/manual/gh_gpg-key_delete + +**Contents:** +- gh gpg-key delete + - Options + - See also + +Delete a GPG key from your GitHub account + +**Examples:** + +Example 1 (unknown): +```unknown +gh gpg-key delete [flags] +``` + +--- + +## gh gpg-key + +**URL:** https://cli.github.com/manual/gh_gpg-key + +**Contents:** +- gh gpg-key + - Available commands + - See also + +Manage GPG keys registered with your GitHub account. + +--- + +## gh codespace rebuild + +**URL:** https://cli.github.com/manual/gh_codespace_rebuild + +**Contents:** +- gh codespace rebuild + - Options + - See also + +Rebuilding recreates your codespace. + +Your code and any current changes will be preserved. Your codespace will be rebuilt using your working directory's dev container. A full rebuild also removes cached Docker images. + +**Examples:** + +Example 1 (unknown): +```unknown +gh codespace rebuild [flags] +``` + +--- + +## gh secret delete + +**URL:** https://cli.github.com/manual/gh_secret_delete + +**Contents:** +- gh secret delete + - Options + - Options inherited from parent commands + - ALIASES + - See also + +Delete a secret on one of the following levels: + +**Examples:** + +Example 1 (unknown): +```unknown +gh secret delete [flags] +``` + +--- + +## gh config set + +**URL:** https://cli.github.com/manual/gh_config_set + +**Contents:** +- gh config set + - Options + - Examples + - See also + +Update configuration with a value for the given key + +**Examples:** + +Example 1 (unknown): +```unknown +gh config set [flags] +``` + +Example 2 (bash): +```bash +$ gh config set editor vim +$ gh config set editor "code --wait" +$ gh config set git_protocol ssh --host github.com +$ gh config set prompt disabled +``` + +--- + +## gh gist list + +**URL:** https://cli.github.com/manual/gh_gist_list + +**Contents:** +- gh gist list + - Options + - ALIASES + - Examples + - See also + +List gists from your user account. + +You can use a regular expression to filter the description, file names, or even the content of files in the gist using --filter. + +For supported regular expression syntax, see https://pkg.go.dev/regexp/syntax. + +Use --include-content to include content of files, noting that this will be slower and increase the rate limit used. Instead of printing a table, code will be printed with highlights similar to gh search code: + +No highlights or other color is printed when output is redirected. + +**Examples:** + +Example 1 (unknown): +```unknown +gh gist list [flags] +``` + +Example 2 (unknown): +```unknown +{{gist ID}} {{file name}} + {{description}} + {{matching lines from content}} +``` + +Example 3 (bash): +```bash +# List all secret gists from your user account +$ gh gist list --secret + +# Find all gists from your user account mentioning "octo" anywhere +$ gh gist list --filter octo --include-content +``` + +--- + +## gh variable delete + +**URL:** https://cli.github.com/manual/gh_variable_delete + +**Contents:** +- gh variable delete + - Options + - Options inherited from parent commands + - ALIASES + - See also + +Delete a variable on one of the following levels: + +**Examples:** + +Example 1 (unknown): +```unknown +gh variable delete [flags] +``` + +--- + +## gh codespace stop + +**URL:** https://cli.github.com/manual/gh_codespace_stop + +**Contents:** +- gh codespace stop + - Options + - See also + +Stop a running codespace + +**Examples:** + +Example 1 (unknown): +```unknown +gh codespace stop [flags] +``` + +--- + +## gh auth + +**URL:** https://cli.github.com/manual/gh_auth + +**Contents:** +- gh auth + - Available commands + - See also + +Authenticate gh and git with GitHub + +--- + +## gh gist delete + +**URL:** https://cli.github.com/manual/gh_gist_delete + +**Contents:** +- gh gist delete + - Options + - Examples + - See also + +Delete a GitHub gist. + +To delete a gist interactively, use gh gist delete with no arguments. + +To delete a gist non-interactively, supply the gist id or url. + +**Examples:** + +Example 1 (unknown): +```unknown +gh gist delete { | } [flags] +``` + +Example 2 (bash): +```bash +# Delete a gist interactively +$ gh gist delete + +# Delete a gist non-interactively +$ gh gist delete 1234 +``` + +--- + +## gh ssh-key delete + +**URL:** https://cli.github.com/manual/gh_ssh-key_delete + +**Contents:** +- gh ssh-key delete + - Options + - See also + +Delete an SSH key from your GitHub account + +**Examples:** + +Example 1 (unknown): +```unknown +gh ssh-key delete [flags] +``` + +--- + +## gh ssh-key list + +**URL:** https://cli.github.com/manual/gh_ssh-key_list + +**Contents:** +- gh ssh-key list + - ALIASES + - See also + +Lists SSH keys in your GitHub account + +**Examples:** + +Example 1 (unknown): +```unknown +gh ssh-key list +``` + +--- + +## gh codespace code + +**URL:** https://cli.github.com/manual/gh_codespace_code + +**Contents:** +- gh codespace code + - Options + - See also + +Open a codespace in Visual Studio Code + +**Examples:** + +Example 1 (unknown): +```unknown +gh codespace code [flags] +``` + +--- + +## gh secret set + +**URL:** https://cli.github.com/manual/gh_secret_set + +**Contents:** +- gh secret set + - Options + - Options inherited from parent commands + - Examples + - See also + +Set a value for a secret on one of the following levels: + +Organization and user secrets can optionally be restricted to only be available to specific repositories. + +Secret values are locally encrypted before being sent to GitHub. + +**Examples:** + +Example 1 (unknown): +```unknown +gh secret set [flags] +``` + +Example 2 (bash): +```bash +# Paste secret value for the current repository in an interactive prompt +$ gh secret set MYSECRET + +# Read secret value from an environment variable +$ gh secret set MYSECRET --body "$ENV_VALUE" + +# Set secret for a specific remote repository +$ gh secret set MYSECRET --repo origin/repo --body "$ENV_VALUE" + +# Read secret value from a file +$ gh secret set MYSECRET < myfile.txt + +# Set secret for a deployment environment in the current repository +$ gh secret set MYSECRET --env myenvironment + +# Set organization-level secret visible to both public and private repositories +$ gh secret set MYSECRET --org myOrg --visibility all + +# Set organization-level secret visible to specific repositories +$ gh secret set MYSECRET --org myOrg --repos repo1,repo2,repo3 + +# Set organization-level secret visible to no repositories +$ gh secret set MYSECRET --org myOrg --no-repos-selected + +# Set user-level secret for Codespaces +$ gh secret set MYSECRET --user + +# Set repository-level secret for Dependabot +$ gh secret set MYSECRET --app dependabot + +# Set multiple secrets imported from the ".env" file +$ gh secret set -f .env + +# Set multiple secrets from stdin +$ gh secret set -f - < myfile.txt +``` + +--- + +## gh org list + +**URL:** https://cli.github.com/manual/gh_org_list + +**Contents:** +- gh org list + - Options + - ALIASES + - Examples + - See also + +List organizations for the authenticated user. + +**Examples:** + +Example 1 (unknown): +```unknown +gh org list [flags] +``` + +Example 2 (bash): +```bash +# List the first 30 organizations +$ gh org list + +# List more organizations +$ gh org list --limit 100 +``` + +--- + +## gh secret list + +**URL:** https://cli.github.com/manual/gh_secret_list + +**Contents:** +- gh secret list + - Options + - Options inherited from parent commands + - ALIASES + - JSON Fields + - See also + +List secrets on one of the following levels: + +name, numSelectedRepos, selectedReposURL, updatedAt, visibility + +**Examples:** + +Example 1 (unknown): +```unknown +gh secret list [flags] +``` + +--- + +## gh auth refresh + +**URL:** https://cli.github.com/manual/gh_auth_refresh + +**Contents:** +- gh auth refresh + - Options + - Examples + - See also + +Expand or fix the permission scopes for stored credentials for active account. + +The --scopes flag accepts a comma separated list of scopes you want your gh credentials to have. If no scopes are provided, the command maintains previously added scopes. + +The --remove-scopes flag accepts a comma separated list of scopes you want to remove from your gh credentials. Scope removal is idempotent. The minimum set of scopes (repo, read:org, and gist) cannot be removed. + +The --reset-scopes flag resets the scopes for your gh credentials to the default set of scopes for your auth flow. + +If you have multiple accounts in gh auth status and want to refresh the credentials for an inactive account, you will have to use gh auth switch to that account first before using this command, and then switch back when you are done. + +For more information on OAuth scopes, see https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps/. + +**Examples:** + +Example 1 (unknown): +```unknown +gh auth refresh [flags] +``` + +Example 2 (bash): +```bash +# Open a browser to add write:org and read:public_key scopes +$ gh auth refresh --scopes write:org,read:public_key + +# Open a browser to ensure your authentication credentials have the correct minimum scopes +$ gh auth refresh + +# Open a browser to idempotently remove the delete_repo scope +$ gh auth refresh --remove-scopes delete_repo + +# Open a browser to re-authenticate with the default minimum scopes +$ gh auth refresh --reset-scopes + +# Open a browser to re-authenticate and copy one-time OAuth code to clipboard +$ gh auth refresh --clipboard +``` + +--- + +## gh cache delete + +**URL:** https://cli.github.com/manual/gh_cache_delete + +**Contents:** +- gh cache delete + - Options + - Options inherited from parent commands + - Examples + - See also + +Delete GitHub Actions caches. + +Deletion requires authorization with the repo scope. + +**Examples:** + +Example 1 (unknown): +```unknown +gh cache delete [ | | --all] [flags] +``` + +Example 2 (bash): +```bash +# Delete a cache by id +$ gh cache delete 1234 + +# Delete a cache by key +$ gh cache delete cache-key + +# Delete a cache by id in a specific repo +$ gh cache delete 1234 --repo cli/cli + +# Delete a cache by key and branch ref +$ gh cache delete cache-key --ref refs/heads/feature-branch + +# Delete a cache by key and PR ref +$ gh cache delete cache-key --ref refs/pull//merge + +# Delete all caches (exit code 1 on no caches) +$ gh cache delete --all + +# Delete all caches (exit code 0 on no caches) +$ gh cache delete --all --succeed-on-no-caches +``` + +--- + +## gh config clear-cache + +**URL:** https://cli.github.com/manual/gh_config_clear-cache + +**Contents:** +- gh config clear-cache + - Examples + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh config clear-cache +``` + +Example 2 (bash): +```bash +# Clear the cli cache +$ gh config clear-cache +``` + +--- + +## gh codespace logs + +**URL:** https://cli.github.com/manual/gh_codespace_logs + +**Contents:** +- gh codespace logs + - Options + - See also + +Access codespace logs + +**Examples:** + +Example 1 (unknown): +```unknown +gh codespace logs [flags] +``` + +--- + +## gh alias + +**URL:** https://cli.github.com/manual/gh_alias + +**Contents:** +- gh alias + - Available commands + - See also + +Aliases can be used to make shortcuts for gh commands or to compose multiple commands. + +Run gh help alias set to learn more. + +--- + +## gh cache list + +**URL:** https://cli.github.com/manual/gh_cache_list + +**Contents:** +- gh cache list + - Options + - Options inherited from parent commands + - ALIASES + - JSON Fields + - Examples + - See also + +List GitHub Actions caches + +createdAt, id, key, lastAccessedAt, ref, sizeInBytes, version + +**Examples:** + +Example 1 (unknown): +```unknown +gh cache list [flags] +``` + +Example 2 (bash): +```bash +# List caches for current repository +$ gh cache list + +# List caches for specific repository +$ gh cache list --repo cli/cli + +# List caches sorted by least recently accessed +$ gh cache list --sort last_accessed_at --order asc + +# List caches that have keys matching a prefix (or that match exactly) +$ gh cache list --key key-prefix + +# List caches for a specific branch, replace with the actual branch name +$ gh cache list --ref refs/heads/ + +# List caches for a specific pull request, replace with the actual pull request number +$ gh cache list --ref refs/pull//merge +``` + +--- + +## gh codespace ports + +**URL:** https://cli.github.com/manual/gh_codespace_ports + +**Contents:** +- gh codespace ports + - Available commands + - Options + - JSON Fields + - See also + +List ports in a codespace + +browseUrl, label, sourcePort, visibility + +**Examples:** + +Example 1 (unknown): +```unknown +gh codespace ports [flags] +``` + +--- + +## gh auth logout + +**URL:** https://cli.github.com/manual/gh_auth_logout + +**Contents:** +- gh auth logout + - Options + - Examples + - See also + +Remove authentication for a GitHub account. + +This command removes the stored authentication configuration for an account. The authentication configuration is only removed locally. + +This command does not revoke authentication tokens. + +To revoke all authentication tokens generated by the GitHub CLI: + +Note: this procedure will revoke all authentication tokens ever generated by the GitHub CLI across all your devices. + +For more information about revoking OAuth application tokens, see: https://docs.github.com/en/apps/oauth-apps/using-oauth-apps/reviewing-your-authorized-oauth-apps + +**Examples:** + +Example 1 (unknown): +```unknown +gh auth logout [flags] +``` + +Example 2 (bash): +```bash +# Select what host and account to log out of via a prompt +$ gh auth logout + +# Log out of a specific host and specific account +$ gh auth logout --hostname enterprise.internal --user monalisa +``` + +--- + +## GitHub CLI manual + +**URL:** https://cli.github.com/manual/ + +**Contents:** +- GitHub CLI manual +- Installation +- Configuration +- GitHub Enterprise +- Support + +GitHub CLI, or gh, is a command-line interface to GitHub for use in your terminal or your scripts. + +You can find installation instructions on our README. + +Run gh auth login to authenticate with your GitHub account. Alternatively, gh will respect the GITHUB_TOKEN environment variable. + +To set your preferred editor, use gh config set editor . Read more about gh config and environment variables. + +Declare your aliases for often-used commands with gh alias set. + +GitHub CLI supports GitHub Enterprise Server 2.20 and above. To authenticate with a GitHub instance, run: + +To define this host as a default for all GitHub CLI commands, set the GH_HOST environment variable: + +Finally, to authenticate commands in scripting mode or automation, set the GH_ENTERPRISE_TOKEN: + +Ask usage questions and send us feedback in Discussions + +Report bugs or search for existing feature requests in our issue tracker + +**Examples:** + +Example 1 (unknown): +```unknown +gh auth login --hostname +``` + +Example 2 (unknown): +```unknown +export GH_HOST= +``` + +Example 3 (unknown): +```unknown +export GH_ENTERPRISE_TOKEN= +``` + +--- + +## gh auth token + +**URL:** https://cli.github.com/manual/gh_auth_token + +**Contents:** +- gh auth token + - Options + - See also + +This command outputs the authentication token for an account on a given GitHub host. + +Without the --hostname flag, the default host is chosen. + +Without the --user flag, the active account for the host is chosen. + +**Examples:** + +Example 1 (unknown): +```unknown +gh auth token [flags] +``` + +--- + +## gh agent-task view + +**URL:** https://cli.github.com/manual/gh_agent-task_view + +**Contents:** +- gh agent-task view + - Options + - Examples + - See also + +View an agent task session. + +**Examples:** + +Example 1 (unknown): +```unknown +gh agent-task view [ | | | ] [flags] +``` + +Example 2 (bash): +```bash +# View an agent task by session ID +$ gh agent-task view e2fa49d2-f164-4a56-ab99-498090b8fcdf + +# View an agent task by pull request number in current repo +$ gh agent-task view 12345 + +# View an agent task by pull request number +$ gh agent-task view --repo OWNER/REPO 12345 + +# View an agent task by pull request reference +$ gh agent-task view OWNER/REPO#12345 + +# View a pull request agents tasks in the browser +$ gh agent-task view 12345 --web +``` + +--- + +## gh ssh-key add + +**URL:** https://cli.github.com/manual/gh_ssh-key_add + +**Contents:** +- gh ssh-key add + - Options + - See also + +Add an SSH key to your GitHub account + +**Examples:** + +Example 1 (unknown): +```unknown +gh ssh-key add [] [flags] +``` + +--- + +## gh codespace ssh + +**URL:** https://cli.github.com/manual/gh_codespace_ssh + +**Contents:** +- gh codespace ssh + - Options + - Examples + - See also + +The ssh command is used to SSH into a codespace. In its simplest form, you can run gh cs ssh, select a codespace interactively, and connect. + +The ssh command will automatically create a public/private ssh key pair in the ~/.ssh directory if you do not have an existing valid key pair. When selecting the key pair to use, the preferred order is: + +The ssh command also supports deeper integration with OpenSSH using a --config option that generates per-codespace ssh configuration in OpenSSH format. Including this configuration in your ~/.ssh/config improves the user experience of tools that integrate with OpenSSH, such as Bash/Zsh completion of ssh hostnames, remote path completion for scp/rsync/sshfs, git ssh remotes, and so on. + +Once that is set up (see the second example below), you can ssh to codespaces as if they were ordinary remote hosts (using ssh, not gh cs ssh). + +Note that the codespace you are connecting to must have an SSH server pre-installed. If the docker image being used for the codespace does not have an SSH server, install it in your Dockerfile or, for codespaces that use Debian-based images, you can add the following to your devcontainer.json: + +**Examples:** + +Example 1 (unknown): +```unknown +gh codespace ssh [...] [-- ...] [] +``` + +Example 2 (unknown): +```unknown +"features": { + "ghcr.io/devcontainers/features/sshd:1": { + "version": "latest" + } +} +``` + +Example 3 (bash): +```bash +$ gh codespace ssh + +$ gh codespace ssh --config > ~/.ssh/codespaces +$ printf 'Match all\nInclude ~/.ssh/codespaces\n' >> ~/.ssh/config +``` + +--- + +## gh auth switch + +**URL:** https://cli.github.com/manual/gh_auth_switch + +**Contents:** +- gh auth switch + - Options + - Examples + - See also + +Switch the active account for a GitHub host. + +This command changes the authentication configuration that will be used when running commands targeting the specified GitHub host. + +If the specified host has two accounts, the active account will be switched automatically. If there are more than two accounts, disambiguation will be required either through the --user flag or an interactive prompt. + +For a list of authenticated accounts you can run gh auth status. + +**Examples:** + +Example 1 (unknown): +```unknown +gh auth switch [flags] +``` + +Example 2 (bash): +```bash +# Select what host and account to switch to via a prompt +$ gh auth switch + +# Switch the active account on a specific host to a specific user +$ gh auth switch --hostname enterprise.internal --user monalisa +``` + +--- + +## gh config + +**URL:** https://cli.github.com/manual/gh_config + +**Contents:** +- gh config + - Available commands + - See also + +Display or change configuration settings for gh. + +Current respected settings: + +--- + +## gh ssh-key + +**URL:** https://cli.github.com/manual/gh_ssh-key + +**Contents:** +- gh ssh-key + - Available commands + - See also + +Manage SSH keys registered with your GitHub account. + +--- + +## gh gpg-key list + +**URL:** https://cli.github.com/manual/gh_gpg-key_list + +**Contents:** +- gh gpg-key list + - ALIASES + - See also + +Lists GPG keys in your GitHub account + +**Examples:** + +Example 1 (unknown): +```unknown +gh gpg-key list +``` + +--- + +## gh browse + +**URL:** https://cli.github.com/manual/gh_browse + +**Contents:** +- gh browse + - Options + - Examples + - See also + +Transition from the terminal to the web browser to view and interact with: + +**Examples:** + +Example 1 (unknown): +```unknown +gh browse [ | | ] [flags] +``` + +Example 2 (bash): +```bash +# Open the home page of the current repository +$ gh browse + +# Open the script directory of the current repository +$ gh browse script/ + +# Open issue or pull request 217 +$ gh browse 217 + +# Open commit page +$ gh browse 77507cd94ccafcf568f8560cfecde965fcfa63 + +# Open repository settings +$ gh browse --settings + +# Open main.go at line 312 +$ gh browse main.go:312 + +# Open main.go with the repository at head of bug-fix branch +$ gh browse main.go --branch bug-fix + +# Open main.go with the repository at commit 775007cd +$ gh browse main.go --commit=77507cd94ccafcf568f8560cfecde965fcfa63 +``` + +--- diff --git a/skills/skill/references/pull_requests.md b/skills/skill/references/pull_requests.md new file mode 100644 index 0000000..fe9694a --- /dev/null +++ b/skills/skill/references/pull_requests.md @@ -0,0 +1,823 @@ +# Gh-Cli - Pull Requests + +**Pages:** 31 + +--- + +## gh project view + +**URL:** https://cli.github.com/manual/gh_project_view + +**Contents:** +- gh project view + - Options + - Examples + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh project view [] [flags] +``` + +Example 2 (bash): +```bash +# View the current user's project "1" +$ gh project view 1 + +# Open user monalisa's project "1" in the browser +$ gh project view 1 --owner monalisa --web +``` + +--- + +## gh pr merge + +**URL:** https://cli.github.com/manual/gh_pr_merge + +**Contents:** +- gh pr merge + - Options + - Options inherited from parent commands + - See also + +Merge a pull request on GitHub. + +Without an argument, the pull request that belongs to the current branch is selected. + +When targeting a branch that requires a merge queue, no merge strategy is required. If required checks have not yet passed, auto-merge will be enabled. If required checks have passed, the pull request will be added to the merge queue. To bypass a merge queue and merge directly, pass the --admin flag. + +**Examples:** + +Example 1 (unknown): +```unknown +gh pr merge [ | | ] [flags] +``` + +--- + +## gh project copy + +**URL:** https://cli.github.com/manual/gh_project_copy + +**Contents:** +- gh project copy + - Options + - Examples + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh project copy [] [flags] +``` + +Example 2 (bash): +```bash +# Copy project "1" owned by monalisa to github +$ gh project copy 1 --source-owner monalisa --target-owner github --title "a new project" +``` + +--- + +## gh project item-add + +**URL:** https://cli.github.com/manual/gh_project_item-add + +**Contents:** +- gh project item-add + - Options + - Examples + - See also + +Add a pull request or an issue to a project + +**Examples:** + +Example 1 (unknown): +```unknown +gh project item-add [] [flags] +``` + +Example 2 (bash): +```bash +# Add an item to monalisa's project "1" +$ gh project item-add 1 --owner monalisa --url https://github.com/monalisa/myproject/issues/23 +``` + +--- + +## gh preview prompter + +**URL:** https://cli.github.com/manual/gh_preview_prompter + +**Contents:** +- gh preview prompter + - See also + +Execute a test program to preview the prompter. Without an argument, all prompts will be run. + +Available prompt types: + +**Examples:** + +Example 1 (unknown): +```unknown +gh preview prompter [prompt type] +``` + +--- + +## gh pr update-branch + +**URL:** https://cli.github.com/manual/gh_pr_update-branch + +**Contents:** +- gh pr update-branch + - Options + - Options inherited from parent commands + - Examples + - See also + +Update a pull request branch with latest changes of the base branch. + +Without an argument, the pull request that belongs to the current branch is selected. + +The default behavior is to update with a merge commit (i.e., merging the base branch into the PR's branch). To reconcile the changes with rebasing on top of the base branch, the --rebase option should be provided. + +**Examples:** + +Example 1 (unknown): +```unknown +gh pr update-branch [ | | ] [flags] +``` + +Example 2 (bash): +```bash +$ gh pr update-branch 23 +$ gh pr update-branch 23 --rebase +$ gh pr update-branch 23 --repo owner/repo +``` + +--- + +## gh agent-task list + +**URL:** https://cli.github.com/manual/gh_agent-task_list + +**Contents:** +- gh agent-task list + - Options + - See also + +List agent tasks (preview) + +**Examples:** + +Example 1 (unknown): +```unknown +gh agent-task list [flags] +``` + +--- + +## gh pr edit + +**URL:** https://cli.github.com/manual/gh_pr_edit + +**Contents:** +- gh pr edit + - Options + - Options inherited from parent commands + - Examples + - See also + +Without an argument, the pull request that belongs to the current branch is selected. + +Editing a pull request's projects requires authorization with the project scope. To authorize, run gh auth refresh -s project. + +The --add-assignee and --remove-assignee flags both support the following special values: + +The --add-reviewer and --remove-reviewer flags do not support these special values. + +**Examples:** + +Example 1 (unknown): +```unknown +gh pr edit [ | | ] [flags] +``` + +Example 2 (bash): +```bash +$ gh pr edit 23 --title "I found a bug" --body "Nothing works" +$ gh pr edit 23 --add-label "bug,help wanted" --remove-label "core" +$ gh pr edit 23 --add-reviewer monalisa,hubot --remove-reviewer myorg/team-name +$ gh pr edit 23 --add-assignee "@me" --remove-assignee monalisa,hubot +$ gh pr edit 23 --add-assignee "@copilot" +$ gh pr edit 23 --add-project "Roadmap" --remove-project v1,v2 +$ gh pr edit 23 --milestone "Version 1" +$ gh pr edit 23 --remove-milestone +``` + +--- + +## gh project mark-template + +**URL:** https://cli.github.com/manual/gh_project_mark-template + +**Contents:** +- gh project mark-template + - Options + - Examples + - See also + +Mark a project as a template + +**Examples:** + +Example 1 (unknown): +```unknown +gh project mark-template [] [flags] +``` + +Example 2 (bash): +```bash +# Mark the github org's project "1" as a template +$ gh project mark-template 1 --owner "github" + +# Unmark the github org's project "1" as a template +$ gh project mark-template 1 --owner "github" --undo +``` + +--- + +## gh pr review + +**URL:** https://cli.github.com/manual/gh_pr_review + +**Contents:** +- gh pr review + - Options + - Options inherited from parent commands + - Examples + - See also + +Add a review to a pull request. + +Without an argument, the pull request that belongs to the current branch is reviewed. + +**Examples:** + +Example 1 (unknown): +```unknown +gh pr review [ | | ] [flags] +``` + +Example 2 (bash): +```bash +# Approve the pull request of the current branch +$ gh pr review --approve + +# Leave a review comment for the current branch +$ gh pr review --comment -b "interesting" + +# Add a review for a specific pull request +$ gh pr review 123 + +# Request changes on a specific pull request +$ gh pr review 123 -r -b "needs more ASCII art" +``` + +--- + +## gh preview + +**URL:** https://cli.github.com/manual/gh_preview + +**Contents:** +- gh preview + - Available commands + - See also + +Preview commands are for testing, demonstrative, and development purposes only. They should be considered unstable and can change at any time. + +--- + +## gh pr close + +**URL:** https://cli.github.com/manual/gh_pr_close + +**Contents:** +- gh pr close + - Options + - Options inherited from parent commands + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh pr close { | | } [flags] +``` + +--- + +## gh project delete + +**URL:** https://cli.github.com/manual/gh_project_delete + +**Contents:** +- gh project delete + - Options + - Examples + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh project delete [] [flags] +``` + +Example 2 (bash): +```bash +# Delete the current user's project "1" +$ gh project delete 1 --owner "@me" +``` + +--- + +## gh pr lock + +**URL:** https://cli.github.com/manual/gh_pr_lock + +**Contents:** +- gh pr lock + - Options + - Options inherited from parent commands + - See also + +Lock pull request conversation + +**Examples:** + +Example 1 (unknown): +```unknown +gh pr lock { | } [flags] +``` + +--- + +## gh agent-task + +**URL:** https://cli.github.com/manual/gh_agent-task + +**Contents:** +- gh agent-task + - Available commands + - ALIASES + - Examples + - See also + +Working with agent tasks in the GitHub CLI is in preview and subject to change without notice. + +gh agent, gh agents, gh agent-tasks + +**Examples:** + +Example 1 (unknown): +```unknown +gh agent-task +``` + +Example 2 (bash): +```bash +# List your most recent agent tasks +$ gh agent-task list + +# Create a new agent task on the current repository +$ gh agent-task create "Improve the performance of the data processing pipeline" + +# View details about agent tasks associated with a pull request +$ gh agent-task view 123 + +# View details about a specific agent task +$ gh agent-task view 12345abc-12345-12345-12345-12345abc +``` + +--- + +## gh pr comment + +**URL:** https://cli.github.com/manual/gh_pr_comment + +**Contents:** +- gh pr comment + - Options + - Options inherited from parent commands + - Examples + - See also + +Add a comment to a GitHub pull request. + +Without the body text supplied through flags, the command will interactively prompt for the comment text. + +**Examples:** + +Example 1 (unknown): +```unknown +gh pr comment [ | | ] [flags] +``` + +Example 2 (bash): +```bash +$ gh pr comment 13 --body "Hi from GitHub CLI" +``` + +--- + +## gh project item-archive + +**URL:** https://cli.github.com/manual/gh_project_item-archive + +**Contents:** +- gh project item-archive + - Options + - Examples + - See also + +Archive an item in a project + +**Examples:** + +Example 1 (unknown): +```unknown +gh project item-archive [] [flags] +``` + +Example 2 (bash): +```bash +# Archive an item in the current user's project "1" +$ gh project item-archive 1 --owner "@me" --id +``` + +--- + +## gh project item-delete + +**URL:** https://cli.github.com/manual/gh_project_item-delete + +**Contents:** +- gh project item-delete + - Options + - Examples + - See also + +Delete an item from a project by ID + +**Examples:** + +Example 1 (unknown): +```unknown +gh project item-delete [] [flags] +``` + +Example 2 (bash): +```bash +# Delete an item in the current user's project "1" +$ gh project item-delete 1 --owner "@me" --id +``` + +--- + +## gh project close + +**URL:** https://cli.github.com/manual/gh_project_close + +**Contents:** +- gh project close + - Options + - Examples + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh project close [] [flags] +``` + +Example 2 (bash): +```bash +# Close project "1" owned by monalisa +$ gh project close 1 --owner monalisa + +# Reopen closed project "1" owned by github +$ gh project close 1 --owner github --undo +``` + +--- + +## gh project field-list + +**URL:** https://cli.github.com/manual/gh_project_field-list + +**Contents:** +- gh project field-list + - Options + - Examples + - See also + +List the fields in a project + +**Examples:** + +Example 1 (unknown): +```unknown +gh project field-list [] [flags] +``` + +Example 2 (bash): +```bash +# List fields in the current user's project "1" +$ gh project field-list 1 --owner "@me" +``` + +--- + +## gh project edit + +**URL:** https://cli.github.com/manual/gh_project_edit + +**Contents:** +- gh project edit + - Options + - Examples + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh project edit [] [flags] +``` + +Example 2 (bash): +```bash +# Edit the title of monalisa's project "1" +$ gh project edit 1 --owner monalisa --title "New title" +``` + +--- + +## gh project item-list + +**URL:** https://cli.github.com/manual/gh_project_item-list + +**Contents:** +- gh project item-list + - Options + - Examples + - See also + +List the items in a project + +**Examples:** + +Example 1 (unknown): +```unknown +gh project item-list [] [flags] +``` + +Example 2 (bash): +```bash +# List the items in the current users's project "1" +$ gh project item-list 1 --owner "@me" +``` + +--- + +## gh pr diff + +**URL:** https://cli.github.com/manual/gh_pr_diff + +**Contents:** +- gh pr diff + - Options + - Options inherited from parent commands + - See also + +View changes in a pull request. + +Without an argument, the pull request that belongs to the current branch is selected. + +With --web flag, open the pull request diff in a web browser instead. + +**Examples:** + +Example 1 (unknown): +```unknown +gh pr diff [ | | ] [flags] +``` + +--- + +## gh project list + +**URL:** https://cli.github.com/manual/gh_project_list + +**Contents:** +- gh project list + - Options + - ALIASES + - Examples + - See also + +List the projects for an owner + +**Examples:** + +Example 1 (unknown): +```unknown +gh project list [flags] +``` + +Example 2 (bash): +```bash +# List the current user's projects +$ gh project list + +# List the projects for org github including closed projects +$ gh project list --owner github --closed +``` + +--- + +## gh project + +**URL:** https://cli.github.com/manual/gh_project + +**Contents:** +- gh project + - Available commands + - Examples + - See also + +Work with GitHub Projects. + +The minimum required scope for the token is: project. You can verify your token scope by running gh auth status and add the project scope by running gh auth refresh -s project. + +**Examples:** + +Example 1 (bash): +```bash +$ gh project create --owner monalisa --title "Roadmap" +$ gh project view 1 --owner cli --web +$ gh project field-list 1 --owner cli +$ gh project item-list 1 --owner cli +``` + +--- + +## gh pr unlock + +**URL:** https://cli.github.com/manual/gh_pr_unlock + +**Contents:** +- gh pr unlock + - Options inherited from parent commands + - See also + +Unlock pull request conversation + +**Examples:** + +Example 1 (unknown): +```unknown +gh pr unlock { | } +``` + +--- + +## gh pr reopen + +**URL:** https://cli.github.com/manual/gh_pr_reopen + +**Contents:** +- gh pr reopen + - Options + - Options inherited from parent commands + - See also + +Reopen a pull request + +**Examples:** + +Example 1 (unknown): +```unknown +gh pr reopen { | | } [flags] +``` + +--- + +## gh project field-delete + +**URL:** https://cli.github.com/manual/gh_project_field-delete + +**Contents:** +- gh project field-delete + - Options + - See also + +Delete a field in a project + +**Examples:** + +Example 1 (unknown): +```unknown +gh project field-delete [flags] +``` + +--- + +## gh pr + +**URL:** https://cli.github.com/manual/gh_pr + +**Contents:** +- gh pr + - General commands + - Targeted commands + - Options + - Examples + - See also + +Work with GitHub pull requests. + +**Examples:** + +Example 1 (bash): +```bash +$ gh pr checkout 353 +$ gh pr create --fill +$ gh pr view --web +``` + +--- + +## gh pr checks + +**URL:** https://cli.github.com/manual/gh_pr_checks + +**Contents:** +- gh pr checks + - Options + - Options inherited from parent commands + - JSON Fields + - See also + +Show CI status for a single pull request. + +Without an argument, the pull request that belongs to the current branch is selected. + +When the --json flag is used, it includes a bucket field, which categorizes the state field into pass, fail, pending, skipping, or cancel. + +Additional exit codes: 8: Checks pending + +bucket, completedAt, description, event, link, name, startedAt, state, workflow + +**Examples:** + +Example 1 (unknown): +```unknown +gh pr checks [ | | ] [flags] +``` + +--- + +## gh pr ready + +**URL:** https://cli.github.com/manual/gh_pr_ready + +**Contents:** +- gh pr ready + - Options + - Options inherited from parent commands + - See also + +Mark a pull request as ready for review. + +Without an argument, the pull request that belongs to the current branch is marked as ready. + +If supported by your plan, convert to draft with --undo + +**Examples:** + +Example 1 (unknown): +```unknown +gh pr ready [ | | ] [flags] +``` + +--- diff --git a/skills/skill/references/releases.md b/skills/skill/references/releases.md new file mode 100644 index 0000000..63980b0 --- /dev/null +++ b/skills/skill/references/releases.md @@ -0,0 +1,254 @@ +# Gh-Cli - Releases + +**Pages:** 9 + +--- + +## gh release delete + +**URL:** https://cli.github.com/manual/gh_release_delete + +**Contents:** +- gh release delete + - Options + - Options inherited from parent commands + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh release delete [flags] +``` + +--- + +## gh release upload + +**URL:** https://cli.github.com/manual/gh_release_upload + +**Contents:** +- gh release upload + - Options + - Options inherited from parent commands + - See also + +Upload asset files to a GitHub Release. + +To define a display label for an asset, append text starting with # after the file name. + +**Examples:** + +Example 1 (unknown): +```unknown +gh release upload ... [flags] +``` + +--- + +## gh release delete-asset + +**URL:** https://cli.github.com/manual/gh_release_delete-asset + +**Contents:** +- gh release delete-asset + - Options + - Options inherited from parent commands + - See also + +Delete an asset from a release + +**Examples:** + +Example 1 (unknown): +```unknown +gh release delete-asset [flags] +``` + +--- + +## gh release view + +**URL:** https://cli.github.com/manual/gh_release_view + +**Contents:** +- gh release view + - Options + - Options inherited from parent commands + - JSON Fields + - See also + +View information about a GitHub Release. + +Without an explicit tag name argument, the latest release in the project is shown. + +apiUrl, assets, author, body, createdAt, databaseId, id, isDraft, isImmutable, isPrerelease, name, publishedAt, tagName, tarballUrl, targetCommitish, uploadUrl, url, zipballUrl + +**Examples:** + +Example 1 (unknown): +```unknown +gh release view [] [flags] +``` + +--- + +## gh release verify-asset + +**URL:** https://cli.github.com/manual/gh_release_verify-asset + +**Contents:** +- gh release verify-asset + - Options + - Options inherited from parent commands + - Examples + - See also + +Verify that a given asset file originated from a specific GitHub Release using cryptographically signed attestations. + +An attestation is a claim made by GitHub regarding a release and its assets. + +**Examples:** + +Example 1 (unknown): +```unknown +gh release verify-asset [] [flags] +``` + +Example 2 (unknown): +```unknown +This command checks that the asset you provide matches a valid attestation for the specified release (or the latest release, if no tag is given). It ensures the asset's integrity by validating that the asset's digest matches the subject in the attestation and that the attestation is associated with the release. +``` + +Example 3 (bash): +```bash +# Verify an asset from the latest release +$ gh release verify-asset ./dist/my-asset.zip + +# Verify an asset from a specific release tag +$ gh release verify-asset v1.2.3 ./dist/my-asset.zip + +# Verify an asset from a specific release tag and output the attestation in JSON format +$ gh release verify-asset v1.2.3 ./dist/my-asset.zip --format json +``` + +--- + +## gh release download + +**URL:** https://cli.github.com/manual/gh_release_download + +**Contents:** +- gh release download + - Options + - Options inherited from parent commands + - Examples + - See also + +Download assets from a GitHub release. + +Without an explicit tag name argument, assets are downloaded from the latest release in the project. In this case, --pattern or --archive is required. + +**Examples:** + +Example 1 (unknown): +```unknown +gh release download [] [flags] +``` + +Example 2 (bash): +```bash +# Download all assets from a specific release +$ gh release download v1.2.3 + +# Download only Debian packages for the latest release +$ gh release download --pattern '*.deb' + +# Specify multiple file patterns +$ gh release download -p '*.deb' -p '*.rpm' + +# Download the archive of the source code for a release +$ gh release download v1.2.3 --archive=zip +``` + +--- + +## gh release edit + +**URL:** https://cli.github.com/manual/gh_release_edit + +**Contents:** +- gh release edit + - Options + - Options inherited from parent commands + - Examples + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh release edit +``` + +Example 2 (bash): +```bash +# Publish a release that was previously a draft +$ gh release edit v1.0 --draft=false + +# Update the release notes from the content of a file +$ gh release edit v1.0 --notes-file /path/to/release_notes.md +``` + +--- + +## gh release verify + +**URL:** https://cli.github.com/manual/gh_release_verify + +**Contents:** +- gh release verify + - Options + - Options inherited from parent commands + - Examples + - See also + +Verify that a GitHub Release is accompanied by a valid cryptographically signed attestation. + +An attestation is a claim made by GitHub regarding a release and its assets. + +This command checks that the specified release (or the latest release, if no tag is given) has a valid attestation. It fetches the attestation for the release and prints metadata about all assets referenced in the attestation, including their digests. + +**Examples:** + +Example 1 (unknown): +```unknown +gh release verify [] [flags] +``` + +Example 2 (bash): +```bash +# Verify the latest release +gh release verify + +# Verify a specific release by tag +gh release verify v1.2.3 + +# Verify a specific release by tag and output the attestation in JSON format +gh release verify v1.2.3 --format json +``` + +--- + +## gh release + +**URL:** https://cli.github.com/manual/gh_release + +**Contents:** +- gh release + - General commands + - Targeted commands + - Options + - See also + +--- diff --git a/skills/skill/references/remote-analysis.md b/skills/skill/references/remote-analysis.md new file mode 100644 index 0000000..3c247ce --- /dev/null +++ b/skills/skill/references/remote-analysis.md @@ -0,0 +1,92 @@ +# Remote Repository Analysis + +Fetch files and analyze repositories without cloning them locally. + +## Fetch Files Without Cloning + +### Get directory listing + +```bash +gh api repos/OWNER/REPO/contents/PATH +``` + +Returns JSON array with file/directory metadata. + +### Fetch file content + +```bash +gh api repos/OWNER/REPO/contents/path/file.ts | jq -r '.content' | base64 -d +``` + +The API returns base64-encoded content, so decode it with `base64 -d`. + +### Get entire file tree recursively + +```bash +gh api repos/OWNER/REPO/git/trees/main?recursive=1 +``` + +Returns complete tree structure in one request. + +## Useful Remote Analysis Patterns + +### Check if file exists + +```bash +gh api repos/OWNER/REPO/contents/path/file.ts 2>/dev/null && echo "exists" || echo "not found" +``` + +### Get latest commit for specific file + +```bash +gh api repos/OWNER/REPO/commits?path=src/index.ts | jq -r '.[0].sha' +``` + +### Compare file across branches + +```bash +gh api repos/OWNER/REPO/contents/file.ts?ref=main | jq -r '.content' | base64 -d > main.ts +gh api repos/OWNER/REPO/contents/file.ts?ref=dev | jq -r '.content' | base64 -d > dev.ts +diff main.ts dev.ts +``` + +### Get file from specific commit + +```bash +gh api repos/OWNER/REPO/contents/file.ts?ref=abc123 | jq -r '.content' | base64 -d +``` + +Use any commit SHA, branch name, or tag as the `ref` parameter. + +## Working with Large Repositories + +For large repos, use the Git Trees API instead of Contents API: + +```bash +# Get full tree +gh api repos/OWNER/REPO/git/trees/main?recursive=1 | jq '.tree[] | select(.type == "blob") | .path' +``` + +This is more efficient for listing many files. + +## Common Use Cases + +### Inspect configuration files + +```bash +gh api repos/vercel/next.js/contents/package.json | jq -r '.content' | base64 -d | jq '.dependencies' +``` + +### Check documentation + +```bash +gh api repos/anthropics/anthropic-sdk-python/contents/README.md | jq -r '.content' | base64 -d +``` + +### Analyze project structure + +```bash +gh api repos/OWNER/REPO/git/trees/main?recursive=1 | jq -r '.tree[] | select(.type == "tree") | .path' +``` + +Shows all directories in the repository. diff --git a/skills/skill/references/repositories.md b/skills/skill/references/repositories.md new file mode 100644 index 0000000..57b6d2c --- /dev/null +++ b/skills/skill/references/repositories.md @@ -0,0 +1,2763 @@ +# Gh-Cli - Repositories + +**Pages:** 72 + +--- + +## gh repo autolink + +**URL:** https://cli.github.com/manual/gh_repo_autolink + +**Contents:** +- gh repo autolink + - Available commands + - Options + - See also + +Autolinks link issues, pull requests, commit messages, and release descriptions to external third-party services. + +Autolinks require admin role to view or manage. + +For more information, see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources + +--- + +## gh repo gitignore list + +**URL:** https://cli.github.com/manual/gh_repo_gitignore_list + +**Contents:** +- gh repo gitignore list + - ALIASES + - See also + +List available repository gitignore templates + +**Examples:** + +Example 1 (unknown): +```unknown +gh repo gitignore list +``` + +--- + +## gh label list + +**URL:** https://cli.github.com/manual/gh_label_list + +**Contents:** +- gh label list + - Options + - Options inherited from parent commands + - ALIASES + - JSON Fields + - Examples + - See also + +Display labels in a GitHub repository. + +When using the --search flag results are sorted by best match of the query. This behavior cannot be configured with the --order or --sort flags. + +color, createdAt, description, id, isDefault, name, updatedAt, url + +**Examples:** + +Example 1 (unknown): +```unknown +gh label list [flags] +``` + +Example 2 (bash): +```bash +# Sort labels by name +$ gh label list --sort name + +# Find labels with "bug" in the name or description +$ gh label list --search bug +``` + +--- + +## gh repo rename + +**URL:** https://cli.github.com/manual/gh_repo_rename + +**Contents:** +- gh repo rename + - Options + - Examples + - See also + +Rename a GitHub repository. + + is the desired repository name without the owner. + +By default, the current repository is renamed. Otherwise, the repository specified with --repo is renamed. + +To transfer repository ownership to another user account or organization, you must follow additional steps on github.com. + +For more information on transferring repository ownership, see: https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository + +**Examples:** + +Example 1 (unknown): +```unknown +gh repo rename [] [flags] +``` + +Example 2 (bash): +```bash +# Rename the current repository (foo/bar -> foo/baz) +$ gh repo rename baz + +# Rename the specified repository (qux/quux -> qux/baz) +$ gh repo rename -R qux/quux baz +``` + +--- + +## gh repo clone + +**URL:** https://cli.github.com/manual/gh_repo_clone + +**Contents:** +- gh repo clone + - Options + - Examples + - See also + - In use + - Using OWNER/REPO syntax + - Using other selectors + +Clone a GitHub repository locally. Pass additional git clone flags by listing them after --. + +If the OWNER/ portion of the OWNER/REPO repository argument is omitted, it defaults to the name of the authenticating user. + +When a protocol scheme is not provided in the repository argument, the git_protocol will be chosen from your configuration, which can be checked via gh config get git_protocol. If the protocol scheme is provided, the repository will be cloned using the specified protocol. + +If the repository is a fork, its parent repository will be added as an additional git remote called upstream. The remote name can be configured using --upstream-remote-name. The --upstream-remote-name option supports an @owner value which will name the remote after the owner of the parent repository. + +If the repository is a fork, its parent repository will be set as the default remote repository. + +You can clone any repository using OWNER/REPO syntax. + +You can also use GitHub URLs to clone repositories. + +**Examples:** + +Example 1 (unknown): +```unknown +gh repo clone [] [-- ...] +``` + +Example 2 (bash): +```bash +# Clone a repository from a specific org +$ gh repo clone cli/cli + +# Clone a repository from your own account +$ gh repo clone myrepo + +# Clone a repo, overriding git protocol configuration +$ gh repo clone https://github.com/cli/cli +$ gh repo clone git@github.com:cli/cli.git + +# Clone a repository to a custom directory +$ gh repo clone cli/cli workspace/cli + +# Clone a repository with additional git clone flags +$ gh repo clone cli/cli -- --depth=1 +``` + +Example 3 (unknown): +```unknown +# Cloning a repository +~/Projects$ gh repo clone cli/cli +Cloning into 'cli'... +~/Projects$ cd cli +~/Projects/cli$ +``` + +Example 4 (unknown): +```unknown +# Cloning a repository +~/Projects/my-project$ gh repo clone https://github.com/cli/cli +Cloning into 'cli'... +remote: Enumerating objects: 99, done. +remote: Counting objects: 100% (99/99), done. +remote: Compressing objects: 100% (76/76), done. +remote: Total 21160 (delta 49), reused 35 (delta 18), pack-reused 21061 +Receiving objects: 100% (21160/21160), 57.93 MiB | 10.82 MiB/s, done. +Resolving deltas: 100% (16051/16051), done. + +~/Projects/my-project$ +``` + +--- + +## gh repo autolink list + +**URL:** https://cli.github.com/manual/gh_repo_autolink_list + +**Contents:** +- gh repo autolink list + - Options + - Options inherited from parent commands + - ALIASES + - JSON Fields + - See also + +Gets all autolink references that are configured for a repository. + +Information about autolinks is only available to repository administrators. + +id, isAlphanumeric, keyPrefix, urlTemplate + +**Examples:** + +Example 1 (unknown): +```unknown +gh repo autolink list [flags] +``` + +--- + +## gh pr status + +**URL:** https://cli.github.com/manual/gh_pr_status + +**Contents:** +- gh pr status + - Options + - Options inherited from parent commands + - JSON Fields + - See also + - In use + +Show status of relevant pull requests. + +The status shows a summary of pull requests that includes information such as pull request number, title, CI checks, reviews, etc. + +To see more details of CI checks, run gh pr checks. + +additions, assignees, author, autoMergeRequest, baseRefName, baseRefOid, body, changedFiles, closed, closedAt, closingIssuesReferences, comments, commits, createdAt, deletions, files, fullDatabaseId, headRefName, headRefOid, headRepository, headRepositoryOwner, id, isCrossRepository, isDraft, labels, latestReviews, maintainerCanModify, mergeCommit, mergeStateStatus, mergeable, mergedAt, mergedBy, milestone, number, potentialMergeCommit, projectCards, projectItems, reactionGroups, reviewDecision, reviewRequests, reviews, state, statusCheckRollup, title, updatedAt, url + +**Examples:** + +Example 1 (unknown): +```unknown +gh pr status [flags] +``` + +Example 2 (unknown): +```unknown +# Viewing the status of your relevant pull requests +~/Projects/my-project$ gh pr status +Current branch + #12 Remove the test feature [user:patch-2] + - All checks failing - Review required + +Created by you + You have no open pull requests + +Requesting a code review from you + #13 Fix tests [branch] + - 3/4 checks failing - Review required + #15 New feature [branch] + - Checks passing - Approved + +~/Projects/my-project$ +``` + +--- + +## gh agent-task create + +**URL:** https://cli.github.com/manual/gh_agent-task_create + +**Contents:** +- gh agent-task create + - Options + - Examples + - See also + +Create an agent task (preview) + +**Examples:** + +Example 1 (unknown): +```unknown +gh agent-task create [] [flags] +``` + +Example 2 (bash): +```bash +# Create a task from an inline description +$ gh agent-task create "build me a new app" + +# Create a task from an inline description and follow logs +$ gh agent-task create "build me a new app" --follow + +# Create a task from a file +$ gh agent-task create -F task-desc.md + +# Create a task with problem statement from stdin +$ echo "build me a new app" | gh agent-task create -F - + +# Create a task with an editor +$ gh agent-task create + +# Create a task with an editor and a file as a template +$ gh agent-task create -F task-desc.md + +# Select a different base branch for the PR +$ gh agent-task create "fix errors" --base branch +``` + +--- + +## gh project unlink + +**URL:** https://cli.github.com/manual/gh_project_unlink + +**Contents:** +- gh project unlink + - Options + - Examples + - See also + +Unlink a project from a repository or a team + +**Examples:** + +Example 1 (unknown): +```unknown +gh project unlink [] [flags] +``` + +Example 2 (bash): +```bash +# Unlink monalisa's project 1 from her repository "my_repo" +$ gh project unlink 1 --owner monalisa --repo my_repo + +# Unlink monalisa's organization's project 1 from her team "my_team" +$ gh project unlink 1 --owner my_organization --team my_team + +# Unlink monalisa's project 1 from the repository of current directory if neither --repo nor --team is specified +$ gh project unlink 1 +``` + +--- + +## gh repo + +**URL:** https://cli.github.com/manual/gh_repo + +**Contents:** +- gh repo + - General commands + - Targeted commands + - Examples + - See also + +Work with GitHub repositories. + +**Examples:** + +Example 1 (bash): +```bash +$ gh repo create +$ gh repo clone cli/cli +$ gh repo view --web +``` + +--- + +## gh project link + +**URL:** https://cli.github.com/manual/gh_project_link + +**Contents:** +- gh project link + - Options + - Examples + - See also + +Link a project to a repository or a team + +**Examples:** + +Example 1 (unknown): +```unknown +gh project link [] [flags] +``` + +Example 2 (bash): +```bash +# Link monalisa's project 1 to her repository "my_repo" +$ gh project link 1 --owner monalisa --repo my_repo + +# Link monalisa's organization's project 1 to her team "my_team" +$ gh project link 1 --owner my_organization --team my_team + +# Link monalisa's project 1 to the repository of current directory if neither --repo nor --team is specified +$ gh project link 1 +``` + +--- + +## gh repo autolink view + +**URL:** https://cli.github.com/manual/gh_repo_autolink_view + +**Contents:** +- gh repo autolink view + - Options + - Options inherited from parent commands + - JSON Fields + - See also + +View an autolink reference for a repository. + +id, isAlphanumeric, keyPrefix, urlTemplate + +**Examples:** + +Example 1 (unknown): +```unknown +gh repo autolink view [flags] +``` + +--- + +## gh label clone + +**URL:** https://cli.github.com/manual/gh_label_clone + +**Contents:** +- gh label clone + - Options + - Options inherited from parent commands + - Examples + - See also + +Clones labels from a source repository to a destination repository on GitHub. By default, the destination repository is the current repository. + +All labels from the source repository will be copied to the destination repository. Labels in the destination repository that are not in the source repository will not be deleted or modified. + +Labels from the source repository that already exist in the destination repository will be skipped. You can overwrite existing labels in the destination repository using the --force flag. + +**Examples:** + +Example 1 (unknown): +```unknown +gh label clone [flags] +``` + +Example 2 (bash): +```bash +# Clone and overwrite labels from cli/cli repository into the current repository +$ gh label clone cli/cli --force + +# Clone labels from cli/cli repository into a octocat/cli repository +$ gh label clone cli/cli --repo octocat/cli +``` + +--- + +## gh repo list + +**URL:** https://cli.github.com/manual/gh_repo_list + +**Contents:** +- gh repo list + - Options + - ALIASES + - JSON Fields + - See also + +List repositories owned by a user or organization. + +Note that the list will only include repositories owned by the provided argument, and the --fork or --source flags will not traverse ownership boundaries. For example, when listing the forks in an organization, the output would not include those owned by individual users. + +archivedAt, assignableUsers, codeOfConduct, contactLinks, createdAt, defaultBranchRef, deleteBranchOnMerge, description, diskUsage, forkCount, fundingLinks, hasDiscussionsEnabled, hasIssuesEnabled, hasProjectsEnabled, hasWikiEnabled, homepageUrl, id, isArchived, isBlankIssuesEnabled, isEmpty, isFork, isInOrganization, isMirror, isPrivate, isSecurityPolicyEnabled, isTemplate, isUserConfigurationRepository, issueTemplates, issues, labels, languages, latestRelease, licenseInfo, mentionableUsers, mergeCommitAllowed, milestones, mirrorUrl, name, nameWithOwner, openGraphImageUrl, owner, parent, primaryLanguage, projects, projectsV2, pullRequestTemplates, pullRequests, pushedAt, rebaseMergeAllowed, repositoryTopics, securityPolicyUrl, squashMergeAllowed, sshUrl, stargazerCount, templateRepository, updatedAt, url, usesCustomOpenGraphImage, viewerCanAdminister, viewerDefaultCommitEmail, viewerDefaultMergeMethod, viewerHasStarred, viewerPermission, viewerPossibleCommitEmails, viewerSubscription, visibility, watchers + +**Examples:** + +Example 1 (unknown): +```unknown +gh repo list [] [flags] +``` + +--- + +## gh issue unpin + +**URL:** https://cli.github.com/manual/gh_issue_unpin + +**Contents:** +- gh issue unpin + - Options inherited from parent commands + - Examples + - See also + +Unpin an issue from a repository. + +The issue can be specified by issue number or URL. + +**Examples:** + +Example 1 (unknown): +```unknown +gh issue unpin { | } +``` + +Example 2 (bash): +```bash +# Unpin issue from the current repository +$ gh issue unpin 23 + +# Unpin issue by URL +$ gh issue unpin https://github.com/owner/repo/issues/23 + +# Unpin an issue from specific repository +$ gh issue unpin 23 --repo owner/repo +``` + +--- + +## gh repo view + +**URL:** https://cli.github.com/manual/gh_repo_view + +**Contents:** +- gh repo view + - Options + - JSON Fields + - See also + - In use + - In terminal + - In the browser + - With no arguments + +Display the description and the README of a GitHub repository. + +With no argument, the repository for the current directory is displayed. + +With --web, open the repository in a web browser instead. + +With --branch, view a specific branch of the repository. + +archivedAt, assignableUsers, codeOfConduct, contactLinks, createdAt, defaultBranchRef, deleteBranchOnMerge, description, diskUsage, forkCount, fundingLinks, hasDiscussionsEnabled, hasIssuesEnabled, hasProjectsEnabled, hasWikiEnabled, homepageUrl, id, isArchived, isBlankIssuesEnabled, isEmpty, isFork, isInOrganization, isMirror, isPrivate, isSecurityPolicyEnabled, isTemplate, isUserConfigurationRepository, issueTemplates, issues, labels, languages, latestRelease, licenseInfo, mentionableUsers, mergeCommitAllowed, milestones, mirrorUrl, name, nameWithOwner, openGraphImageUrl, owner, parent, primaryLanguage, projects, projectsV2, pullRequestTemplates, pullRequests, pushedAt, rebaseMergeAllowed, repositoryTopics, securityPolicyUrl, squashMergeAllowed, sshUrl, stargazerCount, templateRepository, updatedAt, url, usesCustomOpenGraphImage, viewerCanAdminister, viewerDefaultCommitEmail, viewerDefaultMergeMethod, viewerHasStarred, viewerPermission, viewerPossibleCommitEmails, viewerSubscription, visibility, watchers + +By default, we will display items in the terminal. + +Quickly open an item in the browser using --web or -w + +We will display the repository you're currently in. + +**Examples:** + +Example 1 (unknown): +```unknown +gh repo view [] [flags] +``` + +Example 2 (unknown): +```unknown +# Viewing a repository in terminal +~/Projects/my-project$ gh repo view owner/repo +owner/repo +Repository description + + Repository README + +View this repository on GitHub: https://github.com/owner/repo/ +~/Projects/my-project$ +``` + +Example 3 (unknown): +```unknown +# Viewing a repository in the browser +~/Projects$ gh repo view owner/repo --web +Opening https://github.com/owner/repo/ in your browser. +~/Projects$ +``` + +Example 4 (unknown): +```unknown +# Viewing the repository you're in +~/Projects/my-project$ gh repo view +owner/my-project +Repository description + + Repository README + +View this repository on GitHub: https://github.com/owner/repo/ +~/Projects/my-project$ +``` + +--- + +## gh gist clone + +**URL:** https://cli.github.com/manual/gh_gist_clone + +**Contents:** +- gh gist clone + - See also + +Clone a GitHub gist locally. + +A gist can be supplied as argument in either of the following formats: + +Pass additional git clone flags by listing them after --. + +**Examples:** + +Example 1 (unknown): +```unknown +gh gist clone [] [-- ...] +``` + +--- + +## gh codespace create + +**URL:** https://cli.github.com/manual/gh_codespace_create + +**Contents:** +- gh codespace create + - Options + - See also + +**Examples:** + +Example 1 (unknown): +```unknown +gh codespace create [flags] +``` + +--- + +## gh repo delete + +**URL:** https://cli.github.com/manual/gh_repo_delete + +**Contents:** +- gh repo delete + - Options + - See also + +Delete a GitHub repository. + +With no argument, deletes the current repository. Otherwise, deletes the specified repository. + +For safety, when no repository argument is provided, the --yes flag is ignored and you will be prompted for confirmation. To delete the current repository non-interactively, specify it explicitly (e.g., gh repo delete owner/repo --yes). + +Deletion requires authorization with the delete_repo scope. To authorize, run gh auth refresh -s delete_repo + +**Examples:** + +Example 1 (unknown): +```unknown +gh repo delete [] [flags] +``` + +--- + +## gh repo deploy-key add + +**URL:** https://cli.github.com/manual/gh_repo_deploy-key_add + +**Contents:** +- gh repo deploy-key add + - Options + - Options inherited from parent commands + - Examples + - See also + +Add a deploy key to a GitHub repository. + +Note that any key added by gh will be associated with the current authentication token. If you de-authorize the GitHub CLI app or authentication token from your account, any deploy keys added by GitHub CLI will be removed as well. + +**Examples:** + +Example 1 (unknown): +```unknown +gh repo deploy-key add [flags] +``` + +Example 2 (bash): +```bash +# Generate a passwordless SSH key and add it as a deploy key to a repository +$ ssh-keygen -t ed25519 -C "my description" -N "" -f ~/.ssh/gh-test +$ gh repo deploy-key add ~/.ssh/gh-test.pub +``` + +--- + +## gh repo gitignore view + +**URL:** https://cli.github.com/manual/gh_repo_gitignore_view + +**Contents:** +- gh repo gitignore view + - Examples + - See also + +View an available repository .gitignore template. + +