Skip to content

Conversation

@ieedan
Copy link
Contributor

@ieedan ieedan commented Aug 21, 2025

This PR adds CLI support using jsrepo. jsrepo is a framework agnostic code distribution system like shadcn. It automatically builds your code into a registry that can be distributed from most git providers as well as your own site or even from jsrepo.com.

With the addition of jsrepo users are able to add svgs via the CLI with the following commands:

# try it on this PR by replacing https://svgl.app with http://localhost:5173

jsrepo add --repo https://svgl.app/r # add from list
jsrepo add https://svgl.app/r/library/adobe # add one
jsrepo add https://svgl.app/r/library/adobe https://svgl.app/r/library/airbnb # add multiple
# initialize
jsrepo init https://svgl.app/r
jsrepo add # add from list
jsrepo add library/adobe # add one
jsrepo add library/adobe library/airbnd # add multiple

We can adjust the way it builds to change the library to something else it

Current the way this works is the build:registry script will run before you build your app to ensure that the icon registry is included in static/r. This means it will always be up to date with the latest icons just like the site.

Another project using this approach in production is https://www.reactbits.dev/.

Thanks for taking a look!

Extended Description

This PR probably still needs a bit of work (like a copy button for the command on the site) or maybe building things so they show up by their proper name but it's worth showing this now just to see if it's something even worth putting the time into.

With enough time you could also make it so you could distribute different framework specific versions of each icon maybe that could look like jsrepo add svelte/adobe react/adobe vue/adobe or something. If you don't want users to have to deal with the URL jsrepo.com is also an option but for this you would need to use changesets or something to version the registry like npm. That would make the command look something like jsrepo add @svgl/svelte/icons/adobe.

@pheralb
Copy link
Owner

pheralb commented Aug 23, 2025

Hello @ieedan! 🙂

I really like the idea. I’ll take a closer look and probably add it to svgl.

PS: I really like the jsrepo project!

Thanks a lot 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants