
gh-dir-cloner is a lightweight CLI tool built with Node.js that allows users to clone a specific directory from a public GitHub repository, no need to have Git installed locally.
It leverages the GitHub API to fetch a directory from any branch of a public repository. The tool is intuitive and efficient, making it perfect for developers who want to avoid cloning an entire repository just to access a single folder.
Usage:
ghdirclone
Example:
ghdirclone vercel/next.js examples/with-typescript -b canary -o ./output
This command clones the examples/with-typescript directory from the canary branch of the vercel/next.js repository and places it in the ./output folder.

