repoharbor
v1.0.0
Published
RepoHarbor is a polished TUI to browse, search, and download files from GitHub repositories
Maintainers
Readme
RepoHarbor
RepoHarbor is a terminal app for opening GitHub repositories, browsing their files, and downloading only what you need.
It is built for people who want a fast way to inspect a repo without cloning the whole project first.
What it does
- Opens public GitHub repositories
- Supports branches, tags, commits, compare links, and pull requests
- Browses folders and files in a TUI
- Searches the repository tree with fuzzy matching and simple filters
- Downloads selected files with parallel transfer
- Saves output as regular files, zip, or tar.gz
- Supports GitHub release assets
- Keeps recent repositories and favorites
- Works with GitHub tokens and named profiles
Install
Use npm:
npx repoharbornpm install -g repoharborUse Go:
go install github.com/codewithevilxd/repoharbor/cmd/repoharbor@latestBuild from source:
git clone https://github.com/codewithevilxd/repoharbor.git
cd repoharbor
go build -o bin/repoharbor ./cmd/repoharborQuick Start
repoharbor https://github.com/charmbracelet/bubbleteaYou can also open a branch, tag, commit, folder, compare view, or pull request URL directly.
Examples:
repoharbor https://github.com/torvalds/linux --ref master
repoharbor https://github.com/rust-lang/rust/tree/master/src/tools
repoharbor https://github.com/owner/repo/compare/main...feature
repoharbor https://github.com/owner/repo/pull/42Commands
Root command:
repoharbor [URL] [--cwd] [--no-folder] [--token TOKEN] [--profile NAME] [--ref REF]Config command:
repoharbor config list
repoharbor config set token TOKEN
repoharbor config set path /your/preferred/path
repoharbor config unset token
repoharbor config unset path
repoharbor config profile list
repoharbor config profile use work
repoharbor config profile set-token work TOKEN
repoharbor config profile import-gh work
repoharbor config favorite add https://github.com/owner/repo
repoharbor config recent clearKeyboard Use
The TUI is controlled from the keyboard.
Common keys:
Enter,l,Right: open a folderBackspace,h,Left: go backj,k,Up,Down: move through itemsSpace: select or unselect an itema: select allu: clear selectiond: start download/: searchb,t: switch branch or tagR: browse release assetsm: open repo summaryy,Y,P: copy GitHub URL, raw URL, or output pathi: toggle icon modeq,Ctrl+C: quit
Download Behavior
- Files download in parallel
- Existing files can be skipped, overwritten, renamed, or resumed
- Output can be saved as normal files, a zip archive, or a tar.gz archive
- A manifest file is written beside completed downloads
Configuration
RepoHarbor stores its config in the user config directory.
Available settings include:
- GitHub token
- Download path
- Active profile
- Named token profiles
- Recent repositories
- Favorite repositories
- Cache settings
Caching
- Repository trees are cached by default
- Cache entries are keyed by
owner/repo/ref - The default cache TTL is
30m
Output Files
RepoHarbor may create these outputs during normal use:
- downloaded files and folders
- zip or tar.gz archives
- download manifest JSON
- cache files
- configuration files
Build
go test ./...
npm run buildRepository Layout
cmd/repoharbor: CLI entrypointinternal/config: config and profile storageinternal/download: file and archive download logicinternal/github: GitHub API and URL handlinginternal/ui: terminal interfacescripts: npm postinstall helperbin: Node launcher scripts
Notes
- RepoHarbor is designed for GitHub repositories only.
- Private repositories need a valid token.
--profileselects a saved token profile for a run.--cwddownloads into the current working directory.--no-folderavoids creating a repo-named subfolder.
License
MIT
Contact
Portfolio: https://Nishantdev.space
Email: [email protected]
