DEV Community

Chintha Vamsha vardhan
Chintha Vamsha vardhan

Posted on

I Was Tired of Cloning Entire GitHub Repos for One File — So I Built a GetGrabKit CLI Tool

GetGrabKit terminal UI showing GitHub repository browsing and file selection inside an interactive CLI interface

Ever cloned a 200MB repository… just to use one utility function?

I have.

And every time it went like this:

  1. git clone
  2. Wait.
  3. Open the repo.
  4. Dig through 15 folders.
  5. Copy one file.
  6. Fix broken imports.
  7. Delete the repo.
  8. Question my life choices.

It felt inefficient. Wasteful. Slow.

So I built something to fix it.


🚀 Introducing GetGrabKit

GetGrabKit is a Node.js CLI tool that lets you browse any public GitHub repository and download only the files you need.

No full clone.

No unnecessary files.

No broken imports.

Just the code you came for.


✨ What Makes It Different?

Instead of this:

git clone https://github.com/user/project
Enter fullscreen mode Exit fullscreen mode

You do this:

npm install -g getgrabkit
getgrabkit
Enter fullscreen mode Exit fullscreen mode

And then:

✅ Browse the repo in a clean Terminal UI

✅ Preview files before downloading

✅ Select specific files

✅ Use Smart Grab™ to automatically pull required dependencies


🧠 The Problem with Cloning Repositories

Cloning entire repos when you only need one file:

  • Wastes bandwidth
  • Pollutes your local workspace
  • Breaks imports when copied manually
  • Slows down your workflow

For developers who reuse:

  • Utility functions
  • React components
  • Config files
  • Scripts

There had to be a better way.


🛠 How GetGrabKit Works

1️⃣ Interactive Terminal UI

Built using blessed, the CLI provides a navigable tree view of any public GitHub repository.

You can:

  • Move through folders
  • Select files
  • Preview code
  • Confirm download

All without leaving your terminal.


2️⃣ GitHub API Optimization

Instead of cloning, GetGrabKit:

  • Fetches repository trees via the GitHub API
  • Minimizes API calls
  • Avoids rate limit issues
  • Retrieves only required file blobs

Efficient > brute force.


3️⃣ Smart Grab™ (Dependency Parsing Logic)

This was the hardest part.

When you select a file, GetGrabKit:

  1. Parses import statements
  2. Identifies local dependencies
  3. Recursively fetches required files
  4. Avoids duplicates
  5. Rebuilds the correct folder structure

So when the file lands in your project…

It just works.


📦 Installation

Available on npm:

npm install -g getgrabkit
Enter fullscreen mode Exit fullscreen mode

📦 NPM: https://www.npmjs.com/package/getgrabkit

💻 GitHub: https://github.com/Vamshavardhan50/getgrabkit

🌐 Website: https://getgrabkit.vercel.app/


🎯 Real-World Use Case

Let’s say you find a great debounce utility in a repo.

Instead of cloning the entire project:

  • Launch GetGrabKit
  • Navigate to /utils/debounce.js
  • Preview it
  • Select it
  • Smart Grab handles its dependencies

Done.

No leftover repo.

No manual cleanup.


💡 What Building This Taught Me

Building this tool pushed me to learn:

  • Designing intuitive CLI experiences
  • Handling complex GitHub API workflows
  • Writing dependency graph logic
  • Managing npm packaging & publishing
  • Building in public

It also reminded me:

Developer experience matters — even in small workflows.


🚀 What’s Next?

Planned improvements:

  • ✅ Private repo support (GitHub token)
  • ✅ Better dependency visualization
  • ✅ Framework presets (React / Next.js)
  • ✅ Plugin system
  • ✅ Performance improvements for large repos

🙌 I’d Love Your Feedback

If you’ve ever felt the pain of cloning entire repos for one file, I’d love for you to try this.

If it saves you time — even 5 minutes — that’s a win.

Support the upcoming Product Hunt launch here:

👉 https://www.producthunt.com/products/getgrabkit/getgrabkit/prelaunch

What feature would make this tool 10x more useful for you?

Let me know in the comments 👇

nodejs #opensource #cli #github #javascript #webdev #developer #programming #devtools #terminal #productivity #buildinpublic #npm #softwaredevelopment

Top comments (0)