unjs / giget

✨ Download templates and git repositories with pleasure!
MIT License
425 stars 37 forks source link

URL download option #168

Open davestewart opened 1 month ago

davestewart commented 1 month ago

Describe the feature

Hey Pooya,

Congrats on another exceptionally useful repository.

I regularly have need to download examples – not templates – from repos, for example:

These kind of examples folder setups are pretty common; I wonder if a direct URL download option could be added to the package, such as:

# download single folder
npx giget@latest https://github.com/wxt-dev/wxt-examples/tree/main/examples/vue

# download several folders
https://github.com/wxt-dev/wxt-examples/tree/main/examples/vue*

That way it's a super-easy copy/paste job.

Could perhaps the folders be filtered after the download of the main repo?

I took a look at the source files, and perhaps it might even be manageable for me to produce a PR!

LMK, and thanks again for all the great code 🙏

Additional information