{"id":50472356,"url":"https://github.com/semcod/fixos","last_synced_at":"2026-06-01T11:03:12.813Z","repository":{"id":339203675,"uuid":"1160907487","full_name":"semcod/fixos","owner":"semcod","description":"AI diagnostyka i naprawa Fedora Linux – audio, thumbnails, sprzęt Lenovo Yoga z anonimizacją danych, trybem HITL/Autonomous i zewnętrznymi źródłami wiedzy.","archived":false,"fork":false,"pushed_at":"2026-05-13T15:09:28.000Z","size":15315,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-13T17:16:41.100Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/semcod.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-18T14:10:47.000Z","updated_at":"2026-05-13T15:26:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/semcod/fixos","commit_stats":null,"previous_names":["wronai/fixfedora","semcod/fixos"],"tags_count":69,"template":false,"template_full_name":null,"purl":"pkg:github/semcod/fixos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semcod%2Ffixos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semcod%2Ffixos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semcod%2Ffixos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semcod%2Ffixos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semcod","download_url":"https://codeload.github.com/semcod/fixos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semcod%2Ffixos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33771630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-01T11:03:12.461Z","updated_at":"2026-06-01T11:03:12.792Z","avatar_url":"https://github.com/semcod.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"```\n  ___  _       ___  ____\n / _(_)_  __  / _ \\/ ___|\n| |_| \\ \\/ / | | | \\___ \\\n|  _| |\u003e  \u003c  | |_| |___) |\n|_| |_/_/\\_\\  \\___/|____/\nAI-powered OS Diagnostics\n```\n\n# fixOS v2.2.6 🔧🤖\n\n[![Python](https://img.shields.io/badge/python-3.10%2B-blue?logo=python)](https://www.python.org/)\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![GitHub](https://img.shields.io/badge/github-wronai%2Ffixos-black?logo=github)](https://github.com/wronai/fixos)\n[![Providers](https://img.shields.io/badge/LLM%20providers-12-orange)](https://github.com/wronai/fixos#-dostępni-providerzy-llm-12)\n[![Platforms](https://img.shields.io/badge/platform-Linux%20%7C%20Windows%20%7C%20macOS-lightgrey)](https://github.com/wronai/fixos)\n[![Tests](https://img.shields.io/badge/tests-274%20passing-brightgreen)](https://github.com/wronai/fixos/actions)\n\n\n## AI Cost Tracking\n\n![AI Cost](https://img.shields.io/badge/AI%20Cost-$7.50-yellow) ![AI Model](https://img.shields.io/badge/AI%20Model-openrouter%2Fqwen%2Fqwen3-coder-next-lightgrey)\n\nThis project uses AI-generated code. Total cost: **$7.5000** with **128** AI commits.\n\nGenerated on 2026-05-08 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/models/openrouter/qwen/qwen3-coder-next)\n\n---\n\n**AI diagnostyka i naprawa systemów** – Linux, Windows, macOS  \nz anonimizacją danych, trybem HITL/Autonomous, grafem problemów i 12 providerami LLM.\n\n\u003e 🔗 **GitHub**: https://github.com/wronai/fixos\n\n---\n\n## 🌍 Cross-Platform Support\n\n| System | Package Manager | Audio | Hardware | System |\n|:--|:--|:--:|:--:|:--:|\n| **Linux** (Fedora, Ubuntu, Arch, Debian) | dnf / apt / pacman | ✅ ALSA/PipeWire/SOF | ✅ DMI/sensors | ✅ systemd/journal |\n| **Windows** 10/11 | winget / choco | ✅ WMI Audio | ✅ WMI Hardware | ✅ Event Log |\n| **macOS** 12+ | brew | ✅ CoreAudio | ✅ system_profiler | ✅ launchd |\n\n---\n\n## Szybki start (3 kroki)\n\n```bash\n# 1. Instalacja\npip install -e \".[dev]\"\n\n# 2. Wybierz provider i pobierz klucz API\nfixos llm                          # lista 12 providerów z linkami\n\n# 3. Zapisz klucz i uruchom\nfixos token set AIzaSy...          # Gemini (darmowy, domyślny)\nfixos fix\n```\n\n---\n\n## Komendy CLI\n\n```\nfixos                   – ekran powitalny z listą komend i statusem\nfixos fix               – diagnoza + sesja naprawcza z AI (HITL)\nfixos scan              – diagnostyka systemu bez AI\nfixos cleanup           – skanuj i czyść dane usług (Docker, npm, pip, ...)\nfixos cleanup --full    – pełny audit systemu + dev projects\nfixos orchestrate       – zaawansowana orkiestracja (graf problemów DAG)\nfixos llm               – lista 12 providerów LLM + linki do kluczy API\nfixos token set KEY     – zapisz klucz API do .env (auto-detekcja providera)\nfixos token show        – pokaż aktualny token (zamaskowany)\nfixos token clear       – usuń token z .env\nfixos config show       – pokaż konfigurację\nfixos config init       – utwórz .env z szablonu\nfixos config set K V    – ustaw wartość w .env\nfixos providers         – skrócona lista providerów\nfixos test-llm          – testuj połączenie z LLM\n```\n\n### Przykłady użycia\n\n```bash\n# Tylko diagnostyka audio + zapis do pliku\nfixos scan --audio --output /tmp/audio-report.json\n\n# Analiza i interaktywne czyszczenie zajętości dysku\nfixos fix --disc\n\n# Pełny audit systemu (DNF, Docker, Flatpak, dev projects)\nfixos cleanup --full --dry-run\n\n# Usuń tylko foldery venv z projektów\nfixos cleanup --full\n\u003e type:venv\n\n# Usuń duże elementy (\u003e1 GB)\nfixos cleanup --full\n\u003e large\n\n# Interaktywny wybór elementów do usunięcia\nfixos cleanup --full\n\u003e select\n\u003e 1,3,5-10\n\n# Napraw audio i thumbnails (HITL – pyta o potwierdzenie)\nfixos fix --modules audio,thumbnails\n\n# Tryb autonomiczny (agent sam naprawia, max 5 akcji)\nfixos fix --mode autonomous --max-fixes 5\n\n# Zaawansowana orkiestracja z grafem zależności\nfixos orchestrate --dry-run\n\n# Pokaż tylko darmowe providery LLM\nfixos llm --free\n\n# Ustaw Groq jako provider (ultra-szybki, darmowy)\nfixos token set gsk_... --provider groq\nfixos fix --provider groq\n\n# Timeout 30 minut\nfixos fix --timeout 1800\n```\n\n### Przykładowy widok w terminalu (Czyszczenie dysku)\n\nWyjście jest zoptymalizowane pod standardowy Markdown bez nadmiernej ilości symboli Unicode, ułatwiając czytelność i wklejanie:\n\n```bash\n$ fixos fix --disk --dry-run\n\n  ___  _       ___  ____\n / _(_)_  __  / _ \\/ ___|\n| |_| \\ \\/ / | | | \\___|\n|  _| |\u003e  \u003c  | |_| |___) |\n|_| |_/_/\\_\\  \\___/|____/\n  AI-powered OS Diagnostics  •  v2.0.0\n\nKonfiguracja:\n  Tryb: DRY-RUN (komendy nie będą wykonywane)\n  Analiza dysku: Włączona\nAnalizowanie zajętości dysku...\n  Dysk: 93.9% zajęty (1759.0GB / 1873.7GB)\n  Można bezpiecznie zwolnić: 0.7GB w 3 akcjach\nDiagnostyka gotowa.\n\nPlan czyszczenia dysku:\n  🔢 Akcje: 8\n  Miejsce: 262255.3 GB\n  Bezpieczne: 0.7 GB\n  📂 Kategorie: 6\n\n Cache Files:\n  📁 Akcje: 1\n  Miejsce: 0.6 GB\n      Clear application cache (0.6GB)\n\n Temporary Files:\n  📁 Akcje: 1\n  Miejsce: 0.1 GB\n      Clean system_temp temporary files (0.1GB)\n\nRekomendacje:\n  🎯 Cache Cleanup Recommended\n     Clear application cache to free 0.6 GB\n  🎯 Log Files Can Be Cleaned\n     Clean old logs to free 0.7 GB\n\nTryb DRY-RUN - żadne akcje nie zostaną wykonane\n```\n\n---\n\n## 🤖 Dostępni Providerzy LLM (12)\n\n| # | Provider | Tier | Model domyślny | Klucz API |\n|:--|:--|:--:|:--|:--|\n| 1 | **gemini** | 🟢 FREE | gemini-2.5-flash | [aistudio.google.com](https://aistudio.google.com/app/apikey) |\n| 2 | **openrouter** | 🟢 FREE | openai/gpt-4o-mini | [openrouter.ai/settings/keys](https://openrouter.ai/settings/keys) |\n| 3 | **mistral** | 🟢 FREE | mistral-small-latest | [console.mistral.ai](https://console.mistral.ai/api-keys/) |\n| 4 | **groq** | 🟢 FREE | llama-3.1-8b-instant | [console.groq.com/keys](https://console.groq.com/keys) |\n| 5 | **together** | 🟢 FREE | llama-3.2-11B | [api.together.ai](https://api.together.ai/settings/api-keys) |\n| 6 | **cohere** | 🟢 FREE | command-r | [dashboard.cohere.com](https://dashboard.cohere.com/api-keys) |\n| 7 | **cerebras** | 🟢 FREE | llama3.1-8b | [cloud.cerebras.ai](https://cloud.cerebras.ai/platform/) |\n| 8 | **ollama** | 🟢 LOCAL | llama3.2 | [ollama.com/download](https://ollama.com/download) |\n| 9 | **openai** | 💰 PAID | gpt-4o-mini | [platform.openai.com](https://platform.openai.com/api-keys) |\n| 10 | **anthropic** | 💰 PAID | claude-3-haiku | [console.anthropic.com](https://console.anthropic.com/settings/keys) |\n| 11 | **xai** | 💰 PAID | grok-beta | [console.x.ai](https://console.x.ai/) |\n| 12 | **deepseek** | 💰 PAID | deepseek-chat | [platform.deepseek.com](https://platform.deepseek.com/api_keys) |\n\n```bash\nfixos llm          # pełna lista z opisami i gotowymi komendami\nfixos llm --free   # tylko darmowe\n```\n\n---\n\n## Tryby agenta\n\n### 👤 Human-in-the-Loop (HITL) – domyślny\n\n```\nLLM sugeruje → Ty decydujesz → Skrypt wykonuje\n\nfixos [00:58:42] ❯ 1              ← napraw problem nr 1\nfixos [00:58:30] ❯ A              ← napraw wszystkie\nfixos [00:58:20] ❯ !systemctl status pipewire  ← własna komenda\nfixos [00:58:10] ❯ search sof-firmware lenovo  ← szukaj zewnętrznie\nfixos [00:57:55] ❯ D              ← opisz własny problem\nfixos [00:57:40] ❯ ?              ← zapytaj o szczegóły\nfixos [00:57:30] ❯ q              ← zakończ\n```\n\nWyjście koloryzowane: 🔴 krytyczne / 🟡 ważne / 🟢 drobne, bloki kodu z ramkami box-drawing.\n\n### 🤖 Autonomous – agent działa samodzielnie\n\n```bash\nfixos fix --mode autonomous --max-fixes 10\n```\n- Protokół JSON: `{ \"action\": \"EXEC|SEARCH|SKIP|DONE\", \"command\": \"...\", \"reason\": \"...\" }`\n- Zabezpieczenia: lista zabronionych komend (`rm -rf /`, `mkfs`, `fdisk`, `dd if=...`)\n- Każde `EXEC` logowane z wynikiem i oceną LLM\n- Wymaga jawnego `yes` na starcie\n\n### 🎼 Orchestrate – graf problemów (DAG)\n\n```bash\nfixos orchestrate\nfixos orchestrate --dry-run   # podgląd bez wykonywania\n```\n- Buduje graf zależności między problemami\n- Po każdej naprawie re-diagnozuje i wykrywa nowe problemy\n- LLM ocenia wynik każdej komendy (JSON structured output)\n\n---\n\n## 🔒 Anonimizacja danych\n\nZawsze pokazywana przed wysłaniem do LLM. Maskowane kategorie:\n\n| Kategoria | Przykład | Zamiennik |\n|:--|:--|:--|\n| Hostname | `moj-laptop` | `[HOSTNAME]` |\n| Username | `jan` | `[USER]` |\n| Ścieżki /home | `/home/jan/.pyenv/versions/3.12/bin/python` | `/home/[USER]/...` |\n| Adresy IPv4 | `192.168.1.100` | `192.168.XXX.XXX` |\n| Adresy MAC | `aa:bb:cc:dd:ee:ff` | `XX:XX:XX:XX:XX:XX` |\n| Tokeny API | `sk-abc123...` | `[API_TOKEN_REDACTED]` |\n| UUID hardware | `a1b2c3d4-...` | `[UUID-REDACTED]` |\n| Numery seryjne | `SN: PF1234567` | `Serial: [SERIAL-REDACTED]` |\n| Hasła w env | `PASSWORD=secret` | `PASSWORD=[REDACTED]` |\n\n---\n\n## Moduły diagnostyki\n\n| Moduł | Linux | Windows | macOS | Co sprawdza |\n|:--|:--:|:--:|:--:|:--|\n| `system` | ✅ | ✅ | ✅ | CPU, RAM, dyski, usługi, aktualizacje, SELinux, firewall |\n| `audio` | ✅ | ✅ | ✅ | ALSA/PipeWire/SOF (Linux), WMI Audio (Win), CoreAudio (Mac) |\n| `thumbnails` | ✅ | ➖ | ➖ | ffmpegthumbnailer, cache, GNOME gsettings |\n| `hardware` | ✅ | ✅ | ✅ | DMI/WMI/system_profiler, BIOS, GPU, czujniki, bateria |\n| `security` | ✅ | ✅ | ✅ | Firewall, otwarte porty, SELinux/AppArmor, SSH config, fail2ban, SUID |\n| `resources` | ✅ | ✅ | ✅ | Co zajmuje dysk, top procesów CPU/RAM, autostart, OOM events |\n\n```bash\n# Tylko bezpieczeństwo\nfixos scan --modules security\n\n# Zasoby – co zajmuje dysk i pamięć\nfixos scan --modules resources\n\n# Pełna diagnostyka z naprawą\nfixos fix --modules system,security,resources\n```\n\n---\n\n## Zewnętrzne źródła wiedzy (fallback)\n\nGdy LLM nie zna rozwiązania, fixos szuka automatycznie w:\n\n- **Fedora Bugzilla** – baza zgłoszonych błędów\n- **ask.fedoraproject.org** – forum społeczności\n- **Arch Wiki** – doskonałe źródło dla ogólnych problemów Linux\n- **GitHub Issues** – PipeWire, ALSA, linux-hardware repos\n- **DuckDuckGo** – ogólne wyszukiwanie (bez klucza API)\n- **Google via SerpAPI** – najlepsze wyniki (opcjonalny klucz `SERPAPI_KEY`)\n\n---\n\n## Konfiguracja (.env)\n\n```bash\nfixos config init    # utwórz .env z szablonu\nfixos config show    # sprawdź aktualną konfigurację\n```\n\n```env\nLLM_PROVIDER=gemini           # gemini|openai|openrouter|groq|mistral|...\nGEMINI_API_KEY=AIzaSy...      # klucz Gemini (darmowy)\nAGENT_MODE=hitl               # hitl|autonomous\nSHOW_ANONYMIZED_DATA=true     # pokaż dane przed wysłaniem\nENABLE_WEB_SEARCH=true        # fallback do zewnętrznych źródeł\nSESSION_TIMEOUT=3600          # timeout sesji (1h)\nSERPAPI_KEY=                  # opcjonalny – lepsze wyniki wyszukiwania\n```\n\n---\n\n## Testy i Docker\n\n### Uruchomienie testów\n\n```bash\n# Wszystkie testy jednostkowe (bez API, szybkie)\npytest tests/unit/ -v\n\n# Testy e2e z mock LLM\npytest tests/e2e/ -v\n\n# Tylko testy z prawdziwym API (wymaga tokena w .env)\npytest tests/e2e/ -v -m real_api\n\n# Pokrycie kodu\npytest --cov=fixos --cov-report=html\nmake test-coverage\n```\n\n### Docker – symulowane środowiska\n\n```bash\n# Zbuduj wszystkie obrazy\ndocker compose -f docker/docker-compose.yml build\n\n# Scenariusze broken\ndocker compose -f docker/docker-compose.yml run broken-audio\ndocker compose -f docker/docker-compose.yml run broken-thumbnails\ndocker compose -f docker/docker-compose.yml run broken-network\ndocker compose -f docker/docker-compose.yml run broken-full\n\n# Uruchom testy e2e w Dockerze\ndocker compose -f docker/docker-compose.yml run e2e-tests\n```\n\n### Środowiska Docker\n\n| Obraz | Scenariusz |\n|:--|:--|\n| `fixos-broken-audio` | Brak sof-firmware, PipeWire failed, no ALSA cards |\n| `fixos-broken-thumbnails` | Brak thumbnailerów, pusty cache, brak GStreamer |\n| `fixos-broken-network` | NetworkManager failed, DNS broken, rfkill blocked |\n| `fixos-broken-full` | Wszystkie problemy naraz + pending updates + failed services |\n\n---\n\n## Struktura projektu\n\n```\nfixos/\n├── fixos/\n│   ├── cli.py                  # Komendy CLI (Click) – fixos, fix, scan, llm, ...\n│   ├── config.py               # Konfiguracja + 12 providerów LLM\n│   ├── platform_utils.py       # Cross-platform (Linux/Win/Mac)\n│   ├── agent/\n│   │   ├── hitl.py             # HITL z koloryzowanym markdown output\n│   │   └── autonomous.py       # Tryb autonomiczny z JSON protokołem\n│   ├── diagnostics/\n│   │   └── system_checks.py    # Moduły: system, audio, thumbnails, hardware\n│   ├── fixes/\n│   │   ├── knowledge_base.py   # Baza znanych bugów z heurystykami\n│   │   └── heuristics.py       # Matcher diagnostics → known fixes\n│   ├── orchestrator/\n│   │   ├── graph.py            # Graf problemów (DAG)\n│   │   ├── executor.py         # Bezpieczny executor komend\n│   │   └── orchestrator.py     # Główna pętla orkiestracji\n│   ├── providers/\n│   │   └── llm.py              # Multi-provider LLM client\n│   └── utils/\n│       ├── anonymizer.py       # Anonimizacja z raportem\n│       └── web_search.py       # Bugzilla/AskFedora/ArchWiki/GitHub/DDG\n├── tests/\n│   ├── conftest.py             # Fixtures + mock diagnostics\n│   ├── e2e/\n│   │   ├── test_audio_broken.py\n│   │   ├── test_thumbnails_broken.py\n│   │   ├── test_network_broken.py\n│   │   ├── test_executor.py\n│   │   └── test_cli.py\n│   └── unit/\n│       ├── test_core.py\n│       ├── test_anonymizer.py\n│       └── test_executor.py\n├── docker/\n│   ├── base/Dockerfile\n│   ├── broken-audio/Dockerfile\n│   ├── broken-thumbnails/Dockerfile\n│   ├── broken-network/Dockerfile\n│   └── broken-full/Dockerfile\n├── .env.example\n├── pytest.ini\n└── pyproject.toml\n```\n\n---\n\n## 📋 Roadmap\n\nZobacz pełną listę zadań i roadmap w pliku [TODO.md](./TODO.md)\n\n---\n\n## 🚀 Jak używać fixOS (Prosty przewodnik)\n\n### Krok 1: Instalacja\n```bash\npip install -e \".[dev]\"\n```\n\n### Krok 2: Konfiguracja\n```bash\n# Utwórz plik .env z szablonu\nfixos config init\n\n# Ustaw klucz API (darmowy Gemini)\nfixos token set AIzaSy...\n\n# Lub wybierz innego providera\nfixos llm --free    # pokaż darmowe providery\n```\n\n### Krok 3: Użycie\n```bash\n# Zobacz dostępne komendy\nfixos\n\n# Diagnostyka systemu (bez AI)\nfixos scan\n\n# Naprawa z AI (pyta o potwierdzenie)\nfixos fix\n\n# Naprawa automatyczna (bez pytania)\nfixos fix --mode autonomous --max-fixes 5\n```\n\n### Przydatne przykłady\n```bash\n# Tylko audio\nfixos fix --modules audio\n\n# Zapisz wynik do pliku\nfixos scan --output raport.json\n\n# Timeout 30 minut\nfixos fix --timeout 1800\n\n# Podgląd orkiestracji\nfixos orchestrate --dry-run\n```\n\n### 🔗 Linki\n- **GitHub**: https://github.com/wronai/fixos\n- **Pełna dokumentacja**: [TODO.md](./TODO.md)\n---\n\n## Licencja\n\nApache License 2.0 – see [LICENSE](LICENSE) for details.\n\n## License\n\nLicensed under Apache-2.0.\n## Author\n\nTom Sapletta\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemcod%2Ffixos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemcod%2Ffixos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemcod%2Ffixos/lists"}