Grepedia
GH

GhGrab

A terminal-first utility for browsing repositories and downloading specific files, folders, or release assets from GitHub, GitLab, Codeberg, Gitea, and Forgejo.

Score0
Comments0
About

GhGrab is a terminal-first tool designed to help developers and power users browse and download specific assets from Git repositories without needing to clone the entire project. Created by abhixdd, this versatile utility supports a wide range of platforms including GitHub, GitLab, Codeberg, Gitea, and Forgejo. By shifting away from the standard 'git clone' workflow, it allows users to pinpoint and fetch only the necessary files, folders, or release artifacts, making it an efficient choice for inspecting examples, grabbing specific subdirectories, or retrieving binary releases quickly. The tool features an interactive terminal-based UI (TUI) for intuitive exploration, as well as robust CLI commands tailored for automation and script-based workflows. Whether used for local development or within continuous integration pipelines, it provides a flexible approach to managing repository content. The software is distributed via multiple channels including Cargo, npm, pipx, Nix, and the Arch User Repository (AUR), ensuring broad availability across different development environments. It also includes comprehensive configuration support, allowing users to manage authentication tokens, output paths, and custom UI themes through a TOML-based configuration system.

Some of the key features are:

  • Interactive TUI: A full-screen terminal interface for browsing, searching, and selecting files within repositories.
  • Multi-Forge Support: Seamless repository browsing and file downloads for GitHub, GitLab, Codeberg, Gitea, and Forgejo.
  • Direct Download: Capability to download individual files, specific folders, or full repositories without full version control clones.
  • Release Management: Download GitHub release assets with automated OS and architecture-aware matching and optional archive extraction.
  • Agent Mode: A specialized command mode that outputs stable JSON envelopes, making it ideal for integration into CI/CD scripts and automated tools.
  • Configuration Management: Flexible settings for storing download paths and managing API tokens to bypass rate limits or access private repositories.
  • Customizable UI: Full support for custom theming via TOML files, allowing users to adjust colors to match their terminal environment.
  • Smart Token Handling: Supports both manual token management and runtime integration with the GitHub CLI (gh) for secure, on-demand authentication.

GhGrab operates through a combination of an interactive mode and dedicated command groups. Users can launch the TUI by simply running the main command, which provides a home screen for repository search and navigation. Alternatively, the CLI commands such as 'release' or 'agent' offer fine-grained control for non-interactive tasks. For release downloads, the tool intelligently selects the best asset for the user's platform or allows for manual overrides through flags. In agent mode, it exposes commands to fetch directory trees or download specific subtrees to custom output locations, providing the necessary predictability for automated environments.

Some common use cases include:

  • Quick Asset Retrieval: Downloading a single binary release artifact from a GitHub repository without cloning the entire project history.
  • Selective Project Integration: Fetching a specific directory from a remote repository into an existing local project workspace.
  • Automated CI Workflows: Using agent mode to download specific build dependencies or configuration files from private repositories during a CI/CD process.
  • Repository Exploration: Quickly inspecting the structure and contents of a remote codebase using the terminal UI before deciding to download specific files.

Comments

0
0/5000

Markdown is supported.