🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

git-ripper

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-ripper

CLI tool that lets you download specific folders from GitHub repositories without cloning the entire repo.

1.4.1
Source
npm
Version published
Weekly downloads
57
23.91%
Maintainers
1
Weekly downloads
 
Created
Source

Git-ripper

NPM version License Downloads GitHub issues GitHub stars

Download specific folders from GitHub repositories without cloning the entire codebase

InstallationUsageFeaturesExamplesConfigurationTroubleshootingContributingLicense

Why Git-ripper?

Have you ever needed just a single component from a massive repository? Or wanted to reference a specific configuration directory without downloading gigabytes of code? Git-ripper solves this problem by letting you extract and download only the folders you need, saving bandwidth, time, and disk space.

Features

  • Selective Downloads: Fetch specific folders instead of entire repositories
  • Directory Structure: Preserves complete folder structure
  • Custom Output: Specify your preferred output directory
  • Branch Support: Works with any branch, not just the default one
  • Archive Export: Create ZIP or TAR archives of downloaded content
  • Simple Interface: Clean, intuitive command-line experience
  • Lightweight: Minimal dependencies and fast execution
  • No Authentication: Works with public repositories without requiring credentials

Installation

npm install -g git-ripper

This installs Git-ripper as a global command-line tool accessible from anywhere in your terminal.

On-demand Usage

npx git-ripper <github-folder-url>

Run Git-ripper directly without installation using npx.

Usage

Basic Command

git-ripper https://github.com/username/repository/tree/branch/folder

With Custom Output Directory

git-ripper https://github.com/username/repository/tree/branch/folder -o ./my-output-folder

Creating ZIP Archive

git-ripper https://github.com/username/repository/tree/branch/folder --zip

Creating TAR Archive with Custom Name

git-ripper https://github.com/username/repository/tree/branch/folder --tar="my-archive.tar"

Command Line Options

OptionDescriptionDefault
-o, --output <directory>Specify output directoryCurrent directory
--zip [filename]Create ZIP archive of downloaded content-
--tar [filename]Create TAR archive of downloaded content-
--compression-level <level>Set compression level (1-9)6
-V, --versionShow version number-
-h, --helpShow help-

Examples

Extract a Component Library

# Download React DOM package
git-ripper https://github.com/facebook/react/tree/main/packages/react-dom

Get Configuration Files

# Extract VS Code build configuration
git-ripper https://github.com/microsoft/vscode/tree/main/build -o ./vscode-build-config

Download Documentation

# Get Node.js documentation
git-ripper https://github.com/nodejs/node/tree/main/doc -o ./node-docs

Copy UI Templates

# Extract Tailwind components
git-ripper https://github.com/tailwindlabs/tailwindcss/tree/master/src/components -o ./tailwind-components

Download and Create Archive

# Download React DOM package and create a ZIP archive
git-ripper https://github.com/facebook/react/tree/main/packages/react-dom --zip

# Extract VS Code build configuration with maximum compression
git-ripper https://github.com/microsoft/vscode/tree/main/build --tar --compression-level=9

How It Works

Git-ripper operates in four stages:

  • URL Parsing: Extracts repository owner, name, branch, and target folder path
  • API Request: Uses GitHub's API to fetch the folder structure
  • Content Download: Retrieves each file individually while maintaining directory structure
  • Local Storage or Archiving: Saves files to your specified output directory or creates an archive

Configuration

Git-ripper works out of the box without configuration. For rate-limited GitHub API usage, authentication support is under development.

Troubleshooting

Common Issues

Rate Limit Exceeded

Error: Request failed with status code 403

Solution: GitHub limits unauthenticated API requests. Wait a few minutes and try again.

Invalid URL Format

Error: Invalid GitHub URL format

Solution: Ensure your URL follows the pattern: https://github.com/owner/repo/tree/branch/folder

Folder Not Found

Error: Path not found in repository

Solution: Verify the folder path exists in the specified branch and repository.

Contributing

Contributions make the open-source community an amazing place to learn, inspire, and create. Any contributions to Git-ripper are greatly appreciated.

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

See the open issues for a list of proposed features and known issues.

Roadmap

  • Add archive export options (ZIP/TAR)
  • Add GitHub token authentication
  • Support for GitLab and Bitbucket repositories
  • Download from specific commits or tags
  • Dry run mode
  • File filtering options
  • CLI interactive mode

License

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

Acknowledgments

  • GitHub API for making this tool possible
  • Everyone who has provided feedback and suggestions

Made with ❤️ by sairajB

If you find this tool useful, consider sponsoring its development

Keywords

git

FAQs

Package last updated on 10 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts