git-ripper 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +109 -64
  2. package/package.json +1 -1
  3. package/src/index.js +1 -1
package/README.md CHANGED
@@ -1,57 +1,70 @@
1
- # 📁 Git-ripper
1
+ # Git-ripper
2
2
 
3
3
  <div align="center">
4
4
 
5
- [![NPM version](https://img.shields.io/npm/v/git-ripper.svg)](https://www.npmjs.com/package/git-ripperper)
6
- [![License](https://img.shields.io/npm/l/git-ripper.svg)](https://github.com/yourusername/git-ripper/blob/main/LICENSE)
5
+ [![NPM version](https://img.shields.io/npm/v/git-ripper.svg)](https://www.npmjs.com/package/git-ripper)
6
+ [![License](https://img.shields.io/npm/l/git-ripper.svg)](https://github.com/sairajB/git-ripper/blob/main/LICENSE)
7
7
  [![Downloads](https://img.shields.io/npm/dm/git-ripper.svg)](https://www.npmjs.com/package/git-ripper)
8
+ [![GitHub issues](https://img.shields.io/github/issues/sairajB/git-ripper.svg)](https://github.com/sairajB/git-ripper/issues)
9
+ [![GitHub stars](https://img.shields.io/github/stars/sairajB/git-ripper.svg)](https://github.com/sairajB/git-ripper/stargazers)
8
10
 
9
- CLI tool that lets you download specific folders from GitHub repositories without cloning the entire repo.
11
+ **Download specific folders from GitHub repositories without cloning the entire codebase**
10
12
 
11
13
  [Installation](#installation) •
12
14
  [Usage](#usage) •
13
15
  [Features](#features) •
14
16
  [Examples](#examples) •
15
- [Contributing](#contributing)
17
+ [Configuration](#configuration)
18
+ [Troubleshooting](#troubleshooting) •
19
+ [Contributing](#contributing) •
20
+ [License](#license)
16
21
 
17
22
  </div>
18
23
 
19
- ## 💪 Why Choose Git-ripper?
24
+ ## Why Git-ripper?
20
25
 
21
- There are multiple ways to download a specific folder from a GitHub repository, such as git sparse-checkout, svn checkout, or manually downloading a ZIP file. However, these methods either require additional setup (git sparse-checkout and svn checkout), download unnecessary files (ZIP method), or have a steep learning curve. git-ripper simplifies the process into a single command, requires no Git installation, and only downloads the folder you need, making it faster, more efficient, and beginner-friendly.
26
+ 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.
22
27
 
23
- ## 🚀 Features
28
+ ## Features
24
29
 
25
- - 📥 Download specific folders instead of entire repositories
26
- - 🌳 Preserve complete folder structure
27
- - 📂 Specify custom output directory
28
- - 🔄 Works with any branch
29
- - 💻 Simple command-line interface
30
- - Fast and lightweight
31
- - 🔒 No authentication required for public repositories
30
+ - **Selective Downloads**: Fetch specific folders instead of entire repositories
31
+ - **Directory Structure**: Preserves complete folder structure
32
+ - **Custom Output**: Specify your preferred output directory
33
+ - **Branch Support**: Works with any branch, not just the default one
34
+ - **Simple Interface**: Clean, intuitive command-line experience
35
+ - **Lightweight**: Minimal dependencies and fast execution
36
+ - **No Authentication**: Works with public repositories without requiring credentials
32
37
 
33
- ## 📦 Installation
38
+ ## Installation
39
+
40
+ ### Global Installation (Recommended)
34
41
 
35
42
  ```bash
36
- # Install globally
37
43
  npm install -g git-ripper
44
+ ```
45
+
46
+ This installs Git-ripper as a global command-line tool accessible from anywhere in your terminal.
38
47
 
39
- # Or run with npx
40
- npx git-ripper
48
+ ### On-demand Usage
49
+
50
+ ```bash
51
+ npx git-ripper <github-folder-url>
41
52
  ```
42
53
 
43
- ## 🎯 Usage
54
+ Run Git-ripper directly without installation using `npx`.
44
55
 
45
- ### Basic Usage
56
+ ## Usage
57
+
58
+ ### Basic Command
46
59
 
47
60
  ```bash
48
- git-ripper https://github.com/sairajB/git-ripper/tree/main/src
61
+ git-ripper https://github.com/username/repository/tree/branch/folder
49
62
  ```
50
63
 
51
- ### With Output Directory
64
+ ### With Custom Output Directory
52
65
 
53
66
  ```bash
54
- git-ripper https://github.com/sairajB/git-ripper/tree/main/src -o ripped-folder
67
+ git-ripper https://github.com/username/repository/tree/branch/folder -o ./my-output-folder
55
68
  ```
56
69
 
57
70
  ### Command Line Options
@@ -62,38 +75,80 @@ git-ripper https://github.com/sairajB/git-ripper/tree/main/src -o ripped-folder
62
75
  | `-V, --version` | Show version number | - |
63
76
  | `-h, --help` | Show help | - |
64
77
 
65
- ## 📝 Examples
78
+ ## Examples
79
+
80
+ ### Extract a Component Library
66
81
 
67
- ### Download a React Component Library
68
82
  ```bash
83
+ # Download React DOM package
69
84
  git-ripper https://github.com/facebook/react/tree/main/packages/react-dom
70
85
  ```
71
86
 
72
- ### Download Configuration Files
87
+ ### Get Configuration Files
88
+
73
89
  ```bash
74
- git-ripper https://github.com/microsoft/vscode/tree/main/build -o ./build-config
90
+ # Extract VS Code build configuration
91
+ git-ripper https://github.com/microsoft/vscode/tree/main/build -o ./vscode-build-config
75
92
  ```
76
93
 
77
94
  ### Download Documentation
95
+
78
96
  ```bash
97
+ # Get Node.js documentation
79
98
  git-ripper https://github.com/nodejs/node/tree/main/doc -o ./node-docs
80
99
  ```
81
100
 
82
- ## 🔍 How It Works
101
+ ### Copy UI Templates
102
+
103
+ ```bash
104
+ # Extract Tailwind components
105
+ git-ripper https://github.com/tailwindlabs/tailwindcss/tree/master/src/components -o ./tailwind-components
106
+ ```
107
+
108
+ ## How It Works
109
+
110
+ Git-ripper operates in four stages:
111
+
112
+ 1. **URL Parsing**: Extracts repository owner, name, branch, and target folder path
113
+ 2. **API Request**: Uses GitHub's API to fetch the folder structure
114
+ 3. **Content Download**: Retrieves each file individually while maintaining directory structure
115
+ 4. **Local Storage**: Saves files to your specified output directory
116
+
117
+ ## Configuration
118
+
119
+ Git-ripper works out of the box without configuration. For rate-limited GitHub API usage, authentication support is under development.
120
+
121
+ ## Troubleshooting
122
+
123
+ ### Common Issues
124
+
125
+ #### Rate Limit Exceeded
126
+
127
+ ```
128
+ Error: Request failed with status code 403
129
+ ```
130
+
131
+ **Solution**: GitHub limits unauthenticated API requests. Wait a few minutes and try again.
132
+
133
+ #### Invalid URL Format
134
+
135
+ ```
136
+ Error: Invalid GitHub URL format
137
+ ```
138
+
139
+ **Solution**: Ensure your URL follows the pattern: `https://github.com/owner/repo/tree/branch/folder`
83
140
 
84
- 1. Parses the provided GitHub URL to extract:
85
- - Repository owner
86
- - Repository name
87
- - Branch name (defaults to 'main')
88
- - Target folder path
141
+ #### Folder Not Found
89
142
 
90
- 2. Uses GitHub's API to fetch the folder structure
91
- 3. Downloads each file while maintaining the directory structure
92
- 4. Saves files to the specified output directory
143
+ ```
144
+ Error: Path not found in repository
145
+ ```
146
+
147
+ **Solution**: Verify the folder path exists in the specified branch and repository.
93
148
 
94
- ## 🤝 Contributing
149
+ ## Contributing
95
150
 
96
- Contributions are always welcome! Here's how you can help:
151
+ Contributions make the open-source community an amazing place to learn, inspire, and create. Any contributions to Git-ripper are **greatly appreciated**.
97
152
 
98
153
  1. Fork the repository
99
154
  2. Create your feature branch (`git checkout -b feature/amazing-feature`)
@@ -101,39 +156,29 @@ Contributions are always welcome! Here's how you can help:
101
156
  4. Push to the branch (`git push origin feature/amazing-feature`)
102
157
  5. Open a Pull Request
103
158
 
104
- ## 📄 License
105
-
106
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
107
-
108
- ## 🐛 Troubleshooting
109
-
110
- ### Rate Limiting
111
- If you encounter rate limiting issues with the GitHub API, you can:
112
- - Wait and try again later
113
- - Use a GitHub token (coming soon)
159
+ See the [open issues](https://github.com/sairajB/git-ripper/issues) for a list of proposed features and known issues.
114
160
 
115
- ### Common Issues
161
+ ## Roadmap
116
162
 
117
- 1. **"Invalid URL" Error**
118
- - Make sure the URL follows the format: `https://github.com/owner/repo/tree/branch/folder`
119
- - Check if the repository and folder exist
163
+ - [ ] Add GitHub token authentication
164
+ - [ ] Support for GitLab and Bitbucket repositories
165
+ - [ ] Download from specific commits or tags
166
+ - [ ] Dry run mode
167
+ - [ ] File filtering options
168
+ - [ ] CLI interactive mode
120
169
 
121
- 2. **"Path not found" Error**
122
- - Verify the folder path is correct
123
- - Check if the branch name is correct
170
+ ## License
124
171
 
125
- ## 🙏 Acknowledgments
126
-
127
- - Thanks to GitHub for providing the API
128
- - Inspired by the need to download specific folders without cloning entire repositories
172
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
129
173
 
130
- ## 📬 Contact
174
+ ## Acknowledgments
131
175
 
132
- - Create an issue in this repository
133
- - Follow me on [GitHub](https://github.com/sairajB)
176
+ - GitHub API for making this tool possible
177
+ - Everyone who has provided feedback and suggestions
134
178
 
135
179
  ---
136
180
 
137
181
  <div align="center">
138
- Made with ❤️ by sairajB
182
+ <p>Made with ❤️ by <a href="https://github.com/sairajB">sairajB</a></p>
183
+ <p>If you find this tool useful, consider <a href="https://github.com/sponsors/sairajB">sponsoring</a> its development</p>
139
184
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-ripper",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "CLI tool that lets you download specific folders from GitHub repositories without cloning the entire repo.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -4,7 +4,7 @@ const { downloadFolder } = require('./downloader');
4
4
 
5
5
  const initializeCLI = () => {
6
6
  program
7
- .version('1.1.1')
7
+ .version('1.1.2')
8
8
  .description('Clone specific folders from GitHub repositories')
9
9
  .argument('<url>', 'GitHub URL of the folder to clone')
10
10
  .option('-o, --output <directory>', 'Output directory', process.cwd())