Separated the version control logic from my backend folder

Parth BhovadParth Bhovad
2 min read

🚀 Big update on my GitHub clone project!
I finally separated the version control logic from my backend folder and built it into a standalone CLI tool — and even published it on NPM!
Now anyone can install it globally and manage code files locally while syncing them with the remote server storage.

What does this CLI do?
Handles all the basic Git-like commands for my GitHub clone:
init
add
commit
push
pull
Full command docs here: [https://lnkd.in/gY4aUAz3

Why](https://lnkd.in/gY4aUAz3Why) this matters:
Before:
The entire version control logic was buried inside my backend folder.
To use it, you had to clone my whole repo and run the server.

Now:
Just install the package and start using the commands like a boss 💪
Way cleaner, scalable, and usable.

😅 The mistake that bit me
I used path.join() in both my CLI tool and backend to handle file paths.
Worked fine in development on Windows.
But in production (deployed on Linux via render.com), everything broke.
Turns out:
Windows uses \
Linux uses /
And path.join() depends on the OS.

Lesson learned:
Always account for cross-platform file path differences when building tools like this.

What I learned:
How to build and publish a CLI tool 🚀
Managing NPM packages
The difference between dev vs production environments
OS-specific quirks (like path separators!)
Repo & Links:
GitHub Clone Repo: https://lnkd.in/g5P7Myyk
Gix
CLI Repo: https://lnkd.in/gmyHrdVa
NPM
Package: https://lnkd.in/gY4aUAz3
Live
Project: [https://lnkd.in/gcypCAfQ

👉](https://lnkd.in/gcypCAfQ👉) Would love your feedback, suggestions, or horror stories from your own cross-platform projects 😂
Drop ‘em below 👇
Dev log continues… 🔥

0
Subscribe to my newsletter

Read articles from Parth Bhovad directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Parth Bhovad
Parth Bhovad