This repository is a community distribution and feature-extension framework for OpenAI's ChatGPT desktop application on Linux. It does not contain the core ChatGPT application itself; instead, it verifies, repackages, and patches the official signed upstream .deb package to produce customized builds for multiple Linux package formats (deb, RPM, pacman, AppImage, Nix, Gentoo ebuild). The system adds over 40 optional Linux-specific features—such as system tray integration, global dictation, computer-use automation (window management, accessibility, screenshots), desktop recording/replay, text-to-speech, proxy authentication, and UI tweaks—each gated behind a declarative feature manifest and applied via a sophisticated patch engine that modifies the Electron app bundle at build time. Architecturally, the project is a build/packaging/update framework. The core is a patch engine (scripts/patches/) that applies declarative descriptors to the upstream app.asar in phases (main-bundle, webview-asset, extracted-app). Features live under linux-features/ with standardized manifests (feature.json), patch scripts (patch.js), stage hooks, and tests. Performance-critical subsystems are implemented in Rust: a computer-use backend (window management, input simulation, accessibility tree), a record-replay backend (desktop session capture, timeline events, skill drafting), a text-to-speech MCP server, a global dictation helper, and a self-updating package manager daemon. The launcher (start.sh.template) orchestrates environment setup, feature hooks, and CLI dispatch. Key entry points include the installer (install.sh), the feature picker GUI (scripts/feature-picker.py), the patch runner (scripts/patches/runner.js), and the updater daemon (updater/src/main.rs). Data flows are primarily build-time: the upstream .deb is downloaded, verified via GPG/SHA256, extracted, patched, and repackaged. At runtime, features like computer-use and record-replay communicate with native Rust backends over MCP/JSON-RPC. The updater daemon runs as a systemd user service, polling signed APT metadata and performing transactional rebuilds with rollback support. External dependencies include the upstream OpenAI .deb package (the sole ground-truth source), Node.js for patching, Rust for native components, and various Linux system tools (systemd, D-Bus, GNOME Shell, X11/Wayland utilities, ydotool, wmctrl, xdotool, secret-tool). The build system uses Make, Docker for CI, and supports multiple package managers. The project is heavily dependent on the upstream bundle's minified JavaScript structure, which it manages through contract-based patching with drift detection.
mkosi is a command-line tool for building customized, bootable OS images. It wraps distribution package managers (dnf, apt, pacman, zypper, apk) and deeply integrates with systemd components (systemd-nspawn, systemd-repart, systemd-boot, systemd-vmspawn, ukify) to produce disk images, containers, unified kernel images, initrds, and extension images. The tool supports multiple output formats (disk, tar, cpio, uki, esp, sysext, confext, portable, oci, directory, addon) and can generate images for a wide range of Linux distributions including Fedora, Debian, Ubuntu, Arch, CentOS, openSUSE, and more. The architecture is a modular Python application with a central build pipeline orchestrated in mkosi/__init__.py. Configuration is handled via layered INI-style files with conditional [Match]/[Assert] sections, allowing complex multi-image builds. A sandbox abstraction (sandbox.py) isolates tool execution using Linux namespaces, mounts, and seccomp filters. Distribution-specific installers are registered via a class registry pattern in mkosi/distribution/__init__.py. The tool also provides standalone subcommands: mkosi-initrd, mkosi-addon, mkosi-sandbox, each with its own entry point. Key features include incremental caching, SecureBoot signing, verity and TPM support, kernel-install integration, tools tree for reproducible builds, and a comprehensive manifest generation. The codebase is well-structured with clear separation between configuration, sandboxing, package management, and image creation. It has extensive tests (pytest with integration markers) and active CI.