Introducing a new way to review your PRs.

Read the announcement

aprilnea / openlogi

⚡️A native, local-first alternative to Logitech Options+, written in Rust 🦀 — remap buttons, DPI, and SmartShift over HID++. No account, no telemetry.

View on GitHub

25 documents · Updated Nov 23, 2026

docs / distribution-and-ci

Distribution packaging and CI

OpenLogi turns the Rust workspace into platform packages and checks those packages before release. Linux packages provide the command line tool, desktop app, background agent, device access rules, and desktop integration. Windows packages provide the same app roles in portable and per-user installer forms. GitHub Actions builds, signs, checks, and publishes these outputs from one shared release path. See Build and release automation for the wider release model.

Distribution model

The distribution model keeps the product roles together at install time. The desktop app is the user-facing control surface, the background agent owns device work, the overlay supports on-screen actions, and the openlogi command provides device reports and diagnostics. A usable package therefore ships the related binaries as one product set rather than treating the desktop app as a standalone executable.

Linux distribution

The Linux inputs in packaging/…/nfpm.yaml describe native packages for Debian, RPM, and Arch-based systems. They install the four product binaries with udev rules, a user systemd service, a desktop launcher, icons at standard hicolor sizes, and license files. The desktop launcher identifies the OpenLogi window as belonging to that launcher, so the desktop session can group it under the OpenLogi icon. The package also declares the runtime libraries needed by the graphical desktop on Debian and Arch-based systems. The udev rules give the active desktop user access to supported HID, input, and virtual input devices without requiring membership in a shared input group.

The packaged user agent starts after the graphical session and restarts after a failure. Native packages run it from /usr/bin/openlogi-agent, while the direct install path rewrites the same unit for its selected prefix. This keeps agent startup consistent across native and custom-prefix installs.

The repository also provides a Flatpak bundle for systems where native package formats are not the normal install route. The bundle carries the four product binaries, desktop launcher, software-center metadata, icons, licenses, and a copy of the udev rules. Its sandbox provides the display, graphics, device, network, and media-player access needed by the product, but the host must still install the udev rules because a Flatpak cannot write /etc/udev/rules.d. CI builds single-file amd64 and arm64 bundles and stamps the AppStream release from the workspace version and source commit date. The bundle is a one-time install artifact rather than a remote update channel.

The repository also supports a direct install path through packaging/…/install.sh. In release mode, the script detects the Linux architecture and package manager, downloads the selected package, and verifies its minisign signature and exact SHA-256 entry before it invokes the package manager. In source mode, it installs the four release binaries and shared Linux resources under a chosen prefix, then rewrites the agent service for that prefix. The script can skip agent startup or print privileged actions without running them. The mocked smoke test checks these validation, trust, privilege, service, and source-install boundaries without network or system-file access. Removal stops the user agent and removes the installed integration files through packaging/…/uninstall.sh.

References: packaging/…/nfpm.yaml• L11-134 packaging/…/openlogi.desktop• L1-15 packaging/…/70-openlogi.rules• L1-40 packaging/…/openlogi-agent.service• L13-24 packaging/…/install.sh• L39-64 packaging/…/install.sh• L192-357 packaging/…/install.sh• L385-469 packaging/…/install-smoke.sh• L219-365 packaging/…/uninstall.sh• L29-79 packaging/…/org.openlogi.OpenLogi.yml• L27-144 packaging/…/org.openlogi.OpenLogi.desktop• L1-15 packaging/…/org.openlogi.OpenLogi.metainfo.xml• L14-42 .github/…/build.yml• L872-1152

Windows distribution

The Windows distribution has two user-facing forms. The portable ZIP keeps the desktop app beside its agent and overlay helpers, with the CLI in a bin directory so the GUI name and command name remain distinct. The MSI installs the GUI, agent, overlay, and CLI as one per-user package under the local application directory. It adds a Start Menu entry and a user PATH entry for the CLI, so normal users do not need administrator access.

The Windows build signs all four executables before it creates the portable ZIP. A separate MSI build consumes the matching ZIP contents and signs the MSI as its own release artifact. Its upgrade behavior closes the running product processes so an update does not remain blocked by open files. Separate upgrade identities keep x64 and arm64 installations from cross-grading one another. An interactive first install can offer to start the app after setup, while staged updates remain non-interactive.

References: packaging/…/OpenLogi.wxs• L7-23 packaging/…/OpenLogi.wxs• L27-59 packaging/…/OpenLogi.wxs• L62-113 packaging/…/OpenLogi.wxs• L115-175 packaging/…/OpenLogi.wxs• L177-222 packaging/…/OpenLogi.wxs• L224-260 .github/…/build.yml• L454-691 .github/…/build.yml• L692-871

Nix distribution

The Nix path packages the same Linux product roles through the flake in packaging/flake.nix and exposes a NixOS module. The package installs the binaries and desktop integration into the Nix store. The module can add the package, device rules, and a user agent service that starts with graphical sessions or remains manually started. The root flake remains a deprecated alias for existing repository inputs.

The package uses a filtered source that keeps the Rust workspace, Linux integration files, and required test data together while leaving unrelated documentation and release metadata out of the package input. Rust registry dependencies follow the checksums in Cargo.lock, while pinned Git dependencies use fixed source hashes. The package also pins the GPUI component source used for GUI themes, so its revision and hash must match the lock file. Its version follows the workspace manifest, and its checks verify the production binaries, device rules, desktop entry, icons, and user service after installation. The inputs for this path are pinned in packaging/flake.lock.

The package selects only the four production binaries and checks that the binaries, device rules, desktop entry, icons, and user service are present after installation. It rewrites the user service to the Nix store path and adds the graphics runtime paths needed by the desktop app. Nix CI evaluates the flake and builds the package plus the NixOS module on x86_64 and ARM64 Linux. A separate developer-shell check protects the local tool set without mixing shell changes into application package rebuilds.

References: packaging/flake.nix• L4-16 packaging/flake.nix• L22-43 packaging/flake.nix• L44-113 packaging/flake.lock• L1-48 packaging/…/package.nix• L44-123 packaging/…/package.nix• L145-220 packaging/…/openlogi-agent.service• L13-24 packaging/…/nixos-module.nix• L8-39

GitHub automation

GitHub Actions separates code validation from package production. The normal CI workflow checks Rust quality and platform-specific code without publishing anything. The reusable build workflow then provides one packaging definition for pull request checks, manual builds, and signed releases.

Continuous integration

The CI workflow in .github/…/ci.yml runs for pull requests and pushes to the main branches. It checks formatting, spelling, source rules, shell quality, publish policy, clippy warnings, documentation for non-GUI crates, dependency policy, and workspace tests. A path check decides whether platform test jobs are needed, so changes outside source or packaging inputs do not start those jobs. Linux, macOS, and Windows cover their platform-specific code paths, while an MSRV matrix checks the Rust version promised by the workspace on Linux and macOS.

The workflow also checks selected portable crates for WebAssembly. This is a portability gate rather than a browser deliverable. It treats warnings as errors, cancels superseded runs, and uses shared compiler caches with writes limited to the main branches. The ci-results job collects every check into one required status and fails when a dependency fails or is cancelled. The local cargo xtask ci command and the CI command map provide a local counterpart to the GitHub jobs, so workflow commands must stay aligned with those entry points.

References: .github/…/ci.yml• L7-54 .github/…/ci.yml• L56-143 .github/…/ci.yml• L164-250 .github/…/ci.yml• L256-324 .github/…/ci.yml• L326-464 .github/…/ci.yml• L466-530 xtask/README.md• L3-15

Translation synchronization

The Crowdin workflow keeps non-English locale catalogs aligned with the English source catalog. It runs on a schedule, on demand, and when the English source or translation settings change on master.

The workflow uploads the source and existing translations to Crowdin before it downloads a sparse export. It snapshots the complete catalogs first, then merges the export so omitted or untranslated keys remain available and English values do not replace real translation work. If the merge produces changes, the workflow pushes an crowdin/i18n branch and opens a pull request. It uses a GitHub App token for that branch operation, while the fill-in report remains an informational metric rather than a release gate.

References: .github/…/crowdin.yml• L1-28 .github/…/crowdin.yml• L30-73 .github/…/crowdin.yml• L75-119 .github/…/crowdin.yml• L121-157

Package build orchestration

The reusable workflow in .github/…/build.yml builds the release outputs for macOS, Windows, and Linux. Pull requests opt in with the needs: build label, and manual runs can build unsigned artifacts. Release calls the same workflow with signing enabled, which keeps test packages and release packages on the same assembly path without requiring secrets for unsigned runs.

The build first compiles the Rust workspace products for each target. It then applies the platform package rules: Linux creates .deb, .rpm, Arch, and Flatpak packages; Windows signs the four executables and makes the portable ZIP, then a separate MSI leg wraps those signed inputs in a per-user installer; and macOS creates the signed or unsigned DMG and can create update deltas for tagged releases. Linux native builds use amd64 and ARM64 hosts with a GLIBC 2.35 baseline. Windows builds cross-compile ARM64 on the x86_64 runner. Platform legs verify their architecture and upload named artifacts. A result job reports each leg separately so a release can distinguish a missing optional platform artifact from a missing macOS release gate.

Release builds can pass two version values into this shared path. A stable build uses the workspace version. A beta build stamps its release version into the workspace before it creates packages and update metadata, while its numeric build version keeps update systems in the correct order. Unsigned manual builds can also test a proposed stamp without using release credentials.

This diagram shows how the workspace outputs become platform artifacts and then move to the release publisher.

flowchart LR
    W[Rust workspace] --> L[Linux release binaries]
    W --> X[Windows release binaries]
    W --> M[macOS app bundle]
    L --> LP[DEB RPM Arch packages]
    L --> LF[Flatpak bundles]
    X --> S[Signed executables]
    S --> Z[Portable ZIP]
    Z --> I[Per-user MSI]
    M --> D[DMG]
    LP --> P[Release publisher]
    LF --> P
    Z --> P
    I --> P
    D --> P

References: .github/…/build.yml• L1-101 .github/…/build.yml• L152-452 .github/…/build.yml• L454-871 .github/…/build.yml• L872-1152 .github/…/build.yml• L1153-1182 xtask/README.md• L16-27 Cargo.toml• L1-26

Release publication

The release workflow in .github/…/release.yml starts from a v* tag. It checks the tag against the workspace version or beta release rules, pauses for one release approval, builds signed platform artifacts, creates release notes, computes SHA-256 checksums, and adds detached minisign signatures. It uploads release files to GitHub and updater files to Cloudflare R2. The stable channel manifest and macOS appcast feeds point clients to versioned assets and are published before the GitHub Release becomes final. The release job verifies that the public key embedded in the Linux installer matches the configured updater public key before signing and upload.

Windows and Linux artifacts are best-effort at the final publish gate. The macOS DMG and release notes are required for publication, while any successfully built Windows or Linux artifacts are added with their checksums and signatures. The Linux installer is staged only when both Linux native package legs complete, so the installer site is notified only when that installer is present. Flatpak bundles follow the same best-effort artifact path as the other Linux packages.

Manual workflow runs build unsigned artifacts without publishing a GitHub Release, changing an updater channel, or notifying downstream package services. Only tag runs enter the signed publication path. A single publish job serializes channel updates so two releases do not write shared updater files at the same time. A partial publish must not be re-run against the immutable release; a later tag supplies missing optional artifacts instead.

References: .github/…/release.yml• L3-72 .github/…/release.yml• L73-96 .github/…/release.yml• L97-139 .github/…/release.yml• L161-247 .github/…/release.yml• L255-340 .github/…/release.yml• L342-470 .github/…/release.yml• L472-505 .github/…/release.yml• L507-583 .github/…/build.yml• L36-55

Version and tag flow

The workspace uses one shared version from the root Cargo.toml. release-plz opens a release pull request, updates the published crates as one version group, and cuts the stable v{version} tag only from the release commit. The tag triggers the artifact workflow; release-plz does not create the GitHub Release itself.

The release pull request also carries the whole-repository changelog. The workflow writes that changelog and uses its current release section as the pull request body. On release, the workflow checks out the version-bump commit and verifies the publish closure before it runs the release command. This keeps the released source revision tied to the version change rather than to a newer master tip.

The release workflow keeps the GitHub Release mutable while it uploads all assets. This separates version control from artifact assembly: the version tool decides which source revision is released, and the release workflow decides which signed packages and update metadata users receive.

References: Cargo.toml• L28-40 release-plz.toml• L1-38 release-plz.toml• L40-130 .github/…/release-plz.yml• L1-18 .github/…/release-plz.yml• L47-162 .github/…/release-plz.yml• L163-222 .github/…/release.yml• L26-72

Beta tag flow

The prerelease workflow creates a beta tag from the master commit selected when the manual run starts. It first finds an open release-plz/ pull request that contains that commit, then uses the release pull request version and the stable release tag to name the next beta. This makes the beta use the version that the pending release is preparing without silently moving to a newer commit.

The workflow supports a dry run that reports the tag without creating it. A real run uses a GitHub App token to create the tag, because a tag pushed with the default workflow token would not start the release workflow. The new tag then enters release.yml, which validates it, stamps the beta version into the build, and publishes it to the beta channel.

References: .github/…/prerelease.yml• L1-13 .github/…/prerelease.yml• L15-39 .github/…/prerelease.yml• L40-101 .github/…/prerelease.yml• L103-148 .github/…/release.yml• L26-96

Nix automation

The Nix workflow validates formatting and evaluates every advertised output on pull requests that affect the Nix or package dependency inputs. It checks both the current packaging/ flake and the deprecated root alias. It then builds and checks the package and NixOS module on x86_64 and ARM64 Linux. It also runs on a weekly schedule to catch drift between the Rust source and the Nix package. A separate scheduled workflow updates packaging/flake.lock in a pull request, so upstream Nix changes enter through the same checks as normal work. The generated pull request uses a GitHub App token so it starts the Nix checks.

The developer-shell workflow checks the pinned devenv environment when its input files change. It formats the developer shell from the packaging/ flake and then builds the shell. This protects the local tool set that supports the Rust and packaging commands without mixing developer-shell changes into application package rebuilds.

References: .github/…/nix.yml• L1-39 .github/…/nix.yml• L41-104 .github/…/update-flake-lock.yml• L1-61 .github/…/devenv.yml• L1-45 packaging/flake.nix• L14-16 packaging/flake.lock• L1-48

Stale allow checks

The stale-allow workflow checks whether lint suppression attributes still hide a warning on any supported platform. It runs weekly, on demand, and when its lint logic changes. Separate Linux, Windows, and macOS lanes produce reports. A final lane merges all reports so a platform-specific lint cannot be judged stale from one host alone.

References: .github/…/stale-allows.yml• L1-34 .github/…/stale-allows.yml• L35-91 .github/…/stale-allows.yml• L92-119

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the four product binaries aligned across packaging/…/nfpm.yaml, the Flatpak manifest, packaging/…/install.sh, packaging/linux/package.nix, the Windows ZIP staging, and the MSI inputs. Keep the Windows CLI in its separate bin location so it does not collide with the GUI executable name.
  • Keep Linux package contents, Flatpak contents, and Nix package contents aligned when changing desktop launch, udev access, systemd startup, icons, or product roles. Keep the desktop launcher's StartupWMClass aligned with the GUI application ID.
  • Keep the Linux service command aligned with each install path. Native packages use /usr/bin/openlogi-agent, while custom-prefix and Nix installs must point to their own installed binary.
  • Keep the Windows executable list aligned between the release signer, signature checks, ZIP staging, MSI source defines, and the signing dry-run workflow. Keep MSI process-close rules aligned with the names of all binaries that can hold the install directory.
  • Keep the release artifact extensions aligned across checksum creation, minisign signing, R2 upload, updater manifest generation, and GitHub Release upload. Include .flatpak when changing Linux artifact handling.
  • Keep the installer public key aligned between packaging/…/install.sh and the release updater publishing configuration.
  • Keep the beta version flow aligned between prerelease.yml, release.yml, the reusable build inputs, and the xtask release commands. A signed beta needs both its stamped version and numeric build version.
  • Keep the GitHub App token path for beta tag creation. A tag made with the default workflow token will not trigger the release workflow.
  • When changing the workspace version or Rust floor, update the root manifest, release-plz version group, and MSRV workflow together. Keep the CI toolchain setting aligned with the declared Rust floor.
  • Keep each CI run command aligned with cargo xtask ci and .claude/…/ci.md, so local checks and GitHub checks cover the same work. Keep every CI job in the ci-results dependency list when adding or renaming a required check.
  • Keep the stale-allow report matrix complete when changing its sweep or verdict commands. All three platform reports are needed for a valid result.
  • When changing Nix inputs or package files, check packaging/flake.nix, packaging/flake.lock, the lock update path, and the Nix CI path filter. Keep the root alias in step with the supported packaging flake. Keep a moved GPUI Git revision aligned with its outputHashes and theme checkout hash.
  • When changing the Nix source filter or selected package outputs, keep the workspace files needed by package checks and the installed production set aligned with the Nix install checks.
  • Keep en.toml as the Crowdin source of truth. Preserve the snapshot-and-merge path so sparse exports do not delete keys or turn untranslated entries into English fill-in.
  • Keep translation branch pushes and Nix lock update pull requests on GitHub App tokens. Default workflow tokens do not start the downstream checks needed for those generated changes.
  • Keep the release approval, tag-only signing gate, best-effort artifact rules, and single publish concurrency aligned when changing release conditions. Do not make optional platform artifacts block the macOS release gate.

Important failure modes

TriggerConsequenceGuard
A package omits openlogi-agent or openlogi-overlayThe desktop app can start without its device or overlay service.The Linux package inputs, Flatpak manifest, and Windows staging require the complete product set before upload.
The Windows CLI is placed beside the GUIWindows treats the two executable names as the same path and one file can replace the other.The MSI and portable layout keep openlogi.exe in bin and place that directory on the user's PATH.
A Windows runner builds for the wrong architectureThe artifact label can claim x86_64 or ARM64 while containing another target.Each matrix leg checks the runner architecture or target pairing before packaging.
A Windows signer or updater key is missingA release build cannot produce a trusted installer or a working signed-update configuration.Signed jobs load and validate their protected configuration before signing or release assembly.
A Linux GUI dependency is absent from the build runnerThe release package fails at link time instead of producing a package.Linux CI, native Linux packaging, and the Flatpak SDK setup provide the graphics and device dependency set each path needs.
The packaged user service points to a missing binaryThe agent does not start at the graphical session or after a failure.Package checks verify the installed service command, and custom-prefix installs rewrite it to the selected prefix.
The desktop launcher ID does not match the GUI application IDThe desktop environment can show a generic or duplicate application icon.Native and Flatpak launchers declare the application identity used by the GUI.
Flatpak host udev setup is missingThe Flatpak has a device path but cannot access supported devices.The metadata documents the host step and the bundle ships the same udev rules used by native packages.
Flatpak AppStream metadata is not restampedA software center can advertise a release that does not match the bundle.CI derives the version and date from the source tree being built.
A release installer key differs from the updater keyThe installer and update channel can trust different artifact authorities.Release publication compares the embedded installer key with the configured update public key.
The install script accepts a bad signature or checksumAn altered package could reach the package manager.The installer smoke test covers both failures, and the script verifies before privilege escalation.
A CI command changes without its local command mapLocal CI can stop checking the same work as GitHub Actions.The workflow requires changes to stay aligned with cargo xtask ci and .claude/…/ci.md.
A new CI job is absent from ci-resultsThe job can fail without blocking a merge.The aggregate status lists every job and fails on a failed or cancelled dependency.
No macOS DMG reaches the publish jobThe GitHub Release is not published, even if other artifacts exist.The publish condition requires the macOS result and checks for at least one DMG.
A best-effort Windows or Linux leg failsThe release contains fewer platform artifacts than expected.Per-platform results and artifact detection publish only files that passed their build and signature gates.
A beta tag has no matching release pull request or uses the wrong source commitThe beta cannot receive the intended version or may release an unintended source revision.The prerelease workflow requires an open release pull request containing the selected master commit and creates one tag at a time.
A signed beta has a stamp but no numeric build versionThe macOS update system can order the beta incorrectly and reject the intended update path.The build gate refuses signed stamped builds without the release-derived build version.
The GPUI revision and Nix source hash do not match the lock fileThe Nix package cannot fetch or build the GUI theme source.The package pins the revision and hash in both the theme checkout and Cargo lock output mapping.
The filtered Nix source omits workspace test data or package inputsThe Nix package build or its checks fail even though the full checkout works.The package source filter includes the workspace, recorded fixtures, Linux integration files, and packaging inputs used by the checks.
The Nix package lacks runtime graphics pathsThe installed desktop app can build but fail to start its selected graphics backend.The package adds the graphics library paths that are selected at runtime.
The locked Nix input drifts without reviewNix evaluation or package behavior can change outside a source change.Scheduled lock updates use a pull request, and Nix CI evaluates and builds both supported systems.
A stale-allow verdict is merged with a missing platform reportA platform-specific suppression can be called stale by mistake.The verdict waits for all Linux, Windows, and macOS sweep reports.
Crowdin downloads a sparse catalog without a before-snapshot mergeUntranslated keys can disappear or become English fill-in in the translation pull request.The workflow snapshots complete catalogs and merges only real translated changes back into them.
Crowdin or Nix automation pushes with the default workflow tokenThe generated branch or pull request does not start the downstream workflow it needs.Both workflows mint a GitHub App token before they push or create the pull request.
A partial release is re-run after GitHub Release publicationThe run can fail against immutable release assets or overwrite shared updater data.The publish path documents the partial result and waits for a later release tag rather than re-running publish.

Key files

FileWhy to read it
Cargo.tomlDefines the Rust workspace, default application member, shared version, and Rust floor used by builds and release automation.
packaging/…/nfpm.yamlShows the Linux package contract and the system files that make the installed product usable.
packaging/…/org.openlogi.OpenLogi.ymlShows the Flatpak runtime, sandbox permissions, product binaries, desktop integration, and host udev resource.
packaging/linux/flatpak/org.openlogi.OpenLogi.desktopShows the Flatpak desktop launcher and the application identity used for window grouping.
packaging/…/org.openlogi.OpenLogi.metainfo.xmlShows the software-center description and the host setup needed for device access.
packaging/linux/desktop/openlogi.desktopShows the native Linux desktop launcher and the application identity used for window grouping.
packaging/…/install.shShows the verified release install and direct Linux source-install paths.
packaging/…/install-smoke.shShows the install script's safety contract without real network or system changes.
packaging/flake.nixShows the supported Nix package, NixOS module, systems, checks, and formatter.
packaging/flake.lockPins the Nix inputs used by the distribution flake.
packaging/linux/package.nixShows the reproducible Nix package, filtered source, production binary selection, runtime support, and install checks.
packaging/linux/systemd/openlogi-agent.serviceShows the user agent's session startup, restart behavior, and packaged executable path.
packaging/linux/nixos-module.nixShows how NixOS enables the package, device rules, and user agent service.
packaging/windows/OpenLogi.wxsShows the Windows per-user installer layout, CLI path, first-run launch option, and upgrade process handling.
.github/…/ci.ymlDefines the code, platform, dependency, portability, source-rule, Rust-version, cache, and aggregate status checks that protect changes.
.github/…/build.ymlDefines the shared unsigned and signed platform artifact assembly path, including Flatpak, the portable ZIP, and the MSI.
.github/…/crowdin.ymlDefines the scheduled and source-triggered translation sync, catalog merge, and translation pull request path.
.github/…/prerelease.ymlDefines the guarded beta tag flow from the pending release version to the release workflow.
.github/…/release.ymlDefines release approval, notes, checksums, signatures, updater publishing, downstream dispatches, and GitHub Release publication.
.github/…/stale-allows.ymlDefines the cross-platform check for lint suppressions that no longer suppress a warning.
.github/…/release-plz.ymlDefines the version pull request, whole-repository changelog, and source revision that can create a release tag.
.github/…/nix.ymlDefines Nix evaluation, scheduled drift checks, and package checks for x86_64 and ARM64 Linux.
.github/…/update-flake-lock.ymlDefines the reviewed automation that updates packaging/flake.lock.
.github/…/devenv.ymlDefines the developer-shell formatting and build check.
xtask/README.mdMaps the repository task entry point to local CI, package, bundle, and release metadata commands.
docs/build-release-automation.mdProvides the parent overview for how build and release automation fits together.