AI-powered Linux assistant — fix any Linux problem in plain English
Project description
AI Terminal
An intelligent Linux troubleshooter that accepts natural language problem descriptions and fixes them automatically using the Anthropic Claude API.
What it does
Describe your Linux problem in plain English. AI Terminal will:
- Collect system context (OS, kernel, user, desktop, uptime) silently at startup
- Send the issue + system info to Claude via the Anthropic API
- Receive a structured fix plan with step-by-step commands
- Show each step with its risk level before running it
- Ask for confirmation before executing anything
- Feed command outputs back to Claude and iterate until resolved (up to 6 rounds)
Quick Start
1. Install
git clone <repo>
cd ai-terminal
bash install.sh
2. Set your API key
export ANTHROPIC_API_KEY="sk-ant-..."
Get your key at console.anthropic.com.
3. Run
aifix
Or without installing:
ANTHROPIC_API_KEY=sk-ant-... python3 ai_terminal.py
Example issues you can describe
nginx won't start after I changed the configmy disk is almost full, help me find what's taking spaceSSH connections keep timing outa process is eating 100% CPU, I don't know which onemy cron job isn't runningdocker containers can't reach the internetI accidentally changed file permissions, nothing works
Safety
AI Terminal never runs a command without your explicit approval. For each step you see:
- Risk level —
SAFE,MODERATE, orDANGEROUS(colour-coded) - [SUDO NEEDED] badge when root is required
- A red warning banner for destructive commands
- A prompt:
[y/n/skip/abort]— you decide what runs
Commands matching dangerous patterns (rm -rf /, dd if=, mkfs, fdisk, wipefs, shred, chmod 777 /, fork bombs) are flagged regardless of what Claude labels them.
How it works
User describes issue
│
▼
System context collected (OS, kernel, user, uptime…)
│
▼
Claude API → structured JSON fix plan
│
▼
Display steps with risk badges
│
▼
User approves/skips each command
│
▼
Command output captured and sent back to Claude
│
▼
Claude iterates (max 6 rounds) until resolved
File listing
ai-terminal/
├── ai_terminal.py # Main script — run this directly
├── install.sh # Installer (creates ~/.local/bin/aifix)
├── requirements.txt # Python dependencies
└── README.md # This file
Requirements
- Python 3.8+
anthropicPython package (auto-installed by the script)- An Anthropic API key
- Linux (the tool is designed for Linux environments)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tuxgenie-3.9.0.tar.gz.
File metadata
- Download URL: tuxgenie-3.9.0.tar.gz
- Upload date:
- Size: 38.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cbc084e1dc28bf7a8d56bf382b7333f66e2f6bd62ba89759a006f4344611911
|
|
| MD5 |
0b0751d0617391e085726ccd38dd5f24
|
|
| BLAKE2b-256 |
ec922f6ea101ae15672dc56d254eca52b066c90f53c1914a8d1dee06c852ff43
|
File details
Details for the file tuxgenie-3.9.0-py3-none-any.whl.
File metadata
- Download URL: tuxgenie-3.9.0-py3-none-any.whl
- Upload date:
- Size: 36.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4eb3408581172bcf30044e4f9e58bd73c3e07133105da9df974f95bc497ed2cc
|
|
| MD5 |
d761e7e412de44f7de797a99b7434ac9
|
|
| BLAKE2b-256 |
06cab8848c8c3eccdd2f272f700d90f47cb49ff78c55cb048452c404387a346a
|