DEV Community

FurryMonster
FurryMonster

Posted on

Vibe Coding an AI-Powered Command Corrector in Rust over the Weekend

We’ve all been there: you type a complex command, hit enter, and get a face-full of command not found or a cryptic shell error. Usually, you’d reach for the legendary thefuck to fix it. But this weekend, I decided to take a different path.

Driven by the "Vibe Coding" trend—leveraging AI to bridge the gap between idea and execution—I built idoit: a high-performance, AI-powered CLI command corrector written entirely in Rust.

Why idoit?

While inspired by the classic thefuck project, I wanted something that felt native to a modern, memory-safe workflow. Using Rust wasn't just about speed; it was about building a CLI tool that is lightweight and easily distributable.

The core premise is simple: you mess up, you type idoit, and the AI figures out what you actually meant to do.

What’s Under the Hood?

  • Rust-Powered: Built for performance and safety.
  • AI-Driven Corrections: Instead of relying solely on hardcoded regex or rules, idoit uses LLMs to interpret your intent based on the failed command and shell output.
  • Command Explanation: It doesn't just fix your mistakes; it explains why the new command works, helping you learn your shell better.
  • Cross-Platform (Experimental): While I developed and polished this on Linux (Debian/Ubuntu), the codebase is packaged for macOS and Windows.

The Vibe Coding Experience

The development process was a whirlwind. Most of the logic was "vibed" into existence—iterating rapidly with AI to handle the boilerplate while I focused on the architecture and the custom .msp script interpretation logic that powers the dialogue system.

It’s not perfect yet. The latency and stability need some tuning, but the core functionality—correction and explanation—is solid and ready for a test drive.

Getting Started

If you have a Rust environment set up, you can try it right now. It's already published on crates.io:

cargo install idoit
Enter fullscreen mode Exit fullscreen mode

We're Open for PRs!

I’ve released the source on GitHub: Furry-Monster/idoit.

Current Status:

  • Linux: Fully tested and working.
  • Mac/Windows: Binaries are ready, but I need "boots on the ground" to verify how they handle different terminal environments.

If you’re a Rustacean or a CLI enthusiast, I’d love for you to give it a spin. Whether it’s fixing a bug, optimizing the AI prompts, or suggesting a new feature (like the --learn or --fix context awareness I'm planning), all contributions and feedback are welcome!

Let’s make the shell a little less punishing, one "vibe" at a time.

Top comments (0)