Skip to main content

Download specific files and folders from GitHub repositories without cloning

Project description

ghgrab - "grab anything you want"

A simple, pretty terminal tool that lets you search and download files from GitHub without leaving your CLI.

Rust crates.io npm version PyPI version license

ghgrab demo

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.

Why use ghgrab?

  • No more clone-and-delete: Grab exactly what you need, when you need it.
  • Easy on the eyes: A clean terminal interface that makes browsing feel smooth.
  • Works where you are: Installs quickly via NPM, Cargo, or PIP.
  • Find things fast: Quickly search and navigate through any repo's folders with fuzzy search.
  • Handles the big stuff: Built-in support for GitHub LFS (Large File Storage).
  • Batch mode: Select a bunch of files and folders to download them all at once.

Installation

NPM

npm install -g @ghgrab/ghgrab

Cargo

cargo install ghgrab

pipx (Recommended for Python)

pipx install ghgrab

Quick Start

Just type ghgrab to start browsing:

ghgrab

Or, if you already have a link, just paste it in:

# Browse a repository
ghgrab https://github.com/rust-lang/rust

# Download to current directory directly
ghgrab https://github.com/rust-lang/rust --cwd --no-folder

CLI Flags

Flag Description
--cwd Forces download to the current working directory.
--no-folder Downloads files directly without creating a subfolder for the repo.
--token <TOKEN> Use a specific GitHub token for this run (doesn't save to settings).

Configuration

To manage your settings:

# Set your token
ghgrab config set token YOUR_TOKEN

# Set a custom download folder
ghgrab config set path "/your/custom/path"

# View your current settings (token is masked)
ghgrab config list

# Remove settings
ghgrab config unset token
ghgrab config unset path

Keyboard Shortcuts (How to move around)

We've kept it pretty standard, but here's a quick cheat sheet:

Key Action
Enter / l / Right Enter directory or Submit URL
Backspace / h / Left Go back to previous folder
Delete Clear URL input (Home page)
Tab Auto-fill https://github.com/ (Home page)
/ Start Searching (File list)
Esc Exit Search or Return Home (file list) or Quit (home screen)
q / Q Quit (from file list)
Ctrl+q Force Quit (anywhere)
Space Toggle selection for the current item
a Select All items
u Unselect all items
d / D Download selected items
i Toggle Icons (Emoji / ASCII)
g / Home Jump to Top
G / End Jump to Bottom

Join the community

If 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 to see how you can get involved.

License

Distributed under the MIT License. It's open, free, and yours to play with. See LICENSE for the fine print.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ghgrab-1.0.2.tar.gz (6.2 kB view details)

Uploaded Source

File details

Details for the file ghgrab-1.0.2.tar.gz.

File metadata

  • Download URL: ghgrab-1.0.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ghgrab-1.0.2.tar.gz
Algorithm Hash digest
SHA256 1da01156c93b009201c5b155b670e6c1faa049bbd05af022c2ae284c81530d11
MD5 87be78acf18bceaf81c6d2246b4a1b04
BLAKE2b-256 3d7ff8596bc958296f6fd84e6884f8e690c387a9382ffd806faeee0b9bfad331

See more details on using hashes here.

Provenance

The following attestation bundles were made for ghgrab-1.0.2.tar.gz:

Publisher: build.yml on abhixdd/ghgrab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page