Skip to main content

LLM-Powered Remote RPi Display Repair Agent

Project description

fixpi — Remote OS Repair Agent

SSH into any Linux device, let an LLM diagnose and fix it.

Quick Start

cd fixPI
cp .env.example .env          # fill in SSH + LLM credentials
pip install -e ".[clickmd]"   # or: pip install -e ~/github/wronai/contract/clickmd

fixpi                         # interactive menu shell

LLM Providers

Any litellm-compatible provider:

Provider Model example Env key
Groq groq/llama-3.3-70b-versatile GROQ_API_KEY
OpenRouter openrouter/google/gemma-3-27b-it:free OPENROUTER_API_KEY
Anthropic anthropic/claude-3-5-sonnet-20241022 ANTHROPIC_API_KEY
OpenAI gpt-4o-mini OPENAI_API_KEY
Gemini gemini/gemini-2.0-flash-exp GEMINI_API_KEY
Ollama ollama/llama3.2 (none — local)
# Groq example (.env)
LLM_MODEL=groq/llama-3.3-70b-versatile
GROQ_API_KEY=gsk_...

Note: groq/groq/llama-... is automatically normalized to groq/llama-...

CLI Commands

fixpi                   # interactive menu shell (default)
fixpi run               # run agent immediately
fixpi diagnose          # diagnostics only, no changes
fixpi config            # configure LLM / SSH wizard
fixpi test              # test LLM connection
fixpi list-models       # show all supported models

What it fixes (RPi3 + WaveShare)

Verified 2026-02-19 — both displays working:

Output Display Resolution Status
DSI-1 WaveShare 7.9" 400×1280 native, Transform:90
HDMI-A-1 ASEM 7" 1280×800 auto-detect

Root cause was kernel module mismatch: WaveShare repo .ko compiled for 6.6.x, RPi3 running 6.12.x. Fix: use mainline panel-waveshare-dsi.ko (built into 6.12+):

# /boot/firmware/config.txt
dtoverlay=vc4-kms-v3d
# display_auto_detect=1   ← disable this
dtoverlay=vc4-kms-dsi-waveshare-panel,7_9_inch
hdmi_force_hotplug=1

Architecture

fixPI/                        ← project root
├── pyproject.toml
├── Makefile
├── README.md
├── LICENSE
├── .env.example
├── tests/                    ← unit tests (not distributed)
│   ├── test_llm_agent.py
│   └── test_cli.py
└── fixpi/                    ← installable package
    ├── __init__.py
    ├── __main__.py           ← CLI entry (fixpi / python -m fixpi)
    ├── cli.py                ← interactive menu shell (clickmd)
    ├── llm_agent.py          ← multi-provider LLM (litellm)
    ├── ssh_client.py         ← paramiko SSH with reboot/reconnect
    ├── diagnostics.py        ← RPi display state collector
    └── agent.py              ← orchestrator (LLM decision loop)

License

Apache License 2.0 - see LICENSE for details.

Author

Created by Tom Sapletta - tom@sapletta.com

Project details


Download files

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

Source Distribution

fixpi-1.0.8.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

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

fixpi-1.0.8-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file fixpi-1.0.8.tar.gz.

File metadata

  • Download URL: fixpi-1.0.8.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for fixpi-1.0.8.tar.gz
Algorithm Hash digest
SHA256 32816dfb360b09941d771ebbd555799af037b849778ac6fbfdf236226f7bc095
MD5 ee773a20d1a2e696409f18339f100c57
BLAKE2b-256 590e2ff69f7d579e236f0bcb57cb06688d40dd46c810b6df7873a17024e330af

See more details on using hashes here.

File details

Details for the file fixpi-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: fixpi-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 25.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for fixpi-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f647c167420f71c02df8260d3277d28bea7471891375d587dcfbbedcb1584248
MD5 33a1261b2956329003fcabe7fdb3bf4f
BLAKE2b-256 27702ad28dd34d23e0ff5c3a46085ed37081aafcef91155205132732097092e0

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