https://github.com/zueai/github-subfolder-to-md
simple commands to download any github repo subfolder with a combined-repo.md markdown file
https://github.com/zueai/github-subfolder-to-md
Last synced: 9 months ago
JSON representation
simple commands to download any github repo subfolder with a combined-repo.md markdown file
- Host: GitHub
- URL: https://github.com/zueai/github-subfolder-to-md
- Owner: zueai
- License: mit
- Created: 2024-12-30T15:15:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-30T15:28:20.000Z (over 1 year ago)
- Last Synced: 2025-06-13T19:06:30.253Z (about 1 year ago)
- Language: Shell
- Size: 6.84 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-subfolder-to-md
Simple Bash script to save markdown files from any GitHub repository subfolder and combine them into a single markdown file. Useful for quickly creating markdown documentation context for open-source packages and libraries.
## Installation
```bash
# Install dependencies (macOS)
brew install tree
# Download the script to your home folder
curl -o ~/github-subfolder-to-md.sh https://raw.githubusercontent.com/zueai/github-subfolder-to-md/main/github-subfolder-to-md.sh
# Make it executable
chmod +x ~/github-subfolder-to-md.sh
# Optional: Add to your PATH
echo 'export PATH="$HOME:$PATH"' >> ~/.zshrc # or ~/.bashrc
source ~/.zshrc # or source ~/.bashrc
```
## Usage
```bash
~/github-subfolder-to-md.sh https://github.com/username/repo/tree/branch/subfolder-path
```
Example:
```bash
~/github-subfolder-to-md.sh https://github.com/remix-run/react-router/tree/main/docs
```
This creates a combined markdown file named `username-repo-foldername-combined.md` in your current directory.
## Dependencies
- curl
- jq
- unzip
- tree
## License
MIT