{"id":28717446,"url":"https://github.com/yuitosato/gh-asset","last_synced_at":"2026-05-02T22:36:01.904Z","repository":{"id":299079961,"uuid":"1002000977","full_name":"YuitoSato/gh-asset","owner":"YuitoSato","description":"A CLI tool to download GitHub issue/PR assets using GitHub CLI authentication.","archived":false,"fork":false,"pushed_at":"2025-06-14T15:17:56.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-14T15:29:45.503Z","etag":null,"topics":["git","github"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YuitoSato.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-14T13:56:17.000Z","updated_at":"2025-06-14T15:17:57.000Z","dependencies_parsed_at":"2025-06-14T15:31:52.134Z","dependency_job_id":"94cea3f7-e371-423e-b545-e148c80287dd","html_url":"https://github.com/YuitoSato/gh-asset","commit_stats":null,"previous_names":["yuitosato/gh-asset"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/YuitoSato/gh-asset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuitoSato%2Fgh-asset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuitoSato%2Fgh-asset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuitoSato%2Fgh-asset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuitoSato%2Fgh-asset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YuitoSato","download_url":"https://codeload.github.com/YuitoSato/gh-asset/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuitoSato%2Fgh-asset/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259919293,"owners_count":22932067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","github"],"created_at":"2025-06-15T04:00:35.535Z","updated_at":"2026-05-02T22:36:01.851Z","avatar_url":"https://github.com/YuitoSato.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gh-asset\n\nA CLI tool to download GitHub user-attachments assets using GitHub CLI authentication.\n\n## Features\n\n- Download assets from GitHub issues and pull requests using asset ID\n- Uses GitHub CLI (`gh`) for authentication\n- Built with Rust for performance and reliability\n\n## Prerequisites\n\n- [GitHub CLI](https://cli.github.com/) installed and authenticated\n\n## Installation\n\n### Homebrew (macOS/Linux) - Recommended\n\n```bash\nbrew tap YuitoSato/gh-asset\nbrew install gh-asset\n```\n\n### Download Pre-built Binary\n\nDownload the latest binary for your platform from [Releases](https://github.com/YuitoSato/gh-asset/releases/latest):\n\n```bash\n# macOS (Intel)\ncurl -L https://github.com/YuitoSato/gh-asset/releases/latest/download/gh-asset-x86_64-apple-darwin.tar.gz | tar -xz\nsudo mv gh-asset /usr/local/bin/\n\n# macOS (Apple Silicon)\ncurl -L https://github.com/YuitoSato/gh-asset/releases/latest/download/gh-asset-aarch64-apple-darwin.tar.gz | tar -xz\nsudo mv gh-asset /usr/local/bin/\n\n# Linux\ncurl -L https://github.com/YuitoSato/gh-asset/releases/latest/download/gh-asset-x86_64-unknown-linux-gnu.tar.gz | tar -xz\nsudo mv gh-asset /usr/local/bin/\n\n# Windows (PowerShell)\nInvoke-WebRequest -Uri \"https://github.com/YuitoSato/gh-asset/releases/latest/download/gh-asset-x86_64-pc-windows-msvc.zip\" -OutFile \"gh-asset.zip\"\nExpand-Archive -Path \"gh-asset.zip\" -DestinationPath \".\"\n```\n\n### Building from Source\n\n```bash\ngit clone https://github.com/YuitoSato/gh-asset.git\ncd gh-asset\ncargo build --release\n```\n\nThe binary will be available at `target/release/gh-asset`.\n\n## Usage\n\n```bash\ngh-asset download \u003casset_id\u003e \u003cdestination\u003e\n```\n\n### Smart File Naming\n\ngh-asset automatically detects file extensions and handles destinations intelligently:\n\n- **Directory destination**: Downloads with auto-detected extension\n  ```bash\n  gh-asset download 1234abcd-5678-90ef-ghij-klmnop567890 ~/Downloads\n  # → ~/Downloads/1234abcd-5678-90ef-ghij-klmnop567890.png\n  ```\n\n- **File destination**: Downloads with specified filename\n  ```bash\n  gh-asset download 1234abcd-5678-90ef-ghij-klmnop567890 ~/Downloads/my-image.png\n  # → ~/Downloads/my-image.png\n  ```\n\nThe tool automatically detects file types (PNG, JPG, GIF, PDF, etc.) by following GitHub's redirects to the actual storage URLs.\n\n### How to get Asset ID\n\nWhen you upload files to GitHub issues or pull requests, GitHub creates URLs like:\n```\nhttps://github.com/user-attachments/assets/1234abcd-1234-1234-1234-1234abcd1234\n```\n\nThe asset ID is the last part: `1234abcd-1234-1234-1234-1234abcd1234`\n\n### Examples\n\n```bash\n# Download to directory - extension auto-detected\ngh-asset download 1234abcd-1234-1234-1234-1234abcd1234 ./downloads/\n\n# Download with custom filename\ngh-asset download 1234abcd-1234-1234-1234-1234abcd1234 ./my-screenshot.png\n\n# Download to current directory\ngh-asset download abcd1234-5678-9012-3456-789012345678 .\n```\n\n## Authentication\n\nThis tool requires GitHub CLI to be installed and authenticated. If you haven't authenticated yet:\n\n```bash\ngh auth login\n```\n\n## Error Handling\n\nThe tool will provide clear error messages for common issues:\n- GitHub CLI not installed or not authenticated\n- Invalid asset ID format\n- Network errors during download\n- File permission issues\n\n## Testing\n\nRun the test suite:\n\n```bash\ncargo test\n```\n\n## License\n\nApache-2.0 License - see LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuitosato%2Fgh-asset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuitosato%2Fgh-asset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuitosato%2Fgh-asset/lists"}