From Natural Language to Shell Commands: A CLI Tool Adventure

From Natural Language to Shell Commands: A CLI Tool Adventure

As developers, we’ve all been there – struggling to remember the exact syntax of a shell command or wishing we could just tell our computer what to do in plain language. Well, one Reddit user took matters into their own hands and built a CLI tool that does just that. Meet `pls`, a simple tool that uses local Ollama models to convert natural language into shell commands.

The creator of `pls` shares their journey of building the tool, from inspiration to release on the AUR (Arch User Repository). Along the way, they learned valuable lessons about setting up a decent GitHub repo, handling shell-specific quirks, and creating an AUR package.

What’s impressive is that the creator got help from an AI assistant throughout the process, which they liken to pair programming with a patient, knowledgeable, but sometimes literal partner.

So, what can `pls` do? It’s written in shell script, supports Bash, Zsh, and Fish, and generates shell-aware commands. It even automatically adds commands to your history (except on Fish, due to some quirks).

The tool is now available on the AUR as `pls-cli-git`, and the creator is eager for feedback on the code, PKGBUILD, and repo itself. They’re particularly interested in tips on making shell integrations more robust and AUR best practices.

If you’re interested in exploring the possibilities of natural language and shell commands, `pls` is definitely worth checking out.

Leave a Comment

Your email address will not be published. Required fields are marked *