ghgrab browses repositories on GitHub, GitLab, Codeberg, Gitea and Forgejo
from a terminal interface, and downloads single files, folders or GitHub
release assets without cloning. Its agent commands print JSON for scripts,
and it can run as an MCP server for coding assistants.
Examples
ghgrab
ghgrab https://github.com/rust-lang/rust --cwd
ghgrab rel sharkdp/bat --extract --out ./bat
ghgrab agent tree https://github.com/rust-lang/rust
File access
ghgrab saves downloads in your home directory. To also save to USB drives
and other removable media (/media, /mnt), run:
sudo snap connect ghgrab:removable-media