2 ms·
The CLI is just a small Go binary – you can install it once via `go install` and then run `templui add icon`. It helps keep things consistent as the library ev
by axadrn 1y ago
The CLI is just a small Go binary – you can install it once via `go install` and then run `templui add icon`.
It helps keep things consistent as the library evolves.
But yeah, I get that some folks prefer manual imports – all good!
- pst 1y agoEverything under internal did discourage me from trying templUI too. What's the reason for it?
- axadrn 1y agoYeah, totally fair question. Originally, I had templUI components available via Go module imports, but there were a few real issues: - Tailwind v4+ with CSS-only config needs hardcoded paths to `.templ` files. That clashed in teams where Go paths differed (e.g. `~/dev`, `~/code`, etc.). - It made Git diffs messy – you had `.templ` and `.go` files being imported per component. - Updating components via module versions often led to unwanted breaking changes – not easy to "just use one component" from a newer version. - Workarounds like Makefile tricks for Tailwind `src` path felt too hacky. The CLI avoids all that. It copies clean files into your codebase, so it's portable, version-safe, and no import path magic needed. That said – I’m open to feedback. If there's a solid reason to bring back module imports (optionally), I’m listening!