Native desktop AI system assistant for Arch Linux. Monitors CPU, memory, disk, network, processes, and systemd services; analyzes logs with a local Ollama LLM; and executes maintenance actions only after safety validation and explicit user approval.
- Python 3.12
- PySide6 (Qt)
- Ollama (local LLM)
- SQLite (stdlib)
- psutil
- systemd + journalctl (Arch Linux target)
Fast path (no sudo, no apt update) — if Python 3.12 is already installed:
chmod +x scripts/*.sh
./scripts/install_python_only.sh
source .venv/bin/activate
python scripts/test_snapshot.pyFull path — installs Qt runtime libs via apt (skips apt update):
./scripts/install_ubuntu_wsl.shGUI in WSL requires a display server (WSLg or X11). On Arch, run natively on the desktop session.
cd /path/to/dproj # project root, not scripts/
chmod +x scripts/*.sh
./scripts/install_arch.sh
./scripts/setup_ollama.sh llama3.2
python -m archguardArch package names (used by install_arch.sh):
| Wrong | Correct |
|---|---|
python-pyside6 |
pyside6 |
psutil |
python-psutil |
If pacman says target not found, sync once then retry:
sudo pacman -Sy
./scripts/install_arch.shIf pip: command not found, install pip first:
sudo pacman -S python-pip
./scripts/install_python_only.shHGFS does not support symlinks, so python -m venv fails with Operation not supported.
The install scripts detect this automatically and place the venv at:
~/.local/venvs/archguard-dproj
Run from project root:
rm -rf .venv venv # remove any broken partial venvs
sh scripts/fix_scripts.sh # fix CRLF if you see "set: pipefail" errors
./scripts/install_arch.sh
./scripts/run_dev.sh # launches app using the correct venvIf scripts fail with set: pipefail or invalid option name, they have Windows
line endings. Fix once with:
sh scripts/fix_scripts.sh
# or: sed -i 's/\r$//' scripts/*.shOr:
python -m archguardsrc/archguard/
core/ # Domain: collectors, AI, safety, executor, memory, use cases
infrastructure/ # SQLite, Ollama, psutil, systemd, journalctl
gui/ # PySide6 desktop interface
utils/ # Logging, formatters, environment checks
config/ # settings.toml, safety_rules.toml
assets/styles/ # Qt dark theme
data/ # SQLite DB and logs (runtime)
scripts/ # Install and dev helpers
tests/ # Unit tests
- AI proposes actions as structured
ActionRequestobjects — never raw shell. CommandValidatorblocks dangerous patterns and non-allowlisted services.- GUI shows
ApprovalDialogbefore every execution. - All attempts are logged to
action_historyin SQLite.
Edit config/safety_rules.toml to adjust allowed services and blocked patterns.
| File | Purpose |
|---|---|
config/settings.toml |
Poll interval, Ollama model, DB path, GUI size |
config/safety_rules.toml |
Blocked commands, allowed service restarts |
.env |
Optional overrides (OLLAMA_HOST, OLLAMA_MODEL) |
source .venv/bin/activate
pytest
python scripts/test_snapshot.py- Copy the project directory to Arch.
- Run
./scripts/install_arch.sh. - Run
./scripts/setup_ollama.sh. - Launch with
python -m archguardfrom a graphical session. - Service restart/kill actions may require appropriate polkit/sudo permissions.
- Clean architecture: GUI → use cases → domain → infrastructure adapters
- Safety layer: Validator + approval dialog + audit log
- Local AI: Ollama HTTP API, no cloud dependency
- Persistence: Issues, solutions, recommendations, analysis sessions