desktopPetLite is a personality-driven desktop companion that runs in two modes:
- TUI mode for terminal-first workflows, shell command execution, and agentic commands.
- GUI mode for a floating desktop pet rendered with PyQt5.
The project combines a persistent shell, optional LLM-powered editing flows, and a Raspberry Pi sandbox bridge for remote validation before local apply.
#WARNING!!! currently this tui/gui does NOT have env safety as of now, i have fixed it modifying outside of scope but env is not safe do note it may accidently leak apikey untill next fix. this is gemni so likly safe and not maliuous but do know.
desktopPetLite/
├── anim/ # Optional pet sprites
├── core/ # Runtime engines (shell, LLM, Pi bridge, config)
├── ui/ # TUI and GUI entry components
├── launcher.py # Main launcher (TUI default, GUI optional)
├── requirements.txt
└── readme.md
- Install Python 3.10+.
- Create and activate a virtual environment.
- Install dependencies:
pip install -r requirements.txt- Create
.envfromex.envand populate required values:GROQ_API_KEYand/orGEMINI_API_KEYPI_PASSWORDfor Raspberry Pi sandbox workflows- Optional UI/config values (
CAT_NAME,DEFAULT_MOOD,OBSIDIAN_VAULT_PATH)
python launcher.pyTUI supports:
- Normal shell commands (example:
git status,python -m pip list) - Agentic commands routed through built-in command prefixes
- Sandbox controls for remote Pi workflows
python launcher.py --guiGUI mode requires a desktop session with display support and PyQt5-compatible runtime dependencies.
Any command that does not match an agent command prefix is executed in the persistent shell backend.
modify <instruction>: run local multi-file LLM editing flow.sandbox <instruction>: run Raspberry Pi sandbox agent loop.sandbox accept: apply pending.sandbox_mutations.jsonchanges from Pi to the local project.sandbox clear <confirmation phrase>: clear remote sandbox workspace contents only when the confirmation phrase is exactlyconfirm clear sandbox.obsidian daily: run Obsidian daily summary flow.memory show: display shared memory summary/preview.memory clear: clear shared memory store.cat <prompt>: conversational LLM response.
GUI mode now includes agent controls:
agentbutton: run any agent command (modify ...,sandbox ...,obsidian daily,memory clear/show)dailybutton: quickobsidian dailymem clrbutton: quickmemory clear
Long-running agent tasks in GUI run in worker threads so the UI remains responsive.
The Raspberry Pi bridge (core/pi_agent.py) runs an iterative workflow:
- Upload project archive to
/home/pi/sandbox/workspace. - Execute validation command(s) on Raspberry Pi.
- Request structured edits from the agent.
- Write remote mutations and store
.sandbox_mutations.json. - Generate runtime
diff.mdreport locally.
diff.md is generated during sandbox runs and is not tracked in git.
The report includes:
- Task summary
- Human-readable rationale
- Commands executed/requested in sandbox
- JSON parse retry/recovery notes
- Unified diffs (
diffformat) for each changed file
Remote changes are applied locally only through explicit sandbox accept.
Running sandbox <instruction> alone does not directly modify local files.
Pi bridge connections use strict SSH host-key validation.
Ensure the Raspberry Pi host key is trusted in local known_hosts before running sandbox commands.
- Sandbox cleanup requires an explicit confirmation phrase and hard-checks the cleanup path.
- Remote cleanup only targets
/home/pi/sandbox/workspace. - Local apply path checks reject writes that escape the repository root.
- Sensitive values (API keys/passwords) are loaded from
.envand should never be committed.
docker build -t desktoppetlite .docker run --rm -it --env-file .env desktoppetlitedocker compose up --buildGUI mode generally requires host display forwarding and platform-specific setup (X11/Wayland on Linux, additional tooling on macOS/Windows).
TUI mode is the recommended default inside containers.
A devcontainer configuration is included at .devcontainer/devcontainer.json for VS Code compatible environments.
Open the repository in a devcontainer and run the same launcher commands from the integrated terminal.