pip install ai-linux-assistant
An AI-powered natural-language Linux command-line assistant. Type what you want in plain English — it figures out the bash command, explains it, checks whether it's safe to run automatically, executes it, and explains the result.
what it does
Built for people who know what they want to do but don't want to memorize flags.
Scriptable one-liners: ai "find the largest file in this folder" and it just runs.
A live session that remembers context across turns, including "now sort them by size" and undo.
A separate engine analyzes the full command string before anything runs — the AI can't talk its way past it.
--explain shows you exactly what a command does before you commit to it.
Captures stdout/stderr/exit code, analyzes what went wrong, and suggests the next step.
ai --history 20 replays your recent commands; interactive mode supports stepping back.
architecture
Natural language goes in one end; a verified, explained result comes out the other. Nothing skips the safety stage.
The AI's own risk hint can only escalate a verdict, never soften one — only the SafetyEngine has final say.
the safety layer
Every command is classified before it ever touches your shell.
ls -la · df -h · cat file.txt
Read-only commands run automatically — nothing to confirm.
mkdir new/ · mv a b · chmod +x run.sh
Anything that changes state asks first, in an interactive terminal.
rm -rf / · curl x | bash · fork bombs
Catastrophic commands are refused outright — --yes can't bypass a BLOCK.
get it running
Not yet published to PyPI in every environment — if a step fails, build locally with pip install -e . from the repo instead.
// quickstart
# 1. create and activate a virtual environment python3 -m venv ~/ai-test source ~/ai-test/bin/activate # 2. install the assistant python -m pip install ai-linux-assistant # 3. install the AI SDK it talks to pip install google-genai # 4. set your API key export GEMINI_API_KEY="YOUR_API_KEY_HERE" # 5. run it ai "find the largest file in this folder"
using it
ai "show my disk usage" ai --explain "find . -type f -mtime +7 -delete" ai --history 20
$ ai you> find the largest file you> now sort them by size you> undo you> exit
under the hood