Thank you for your interest in contributing to Shelly! This guide explains the project structure and how the components interact.
Shelly is organized into several interconnected projects:
| Project | Description |
|---|---|
| Shelly.UI.GTK | GTK UI Frontend |
| Shelly.CLI.Zig | Command-line interface for terminal-based package management |
| Shelly-Notifications | Application to handle tray services and notifications. |
| Shelly.Http | Standalone HTTP client and compatibility TLS implementation |
| Shelly.PackageManager | Core libalpm/AUR/AppImage library and backend-neutral Flatpak facade |
| Shelly.Flatpak.Backend | Optional ABI-versioned shared library containing generated libflatpak bindings and native operations |
| Shelly.Utilities | Shared utility classes and extensions used across projects |
┌─────────────────────────────────────────────────────────────────────────────┐
│ USER │
└──────────┬──────────────────────────┬────────────────────────────┬──────────┘
│ │ │
▼ │ ▼
┌──────────────┐ │ ┌────────────────┐
│ │ ─────────────────┼─────────────────► │ │
│ Shelly-Notif │ ▼ │ Shelly-CLI │
│ │ ◄─┐ ┌────────────────┐ sudo │ (Terminal) │
│ │ │d-bus│ │ ────────► │ │
└───────┬──────┘ └─────┤ Shelly-UI │ └──────┬─────────┘
│ d-bus │ (GTK) │ │
└───────────────► │ │ │
└────────────────┘ │
│
┌──────────────────────────┘
▼
┌───────────────────┐
│ PackageManager │
│ (core) │
└─────────┬─────────┘
┌──────────┼───────────┐
│ │ │
▼ ▼ ▼
┌─────────┐ ┌────────┐ ┌─────────┐
│ libalpm │ │ AUR │ │ flatpak │
│ Backend │ │ API │ │ Backend │
└─────────┘ └────────┘ └─────────┘
-
Shelly-UI ↔ Shelly-CLI: The UI launches the CLI via
sudowith--ui-modeflag for privileged operations ( install, remove, upgrade). The CLI outputs structured frames that the UI parses for progress updates. -
**Shelly-CLI uses the PackageManager library for:
- ALPM operation
- AUR package management (
- Flatpak operations
- AppImage Operations
-
Shelly-Notifications uses the d-bus to communicate with the UI process, tray icon, and notifications.
-
PackageManager → System:
- Directly interfaces with
libalpmfor native package operations - Calls AUR API for package searches and metadata
- Lazily loads
/usr/lib/shelly/libshelly-flatpak-backend.so.1for Flatpak operations; PackageManager itself does not link libflatpak
- Directly interfaces with
-
Shelly-UI should never directly interact with the PackageManager library. All operations should be performed via the CLI.
# Exercise the optional-backend boundary, CLI, and core-only smoke tests
scripts/test-flatpak-separation.sh
# Build individual native projects
(cd Shelly.Flatpak.Backend && zig build)
(cd Shelly.Http && zig build)
(cd Shelly.PackageManager && zig build)
(cd Shelly.Cli.Zig && zig build)
(cd Shelly.Ui.Gtk && zig build)(cd Shelly.Flatpak.Backend && zig build test)
(cd Shelly.Flatpak.Backend && zig build abi-test)
(cd Shelly.Flatpak.Backend && zig build parity-test)
(cd Shelly.Flatpak.Backend && zig build integration-test)
(cd Shelly.Http && zig build test)
(cd Shelly.PackageManager && zig build test)
(cd Shelly.PackageManager && zig build flatpak-test)
(cd Shelly.Cli.Zig && zig build test)All generated libflatpak declarations, GObject pointers, and native Flatpak
calls must remain under Shelly.Flatpak.Backend. Consumers use owned records
from Shelly.PackageManager/src/flatpak/types.zig; never expose a generated
binding type in a public PackageManager declaration.
Protocol schema 2 rejects unknown and duplicate fields. Add a new operation by
updating the wire inventory, backend dispatch, PackageManager facade, fake
backend coverage, and parity tests together. Run
scripts/check-flatpak-separation.sh before submitting a change.
An incompatible C table change requires an ABI version and SONAME bump. An
incompatible JSON change requires a schema bump. Update the exact
base/backend package dependency in the same release. The complete ownership,
threading, discovery, and bump procedure is in
docs/flatpak-backend-abi.md.
- Code Style: Follow the existing code style in each project
- Testing: Add tests for new functionality in the appropriate test project
- Documentation: Update relevant documentation when adding features
- Commits: Use clear, descriptive commit messages
If you're interested in helping localize Shelly into your language, please follow the steps below
Navigate to:
├── Shelly-UI/
│ ├── po/
This folder contains the localization files used by the application.
- Build the application
- Verify that the application builds and starts correctly
- Confirm that all UI elements are translated and that no unexpected fallback to English occurs
Once these steps are validated, please submit a pull request.
If you have questions or need help, please open an issue on the GitHub repository or join or community https://fluxer.gg/hAxUFvJP