DEV Community

Cover image for Why I Build CLI Tools with Zero External Dependencies
Jeremy Nobel
Jeremy Nobel

Posted on

Why I Build CLI Tools with Zero External Dependencies

For a long time I wasn't really programming. My university degree covered a lot of things — but actual building wasn't one of them. Professors mentioned AI, algorithms, low-level concepts. They'd describe what something did, roughly how it worked underneath. But nobody told you the truth: building it isn't just calling a couple of functions and moving on.
There was always something deeper below.

At some point I decided to stop waiting and start digging.
I want to be clear about something: this isn't about dismissing other languages or tools. If I'm working on a company project or something with deadlines and other people depending on it, I'll adapt. I'll use whatever makes sense. But when the project is mine — when nobody is waiting, when the only requirement is that I understand every single line — I build from scratch.

Everything. My own tokenizer. My own CLI parser. My own command executor. Not because libraries don't exist. They do, and some of them are excellent. But because there's a difference between using a tool and understanding what the tool is made of.

I do make one exception: the C++ STL. And honestly, if I followed my own logic all the way down I'd end up punching cards or writing assembly. There's a floor somewhere. The STL is mine.

The real reason I build this way has nothing to do with efficiency or philosophy. It's simpler than that.

Kron — my CLI tool for file inspection and manipulation — made me suffer. It kept me awake. I'd lie down and instead of sleeping I'd be running solutions in my head, thinking about architecture, about what I'd broken, about what I could do better. It gave me something that years of coursework never did: the feeling that I was actually building something.

It brought me back to programming.
Kron is just the beginning.

Do you build from scratch or prefer existing tools? What made you choose your approach?

Top comments (1)

Collapse
 
pgradot profile image
Pierre Gradot

when nobody is waiting

When nobody is waiting, you do what you want. If using zero deps is what you want, do it :)

Let's be honest: this happens only for personal projects. If you're a professional dev, there is always a client or a boss waiting for you. And using dependencies generally allows you to deliver faster. It also generally reduces bugs and improves performances, because a battle-tested library that actually fits your needs are almost-always better that what you can write in a reasonable amount of time.

when the only requirement is that I understand every single line

Using dependencies doesn't mean you don't understand every single line.

It's exactly the same as using the standard library : do you really know what std::abort() does? Do you truly know how std::deque::insert_range() works? Maybe yes, but it doesn't really matter, as long as you understand the effects these functions will have on your application.

It's been years since I've stopped coding at home. I used to do very low level things, and used very little tool. If I were to start a new hobby project, I would be more interesting in getting a working solution that understanding every single little detail, so I would gladly use tools, library, frameworks, etc.