ShellGenie

A command shell that turns plain English into commands, with a local LLM.

Role
Creator
Areas
AI, Tools

ShellGenie is a small experiment in putting an LLM where people already work: the command line.

It's an interactive shell, written in Python with prompt_toolkit, that behaves like a normal console. Ordinary commands like dir or cd run directly, with tab completion and a saved command history. Prefix a line with ! and it becomes a request in plain English instead, such as !list files in the current directory. A local language model, run through llama.cpp and downloaded from Hugging Face on first use, turns the request into a shell command for the current platform.

The suggested command is shown first and runs only after you confirm it. That keeps the model in the role of an assistant that drafts commands, never one that acts on its own, which matters in a tool that can delete files.

Six-step flow in ShellGenie: read a line with tab completion and history; run it directly unless it starts with an exclamation mark; otherwise detect the shell and ask the model for one command wrapped in cmd tags; run local llama.cpp inference capped at 50 tokens; retry up to three times if the tags are missing; then prefill the suggestion at the prompt, where Enter runs it and an empty line skips it.
The model's suggestion lands at the prompt as editable text, and nothing runs until you press Enter.

Because inference is local, nothing typed into the shell leaves the machine. The shell runs on Windows, macOS and Linux, with launch scripts for each.