{"_id":"@bytehumi/filerepo","name":"@bytehumi/filerepo","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bytehumi/filerepo","author":{"name":"byteHumi"},"version":"1.0.0","description":"A beautiful TUI to browse, search, and download files from GitHub repositories","license":"MIT","bin":{"filerepo":"bin/filerepo.js"},"scripts":{"build":"tsc -p tsconfig.json","postinstall":"node scripts/install.js","prepack":"npm run build"},"keywords":["github","downloader","tui","cli","files"],"devDependencies":{"@types/node":"^25.5.0","typescript":"^5.9.3"},"gitHead":"99af776afd0480f725cc83030ab21bb8cd040596","_id":"@bytehumi/filerepo@1.0.0","_nodeVersion":"25.5.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-tct6+lNYCwRh7+Jmwanr0kCUOLTm657HmsCYrxbckhRHj2Zjz29aNly3Aacxn3/A70pi/MahCeGP9FceuSveYA==","shasum":"c7b47d996e0d8bc0c15fbfe1633c6dd950985649","tarball":"https://registry.npmjs.org/@bytehumi/filerepo/-/filerepo-1.0.0.tgz","fileCount":4,"unpackedSize":15381,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAqKcJPh8YpYc0Xz5bLukYfgri2oFy4fLD1skrHw2TteAiEAkY+k2+bEP0gUc7jWKwgsAk8eXkMlkg8+fxAmdN2msfA="}]},"_npmUser":{"name":"bytehumi","email":"niladrivit@gmail.com"},"directories":{},"maintainers":[{"name":"bytehumi","email":"niladrivit@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/filerepo_1.0.0_1773919173693_0.065910380479419"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-19T11:19:33.620Z","1.0.0":"2026-03-19T11:19:33.844Z","modified":"2026-03-19T11:19:34.010Z"},"maintainers":[{"name":"bytehumi","email":"niladrivit@gmail.com"}],"description":"A beautiful TUI to browse, search, and download files from GitHub repositories","keywords":["github","downloader","tui","cli","files"],"author":{"name":"byteHumi"},"license":"MIT","readme":"# filerepo\n\n![npm](https://img.shields.io/npm/v/@bytehumi/filerepo?color=blue) ![license](https://img.shields.io/badge/license-MIT-blue) ![Go](https://img.shields.io/badge/go-1.22+-00ADD8)\n\n> Grab any file or folder from GitHub. No clones. Just what you need.\n\n![filerepo](https://pub-51091dcf1e9d4b04bb2e74f489c4f346.r2.dev/76e517e50d0ae0ab208ce38d64e4d96ba4ca5676fd62b2034456747fef585f6d.png)\n\nA terminal UI that lets you browse any GitHub repository and download exactly the files you want — without cloning the entire thing.\n\n## What's New\n\nThe current Go version adds quite a bit beyond the original \"browse and download files\" flow:\n\n- Open branches, tags, commits, compare URLs, and pull requests directly\n- Switch branches and tags inside the TUI\n- Browse and download GitHub release assets\n- View repo metadata, README content, releases, and auth/rate-limit status in-app\n- Use named token profiles, import tokens from `gh auth token`, and switch profiles per run\n- Keep recent repos and pinned favorites\n- Reopen repositories faster with cached repo trees\n- Search with fuzzy matching plus filters like `ext:go` and `type:dir`\n- Copy GitHub URLs, raw file URLs, and planned local output paths from the TUI\n- Choose download conflict handling: `skip`, `overwrite`, `rename`, or `resume`\n- Save selections as regular files, `.zip`, or `.tar.gz`\n- Write a download manifest beside completed downloads\n- Use a better preview with file-type badges, line numbers, and wrap toggle\n\n## Install\n\n```bash\n# npm\nnpm install -g @bytehumi/filerepo\n\n# go\ngo install github.com/NiladriHazra/filerepo/cmd/filerepo@latest\n\n# or build from source\ngit clone https://github.com/NiladriHazra/filerepo.git\ncd filerepo\ngo build -o bin/filerepo ./cmd/filerepo\n```\n\n## Usage\n\n```bash\n# launch the TUI\nfilerepo\n\n# open a specific repo\nfilerepo https://github.com/torvalds/linux\n\n# open a specific branch, tag, or commit\nfilerepo https://github.com/torvalds/linux --ref master\nfilerepo https://github.com/torvalds/linux/commit/abc123def456\n\n# open a specific folder\nfilerepo https://github.com/rust-lang/rust/tree/master/src/tools\n\n# browse changed files in a compare or pull request\nfilerepo https://github.com/owner/repo/compare/main...feature\nfilerepo https://github.com/owner/repo/pull/42\n\n# download to current directory without a subfolder\nfilerepo https://github.com/user/repo --cwd --no-folder\n\n# use a GitHub token for private repos\nfilerepo --token ghp_xxxxxxxxxxxx https://github.com/user/private-repo\n\n# use a saved token profile\nfilerepo --profile work https://github.com/user/private-repo\n```\n\n## How it works\n\n1. You paste a GitHub URL\n2. filerepo fetches the entire file tree with **one API call**\n3. You browse, search, and select files in the TUI\n4. Selected files are downloaded in parallel (up to 8 at a time)\n\nNo git needed. No cloning. It talks directly to the GitHub API.\n\n## Keyboard shortcuts\n\n| Key | Action |\n|-----|--------|\n| `Enter` / `l` / `Right` | Enter directory |\n| `Backspace` / `h` / `Left` | Go back |\n| `j` / `k` / `Up` / `Down` | Navigate |\n| `Space` | Toggle selection |\n| `a` | Select all |\n| `u` | Unselect all |\n| `d` | Download selected (with conflict/archive options) |\n| `/` | Search with fuzzy matching and filters such as `ext:go` or `type:dir` |\n| `b` / `t` | Switch branch or tag |\n| `R` | Browse release assets |\n| `m` | Open repo summary / README / releases overlay |\n| `f` | Toggle favorite repository |\n| `y` / `Y` / `P` | Copy GitHub URL / raw URL / planned output path |\n| `i` | Toggle ASCII/icon mode |\n| `g` / `G` | Jump to top/bottom |\n| `Esc` | Exit search / go home |\n| `q` / `Ctrl+C` | Quit |\n\n### Preview shortcuts\n\n| Key | Action |\n|-----|--------|\n| `j` / `k` | Scroll preview |\n| `w` | Toggle line wrapping |\n| `n` | Toggle line numbers |\n| `Esc` / `q` | Close preview |\n\n### Save prompt shortcuts\n\n| Key | Action |\n|-----|--------|\n| `s` | Conflict mode: skip |\n| `o` | Conflict mode: overwrite |\n| `r` | Conflict mode: rename |\n| `e` | Conflict mode: resume |\n| `f` | Output mode: regular files |\n| `z` | Output mode: zip archive |\n| `t` | Output mode: tar.gz archive |\n\n### Overlay shortcuts\n\n| Key | Action |\n|-----|--------|\n| `Tab` | Move between repo summary tabs |\n| `R` | Open release asset picker |\n| `y` | Copy selected release asset URL |\n\n## Configuration\n\n```bash\n# save a GitHub token (for private repos + higher rate limits)\nfilerepo config set token YOUR_GITHUB_TOKEN\n\n# manage named token profiles\nfilerepo config profile set-token work YOUR_GITHUB_TOKEN\nfilerepo config profile use work\nfilerepo config profile import-gh work\nfilerepo config profile list\nfilerepo config profile unset-token work\n\n# set a custom download directory\nfilerepo config set path /your/preferred/path\n\n# manage favorites and recents\nfilerepo config favorite add https://github.com/owner/repo\nfilerepo config favorite remove https://github.com/owner/repo\nfilerepo config favorite list\nfilerepo config recent list\nfilerepo config recent clear\n\n# view current config\nfilerepo config list\n\n# remove settings\nfilerepo config unset token\nfilerepo config unset path\n```\n\n## CLI flags\n\n| Flag | Description |\n|------|-------------|\n| `--cwd` | Download to current working directory |\n| `--no-folder` | Don't create a repo-named subfolder |\n| `--token <TOKEN>` | One-time GitHub token (not saved) |\n| `--profile <NAME>` | Use a saved token profile |\n| `--ref <REF>` | Open a branch, tag, or commit SHA |\n| `--help`, `-h` | Show help |\n| `--version`, `-v` | Print version |\n\n## Caching\n\n- Repo tree caching is enabled by default\n- Cache entries are keyed by `owner/repo/ref`\n- The default cache TTL is `30m`\n- Cache files live under your filerepo config directory\n\n## Download behavior\n\n- Regular file downloads still run in parallel\n- If a file already exists, you can choose `skip`, `overwrite`, `rename`, or `resume`\n- You can save a selection as regular files, a `.zip`, or a `.tar.gz`\n- filerepo writes a JSON manifest beside successful downloads so you can track:\n  repository URL, ref, output mode, conflict mode, output path, and selected paths\n\n## Features\n\n- Browse any public GitHub repo without cloning\n- Open repository roots, subfolders, branches, tags, commits, compare URLs, and pull requests\n- Search across the entire file tree with fuzzy matching and `ext:` / `type:` filters\n- Select individual files or entire folders\n- Parallel downloads (8 concurrent)\n- Progress bar with file-by-file status\n- LFS file support\n- Branch/tag switcher inside the TUI\n- Preview with line numbers, wrap toggle, and file-type badges\n- Repo summary overlay with README, releases, and auth/rate-limit status\n- Release asset browser and downloader\n- Compare view and pull-request file browsing\n- Token profiles plus `gh auth token` import\n- Recent repos and favorites\n- Cached repo trees for faster reopen\n- Download conflict strategies: skip, overwrite, rename, resume\n- Archive output modes: regular files, `.zip`, `.tar.gz`\n- Download manifest written alongside each completed download\n- Copy actions for GitHub URLs, raw file URLs, and planned output paths\n- Auto-detects local git remote as default URL\n- Go-based CLI and TUI implementation\n- Dirs-first sorted file listing\n- Fallback to folder-by-folder mode for massive repos\n\n## License\n\nMIT\n\n---\n\nBuilt by [byteHumi](https://github.com/NiladriHazra)\n","readmeFilename":"README.md","_rev":"1-3346a651ae9549b494d55fd20b2f5cb4"}