Skip to main content

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:

  1. Collect system context (OS, kernel, user, desktop, uptime) silently at startup
  2. Send the issue + system info to Claude via the Anthropic API
  3. Receive a structured fix plan with step-by-step commands
  4. Show each step with its risk level before running it
  5. Ask for confirmation before executing anything
  6. 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 config
  • my disk is almost full, help me find what's taking space
  • SSH connections keep timing out
  • a process is eating 100% CPU, I don't know which one
  • my cron job isn't running
  • docker containers can't reach the internet
  • I accidentally changed file permissions, nothing works

Safety

AI Terminal never runs a command without your explicit approval. For each step you see:

  • Risk levelSAFE, MODERATE, or DANGEROUS (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+
  • anthropic Python 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

This version

3.9.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tuxgenie-3.9.0.tar.gz (38.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tuxgenie-3.9.0-py3-none-any.whl (36.9 kB view details)

Uploaded Python 3

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

Hashes for tuxgenie-3.9.0.tar.gz
Algorithm Hash digest
SHA256 2cbc084e1dc28bf7a8d56bf382b7333f66e2f6bd62ba89759a006f4344611911
MD5 0b0751d0617391e085726ccd38dd5f24
BLAKE2b-256 ec922f6ea101ae15672dc56d254eca52b066c90f53c1914a8d1dee06c852ff43

See more details on using hashes here.

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

Hashes for tuxgenie-3.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4eb3408581172bcf30044e4f9e58bd73c3e07133105da9df974f95bc497ed2cc
MD5 d761e7e412de44f7de797a99b7434ac9
BLAKE2b-256 06cab8848c8c3eccdd2f272f700d90f47cb49ff78c55cb048452c404387a346a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page