My journey of learning #Rust: Part 2 -- now with AI! (#cli #rustlang #dev #devlog #programming #ai)

Overview
After my last post, I felt like I have learned a lot about Rust, but not enough. So I decided to continue creating CLI tools, to solve different problems. Since we now live in a society where the weight of a soul is measured in how much AI we are able to shove in it, I decided to also create tools that use AI.
The Journey – Part 2
When I wrote the last post, I've completed 10 tools. Since then I kept going, and whenever I had a problem that I thought would be cool to solve by using a command line tool, I would create it. Some of the tools are way too niche to be useful for anyone else, but some (in my opinion) are pretty cool!
By the time I'm writing this second part, I have 26 tools, and I'm still going strong!
In the Conclusion, I talk about if you want to learn Rust or not.
And here comes AI!
You might be asking yourself: Why do we need AI for CLI tools?
The answer is straightforward: AI is a tool like any other, and we should take advantage of it, if it improves our lives, and makes sense to use in a certain context.
In this project, we have two tools using AI. The first one is a Chat bot where you can select a personality and talk to it. Right now, I created a bunch of sample personalities from Baldur's Gate 3, Fallout 4, Skyrim, and one for an Astrophysicist. Those personalities are far from being state of the art, I know. However, when I created this tool, the idea was to wire up reusable AI components.
For the Chatbot, I was creating the wrappers to call AI, manage context, and handle errors, etc. So the tool itself is pretty barebones.
The second tool is a bit more useful. It is a CLI tool that does two things:
- Corrects a command that you typed wrong.
- Answers you when you ask how to do something in the terminal.
It also detects which shell and OS you're using and takes that into account when answering.
While creating this tool, I added ai functions, which are Rust functions with a docstring telling exactly what to do,
how to react and respond, etc. Then I use a fixed prompt and send this function as a string to the AI, which will evaluate
it and return the expected result. This helped a lot improving the accuracy of the AI response.
Both tools support anything that uses an interface similar to OpenAI, so OpenRouter is also supported.
Overall, it was interesting to create these tools, and now that all the wrappers to use with AI are ready, it will be a breeze to create another AI-based tool, if I ever think of a cool idea.
I didn't find anything particularly challenging about doing this in Rust. Granted, it would have been 10x easier to do it in Python, but that is not the point.
What about the other tools?
So, what are the other (non-AI) tools I created? Here we go, hope you find something that interests you:
Lightweight HTTP server link
Development-focused web server that serves static files from a local directory. It provides instant file serving with automatic directory browsing, making it perfect for quickly serving static websites, testing frontend applications, or sharing files locally during development.
One thing I really like about this tool is that it makes super easy to share files between computers on the same network.
Mock Data Generator link
As the name suggests, it generates mock data for you. Think Faker/Bogus, but in the terminal.
Encrypter P2P Chat link
A bare-bones, secure, and private peer-to-peer chat application that enables encrypted real-time communication between two parties over TCP. It creates a secure channel using RSA 4096-bit encryption with automatic key exchange, ensuring that all messages are encrypted end-to-end without relying on external servers or third-party services.
Gitignore creator/updater link
An intelligent CLI tool that automatically creates or updates .gitignore files based on the file types detected in your project. It scans your project directory and fetches appropriate gitignore rules from authoritative sources like GitHub's gitignore repository.
AI-Ignore creator/updater link
A CLI tool that automatically creates or updates common AI-ignore files in your project directory. These files help control which files and directories are excluded from AI assistant indexing and processing. This tool is similar to the previous one, but simpler and focused on keeping AI out of things it shouldn't see.
Image editor link
The Image Processing Tool (imgx) is a multithreaded command-line utility for batch image editing operations. The tool supports common image operations like resizing, grayscale conversion, and format conversion while maintaining quality through advanced encoding algorithms.
MQTT Client link
Utility for publishing messages to and subscribing to MQTT topics. It provides a simple interface for interacting with MQTT brokers, making it very convenient for IoT testing, debugging message flows, or quickly sending/receiving messages during development.
QR Code generator link
Utility that creates QR codes for text data and WiFi credentials. The tool supports multiple output formats including console display, PNG images, and SVG files, making it perfect for quick sharing of information, WiFi credentials, URLs, or any text data that needs to be easily scannable.
Tool to find text inside files or find files by filename link
Lookup is a simple, fast CLI utility to either:
- search for a text snippet inside files (subcommand text), or
- find files by name using wildcard or regex patterns (subcommand files). Both modes default to case-insensitive matching. The tool supports recursive or current-folder-only scanning,
- configurable output, and per-subcommand headers.
A tool like ping, but with extra features link
A cross-platform ping-style CLI with extra features. Like classic ping, but with convenient output modes (CSV/JSON/custom templates), periodic stats, timestamping, and IPv4/IPv6 controls.
Encoder/Decoder for Base64 link
A simple CLI tool to encode/decode data using Base64 encoding.
Internet Connectivity and Speed monitor link
Utility that monitors connectivity and speed, stores activity in SQLite, and sends notifications via Telegram, and optionally OpenTelemetry. Comes with a Docker image, so you can leave it running in a container.
Zero-width character remover link
A utility that removes zero-width Unicode format (Cf) characters from text. It works with stdin and files, can work scan and process directories recursively.
Last but not least, a tool for testing APIs. link
Think of Postman, but without all the bloat, and it works in the terminal. You can orchestrate single API calls or chain them together to create complex workflows.
What inspired me to create this project is another Rust-based project called Hurl. It does all the heavy lifting for acting as a CLI version of Postman. However, it doesn't have support reusability of requests and other things that are useful when testing complex scenarios on APIs.
So I created this tool, which acts as a wrapper for Hurl, but with a custom syntax that allows for reusability and orchestration of requests and environment variables.
Next steps
- I still have improvements I want to do to Whurl, so this is the next immediate step.
- Then, since Microsoft released an official crate for EventHub, I need to completely rewrite the eh-read, and ex-export tools.
- And finally, add a new tool (using AI) that converts commands from one distro to another. (I.E: if I use
apt install x, but I'm on Arch, it will translate topacman -S x.)
Conclusion
After building all those tools, am I fluent in Rust? No, not yet. Rust is powerful and deep, and I think I’ll need a larger, messier, real-world project before it becomes muscle-memory.
Was it worth learning? Definitely. Even if you don’t use Rust day-to-day, learning another way to model correctness, memory safety, and concurrency is valuable. Even with AI coding tools everywhere, it’s still worth expanding your fundamentals and your mental toolbox.
Remember: when all you have is a hammer, everything looks like a nail. But when you have a toolbox, you can choose the right tool for the job.
So is Rust right for your next project? Maybe.
Attention: The recommendations below are opinionated rules of thumb. Use what fits your constraints and your team.
- If you need low latency/high throughput and you want strong guarantees around memory safety and concurrency (and you can afford a steeper learning curve), Rust is a strong candidate.
- If you need to ship quickly and raw performance isn’t the bottleneck, Python is hard to beat.
- If you want strong tooling, great productivity, and solid performance for a wide range of applications, C# is an excellent middle ground.
Take those recommendations with a grain of salt, and remember that there are other great languages and tools out there.
Here's the link to the repository: https://github.com/brenordv/rusted-toolbox
Hope that helps! :)