JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 31
  • Score
    100M100P100Q66767F
  • License MIT

A lightweight CLI tool that downloads specific folders from GitHub repositories without cloning the entire repo. Save bandwidth and time by fetching only the components you need from any repository.

Package Exports

  • git-ripper
  • git-ripper/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (git-ripper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

📁 Git-ripper

NPM version License Downloads

Git-ripper is a lightweight CLI tool that lets you download specific folders from GitHub repositories without cloning the entire repo. Whether you need a single component from a large monorepo or a quick configuration file, Git-ripper saves time and bandwidth by fetching only what you need.

InstallationUsageFeaturesExamplesContributing

🚀 Features

  • 📥 Download specific folders instead of entire repositories
  • 🌳 Preserve complete folder structure
  • 📂 Specify custom output directory
  • 🔄 Works with any branch
  • 💻 Simple command-line interface
  • ⚡ Fast and lightweight
  • 🔒 No authentication required for public repositories

📦 Installation

# Install globally
npm install -g git-ripper

# Or run with npx
npx git-ripper

🎯 Usage

Basic Usage

git-ripper https://github.com/sairajB/git-ripper/tree/main/src

With Output Directory

git-ripper https://github.com/sairajB/git-ripper/tree/main/src -o ripped-folder

Command Line Options

Option Description Default
-o, --output <directory> Specify output directory Current directory
-V, --version Show version number -
-h, --help Show help -

📝 Examples

Download a React Component Library

git-ripper https://github.com/facebook/react/tree/main/packages/react-dom

Download Configuration Files

git-ripper https://github.com/microsoft/vscode/tree/main/build -o ./build-config

Download Documentation

git-ripper https://github.com/nodejs/node/tree/main/doc -o ./node-docs

🔍 How It Works

  1. Parses the provided GitHub URL to extract:

    • Repository owner
    • Repository name
    • Branch name (defaults to 'main')
    • Target folder path
  2. Uses GitHub's API to fetch the folder structure

  3. Downloads each file while maintaining the directory structure

  4. Saves files to the specified output directory

🤝 Contributing

Contributions are always welcome! Here's how you can help:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🐛 Troubleshooting

Rate Limiting

If you encounter rate limiting issues with the GitHub API, you can:

  • Wait and try again later
  • Use a GitHub token (coming soon)

Common Issues

  1. "Invalid URL" Error

    • Make sure the URL follows the format: https://github.com/owner/repo/tree/branch/folder
    • Check if the repository and folder exist
  2. "Path not found" Error

    • Verify the folder path is correct
    • Check if the branch name is correct

🙏 Acknowledgments

  • Thanks to GitHub for providing the API
  • Inspired by the need to download specific folders without cloning entire repositories

📬 Contact

  • Create an issue in this repository
  • Follow me on GitHub

Made with ❤️ by sairajB