{"id":47216877,"url":"https://github.com/abhixdd/ghgrab","last_synced_at":"2026-04-03T11:01:51.109Z","repository":{"id":328826944,"uuid":"1116144677","full_name":"abhixdd/ghgrab","owner":"abhixdd","description":"A simple, pretty terminal tool that lets you search and download files from GitHub without leaving your CLI.","archived":false,"fork":false,"pushed_at":"2026-03-20T10:43:06.000Z","size":688,"stargazers_count":350,"open_issues_count":2,"forks_count":26,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-21T02:14:51.813Z","etag":null,"topics":["cli","filedownloader","github","node","python","ratatui","rust","tui"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/ghgrab","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhixdd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"abhixd","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2025-12-14T09:39:55.000Z","updated_at":"2026-03-21T01:33:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/abhixdd/ghgrab","commit_stats":null,"previous_names":["abhixdd/ghgrab"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/abhixdd/ghgrab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhixdd%2Fghgrab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhixdd%2Fghgrab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhixdd%2Fghgrab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhixdd%2Fghgrab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhixdd","download_url":"https://codeload.github.com/abhixdd/ghgrab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhixdd%2Fghgrab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31347183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T08:03:20.796Z","status":"ssl_error","status_checked_at":"2026-04-03T08:00:37.834Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cli","filedownloader","github","node","python","ratatui","rust","tui"],"created_at":"2026-03-13T16:02:02.435Z","updated_at":"2026-04-03T11:01:51.103Z","avatar_url":"https://github.com/abhixdd.png","language":"Rust","readme":"# ghgrab - \"grab anything you want\"\n\n\u003e A simple, pretty terminal tool that lets you search and download files from GitHub without leaving your CLI.\n\n![Rust](https://img.shields.io/badge/rust-1.70%20%7C%201.75%20%7C%20stable-blue) ![crates.io](https://img.shields.io/crates/v/ghgrab.svg?color=blue) ![npm version](https://img.shields.io/npm/v/@ghgrab/ghgrab.svg?color=blue) ![PyPI version](https://img.shields.io/pypi/v/ghgrab.svg?color=blue) ![license](https://img.shields.io/badge/license-MIT-blue)\n\n![ghgrab demo](assets/ghgrab.gif)\n\n**ghgrab** provides a streamlined command-line interface for cherry-picking specific files or folders from any GitHub repository, powered by the Rust `tokio` and `ratatui` ecosystem. Focused on speed and ease of use, it offers a beautiful TUI that lets you grab exactly what you need; all without the wait times of a full `git clone`.\n\n## Why use ghgrab?\n\n- **No more clone-and-delete**: Grab exactly what you need, when you need it.\n- **Easy on the eyes**: A clean terminal interface that makes browsing feel smooth.\n- **Works where you are**: Installs quickly via NPM, Cargo, or PIP.\n- **Find things fast**: Quickly search and navigate through any repo's folders with fuzzy search.\n- **Repo discovery built in**: Type a repo keyword from home to search GitHub repos, filter them, then open instantly.\n- **File Preview**: Preview source code and text files directly in the TUI.\n- **Handles the big stuff**: Built-in support for GitHub LFS (Large File Storage).\n- **Batch mode**: Select a bunch of files and folders to download them all at once.\n- **Release downloads**: Grab GitHub release artifacts with OS/architecture-aware selection.\n\n---\n\n## Installation\n\n### NPM\n\n```bash\nnpm install -g @ghgrab/ghgrab\n```\n\n### Cargo\n\n```bash\ncargo install ghgrab\n```\n\n### pipx (Recommended for Python)\n\n```bash\npipx install ghgrab\n```\n\n### Nix\n\nTo have the latest commit:\n\n```bash\nnix run github:abhixdd/ghgrab\n```\n\nTo have a specific tagged version:\n\n```bash\nnix run \"github:abhixdd/ghgrab/\u003ctag\u003e\"\n```\n\n### Aur (Arch linux)\n\n```bash\nyay -S ghgrab-bin   \n```\n\n\n---\n\n### Quick Start\n\nJust type `ghgrab` to start browsing:\n\n```bash\nghgrab\n```\n\nOr, if you already have a link, just paste it in:\n\n```bash\n# Browse a repository\nghgrab https://github.com/rust-lang/rust\n\n# Download to current directory directly\nghgrab https://github.com/rust-lang/rust --cwd --no-folder\n```\n\nYou can also type a repository keyword on the home screen (for example `ratatui`) and press `Enter` to open repository search mode.\n\n### CLI Flags\n\n| Flag              | Description                                                          |\n| ----------------- | -------------------------------------------------------------------- |\n| `--cwd`           | Forces download to the current working directory.                    |\n| `--no-folder`     | Downloads files directly without creating a subfolder for the repo.  |\n| `--token \u003cTOKEN\u003e` | Use a specific GitHub token for this run (doesn't save to settings). |\n\n### Release Downloads\n\nYou can also download GitHub release assets directly with the user-facing `release` command or its short alias `rel`.\n\nBasic examples:\n\n```bash\n# Download the best matching artifact for your OS and architecture\nghgrab rel sharkdp/bat\n\n# Extract an archive after download\nghgrab rel sharkdp/bat --extract\n\n# Download a specific release tag\nghgrab rel sharkdp/bat --tag v0.25.0\n\n# Match a specific asset by regex\nghgrab rel sharkdp/bat --asset-regex \"x86_64.*windows.*zip\"\n\n# Download into a custom directory\nghgrab rel sharkdp/bat --extract --out ./tmp/bat\n\n# Install the selected file or extracted binary into a target directory\nghgrab rel sharkdp/bat --extract --bin-path ~/.local/bin\n```\n\nBasic release flags:\n\n| Flag | Description |\n| ---- | ----------- |\n| `--tag \u003cTAG\u003e` | Download a specific release tag. |\n| `--asset-regex \u003cREGEX\u003e` | Match a specific release asset by regex. |\n| `--extract` | Extract archive assets after download. |\n| `--out \u003cDIR\u003e` | Download into a custom output directory. |\n| `--bin-path \u003cDIR\u003e` | Copy the selected file or extracted binary into the provided directory. |\n| `--os \u003cOS\u003e` | Override detected operating system. |\n| `--arch \u003cARCH\u003e` | Override detected architecture. |\n\n\u003cdetails\u003e\n\u003csummary\u003eShow release download usage, flags, and examples\u003c/summary\u003e\n\nHow selection works:\n\n- If there is one clear best asset match for your OS and architecture, ghgrab downloads it directly.\n- If multiple close matches exist, ghgrab shows an interactive picker in the terminal.\n- Type the asset number and press `Enter` to continue.\n- Type `q` and press `Enter` to cancel the picker.\n\n```bash\n# Pick a release tag explicitly\nghgrab rel sharkdp/bat --tag v0.25.0\n\n# Match assets with a regex\nghgrab rel sharkdp/bat --asset-regex \"x86_64.*linux.*tar.gz\"\n\n# Extract an archive after download\nghgrab rel sharkdp/bat --extract\n\n# Install the selected file or extracted binary into a target directory\nghgrab rel sharkdp/bat --extract --bin-path ~/.local/bin\n\n# Download to a custom directory\nghgrab rel sharkdp/bat --extract --out ./tmp/bat\n\n# Force Windows x64 asset selection\nghgrab rel BurntSushi/ripgrep --os windows --arch amd64\n\n# Allow prereleases when selecting the latest release\nghgrab rel starship/starship --prerelease\n```\n\n### Release Flags\n\n| Flag | Description |\n| ---- | ----------- |\n| `--tag \u003cTAG\u003e` | Download a specific release tag instead of the latest matching release. |\n| `--prerelease` | Allow prereleases when `--tag` is not provided. |\n| `--asset-regex \u003cREGEX\u003e` | Match a specific release asset by regex. Useful for forcing one artifact and skipping the picker. |\n| `--os \u003cOS\u003e` | Override detected operating system for asset selection. |\n| `--arch \u003cARCH\u003e` | Override detected architecture for asset selection. |\n| `--file-type \u003cTYPE\u003e` | Prefer `any`, `archive`, or `binary` assets. |\n| `--extract` | Extract archive assets after download. Supports `.zip`, `.tar.gz`, `.tgz`, and `.tar.xz`. |\n| `--out \u003cDIR\u003e` | Download into a custom output directory. |\n| `--bin-path \u003cDIR\u003e` | Copy the selected file or extracted binary into the provided directory. |\n| `--cwd` | Download into the current working directory. |\n| `--token \u003cTOKEN\u003e` | Use a one-time GitHub token for this run without saving it. |\n\n### Release Examples\n\n```bash\n# Download a specific ripgrep release for Windows x64\nghgrab rel BurntSushi/ripgrep --tag 15.1.0 --os windows --arch amd64\n\n# Use a regex to choose one exact asset\nghgrab rel sharkdp/bat --asset-regex \"x86_64.*windows.*zip\"\n\n# Install an extracted binary into your local bin directory\nghgrab rel sharkdp/bat --extract --bin-path ~/.local/bin\n\n# Use the long command form\nghgrab release sharkdp/bat\n```\n\n\u003c/details\u003e\n\n### Environment Variables\n\n`ghgrab` also accepts GitHub tokens from environment variables:\n\n- `GHGRAB_GITHUB_TOKEN`\n- `GITHUB_TOKEN`\n\n\n\n### Agent Mode\n\nFor scripts, agents, and other non-interactive workflows, `ghgrab` includes a machine-friendly `agent` command that prints a stable JSON envelope with `api_version`, `ok`, `command`, and either `data` or `error`.\n\n```bash\n# Fetch the repository tree as JSON\nghgrab agent tree https://github.com/rust-lang/rust\n\n# Fetch the repository tree with an explicit token for scripts or agents\nghgrab agent tree https://github.com/rust-lang/rust --token YOUR_TOKEN\n\n# Download specific paths from a repository\nghgrab agent download https://github.com/rust-lang/rust src/tools README.md --out ./tmp\n\n# Download an explicit subtree\nghgrab agent download https://github.com/rust-lang/rust --subtree src/tools --out ./tmp\n\n# Download the entire repository\nghgrab agent download https://github.com/rust-lang/rust --repo --out ./tmp\n\n# Download into the current working directory without creating a repo folder\nghgrab agent download https://github.com/rust-lang/rust src/tools --cwd --no-folder\n```\n\nYou can pass `--token \u003cTOKEN\u003e` to `agent tree` and `agent download` when an external tool, CI job, or coding agent should authenticate without relying on saved local config.\n\n### Configuration\n\nTo manage your settings:\n\n```bash\n# Set your token\nghgrab config set token YOUR_TOKEN\n\n# Set a custom download folder\nghgrab config set path \"/your/custom/path\"\n\n# View your current settings (token is masked)\nghgrab config list\n\n# Remove settings\nghgrab config unset token\nghgrab config unset path\n```\n\n### Theming\n\nghgrab supports custom color themes via a TOML config file.\n\n- Linux/macOS: `~/.config/ghgrab/theme.toml`\n- Windows: `%APPDATA%\\ghgrab\\theme.toml`\n\nAny missing key falls back to the default Tokyo Night theme. Colors must use `#RRGGBB` hex format.\n\nSee [`examples/theme.toml`](examples/theme.toml) for a complete example.\n\n### Keyboard Shortcuts (How to move around)\n\nWe've kept it pretty standard, but here's a quick cheat sheet:\n\n| Key                               | Action                                                                   |\n| --------------------------------- | ------------------------------------------------------------------------ |\n| `Enter` (home)                    | Open URL or start repository search                                      |\n| `Enter` / `l` / `Right` (browser) | Enter directory                                                          |\n| `Backspace` / `h` / `Left`        | Go back to previous folder                                               |\n| `Delete` (home)                   | Delete character at cursor                                               |\n| `Tab`                             | Auto-fill `https://github.com/` (Home page)                              |\n| `/`                               | Start Searching (File list)                                              |\n| `Esc`                             | **Exit Search** or **Return Home** (file list) or **Quit** (home screen) |\n| `q` / `Q`                         | **Quit** (from file list)                                                |\n| `Ctrl+q`                          | **Force Quit** (anywhere)                                                |\n| `Space`                           | Toggle selection for the current item                                    |\n| `p` / `P`                         | **Preview** current file                                                 |\n| `a`                               | Select All items                                                         |\n| `u`                               | Unselect all items                                                       |\n| `d` / `D`                         | Download selected items                                                  |\n| `i`                               | Toggle Icons (Emoji / ASCII)                                             |\n| `g` / `Home`                      | Jump to Top                                                              |\n| `G` / `End`                       | Jump to Bottom                                                           |\n\n### Repository Search Mode Shortcuts\n\n| Key                   | Action                                                             |\n| --------------------- | ------------------------------------------------------------------ |\n| `j` / `k` / `↑` / `↓` | Move selection                                                     |\n| `Enter`               | Open selected repository                                           |\n| `f`                   | Toggle include/exclude forks                                       |\n| `m`                   | Cycle minimum stars (`Any`, `10+`, `50+`, `100+`, `500+`, `1000+`) |\n| `l`                   | Cycle language filter                                              |\n| `s`                   | Cycle sort (`Stars`, `Updated`, `Name`)                            |\n| `x`                   | Reset all filters                                                  |\n| `r`                   | Refresh current search                                             |\n| `Esc`                 | Return to home input                                               |\n\n---\n\n## Join the community\n\nIf you find a bug, have an idea for a cool new feature, or just want to help out, we'd love to hear from you! Check out our [Contributing Guide](CONTRIBUTING.md) to see how you can get involved.\n\n## License\n\nDistributed under the MIT License. It's open, free, and yours to play with. See [LICENSE](LICENSE) for the fine print.\n","funding_links":["https://ko-fi.com/abhixd"],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhixdd%2Fghgrab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhixdd%2Fghgrab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhixdd%2Fghgrab/lists"}