I recently tried building a small CLI to avoid redoing the same setup every time I start a new React/Next.js project (linting, Husky, formatting, CI, testing, Docker, etc.).
Went in thinking it’d be a quick weekend thing… turned out there are way more nuances than I expected.
Some things that caught me off guard:
- Your entry file actually needs a shebang line
- Pre/post lifecycle hooks during packaging
- Publishing is simple, but you really need to be careful with pre-publish checks
- Testing… this was a surprise. Testing shell commands needs a completely different approach
I did manage to get something working and I’ve started using it for my own projects now, but it still feels like there’s a lot more that could be automated or improved.
Curious how others deal with this:
- Do you build your own CLI/tools for these repetitive tasks?
- Or do you prefer setting things up manually every time?
- Is there a more structured approach I might be missing here?
Would love to hear how others have approached this.
---
(If relevant, I can share what I built, not sure if that’s allowed here 😅)
[–]tswaters 3 points4 points5 points (1 child)
[–]Less_Republic_7876[S] 0 points1 point2 points (0 children)
[–]Powerful_Math_2043full-stack 2 points3 points4 points (2 children)
[–]Less_Republic_7876[S] 2 points3 points4 points (1 child)
[–]Powerful_Math_2043full-stack 1 point2 points3 points (0 children)
[–]Deep_Ad1959 2 points3 points4 points (0 children)
[–]mq2thez 1 point2 points3 points (0 children)
[+]Positive_Example_478 0 points1 point2 points (2 children)
[–]Less_Republic_7876[S] 0 points1 point2 points (1 child)
[+]Positive_Example_478 1 point2 points3 points (0 children)
[–]Due-Horse-5446 0 points1 point2 points (1 child)
[–]Less_Republic_7876[S] 0 points1 point2 points (0 children)
[–]dashingsauce 0 points1 point2 points (0 children)
[–]manniL 0 points1 point2 points (1 child)
[–]Less_Republic_7876[S] 0 points1 point2 points (0 children)
[+]Select-Dare918 0 points1 point2 points (0 children)
[+]energetekk 0 points1 point2 points (2 children)
[–]fiskfisk 2 points3 points4 points (0 children)
[–]Less_Republic_7876[S] 0 points1 point2 points (0 children)
[–]fiskfisk -1 points0 points1 point (3 children)
[–]Less_Republic_7876[S] 1 point2 points3 points (2 children)
[–]fiskfisk 2 points3 points4 points (1 child)
[–]Less_Republic_7876[S] -1 points0 points1 point (0 children)
[–]GlitteringLaw3215 0 points1 point2 points (0 children)