DEV Community

NexsusForgeDev
NexsusForgeDev

Posted on

I'm 12 and I built my first CLI tool in Rust to solve "works on my machine"

Hi everyone! 👋

I'm 12 years old, and I've been learning programming for a while now. I'm currently exploring Rust, Linux (I use Gentoo and I'm planning to build LFS from scratch), and system programming.

A few weeks ago, I hit a wall that every developer knows too well: "works on my machine".

Every time I tried a new project — Node.js, Python, Go — I spent more time configuring the environment than actually writing code. Different versions, global package conflicts, heavy Docker containers for simple scripts... It was frustrating.

So I decided to build a tool to solve this problem for myself. I call it zeroenv.

What does it do?

zeroenv is a lightweight CLI tool written in Rust that automatically scans your project directory for standard manifest files, detects required language versions, and generates a simple configuration file.

Instead of writing heavy Dockerfiles or learning complex Nix expressions, you just run:


bash
zeroenv init

And it does the rest.
How it works
When you run zeroenv init, the tool:

    Scans your current directory for project markers (package.json, requirements.txt, go.mod, Cargo.toml)
    Extracts required versions (e.g., engines.node from package.json)
    Generates a .zeroenv configuration file that locks the environment state

Then you can run zeroenv status to see what's currently configured for your project.
Why Rust?
I chose Rust for several reasons:

    Single binary: No dependencies, no runtime. Just download and run.
    Speed: The scanner parses JSON and text files in milliseconds.
    Learning opportunity: I wanted to understand how CLI tools like ripgrep and bat are built.
    Safety: Rust's ownership system helped me avoid a lot of bugs I would have made in C++.

What I learned
Building zeroenv taught me a lot:

    Project structure: How to organize a Rust CLI application with modules.
    File I/O and parsing: Reading files, parsing JSON with serde, handling errors gracefully.
    Git workflow: Branching, committing, pushing to GitHub, creating releases.
    Documentation: Writing a README that actually explains what the tool does (this was harder than the code itself!).

Current status
Right now, zeroenv supports:

    ✅ Node.js (via package.json engines parsing)
    ✅ Python (via requirements.txt)
    ✅ Go (via go.mod)
    ✅ Rust (via Cargo.toml)

What's next?
I'm planning to add:

    Automatic version checking (compare .zeroenv with system-installed versions)
    Auto-downloading of missing language binaries
    Support for more languages (PHP, Ruby, Java)
    Shell integration (auto-activate environment on cd)

Try it out!
If you want to check it out, the code is open source:
🔗 GitHub: https://github.com/nexus-forg/zeroenv
I'd love to get feedback from more experienced developers. What features would make this actually useful for your daily workflow? What did I do wrong? How can I improve the Rust code?
Any advice for a young developer is highly appreciated! 🙏
Thanks for reading! If you found this interesting, feel free to star the repo or leave a comment. I'm here to learn and improve.

Enter fullscreen mode Exit fullscreen mode

Top comments (0)