Skip to content

About

A beautiful Linux desktop time tracking app built with Tauri & React.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Patina icon

Patina Linux Fork

Linux port and local AI/API integration fork of Patina.

English · 简体中文

Platform Built with Tauri Local first Status License

Patina dashboard

This fork is the Linux-only edition of Patina. It focuses on GNOME/Linux foreground tracking, browser webpage activity, and a localhost API/MCP surface for external AI analysis. Windows platform sources remain temporarily as frozen compatibility code, but upstream Windows features are no longer tracked and Windows is outside the default CI, release pipeline, validation matrix, and support commitment.

The daemon-backed Linux product line on main has reached stable release. GNOME Wayland is the primary supported environment; KDE and wlroots compositors still need dedicated adapters.

Current Fork Focus

  • GNOME Wayland foreground-window tracking through a GNOME Shell extension and session D-Bus.
  • Linux X11 fallback path where available.
  • Local HTTP API for external scripts, agents, and MCP wrappers.
  • Browser activity sync through local browser extensions.
  • Chromium extension support.
  • Firefox/Zen extension support.
  • Settings diagnostics for window tracking, local API, browser bridge, and Linux autostart.
  • Repair action for Linux ~/.config/autostart/Patina.desktop.
  • Stable custom categories with rename, merge, delete, and excluded-item filtering.
  • HTTP and MCP Agent Skill guidance for external local analysis.
  • The patinad background runtime owns tracking independently of the desktop UI and provides the runtime boundary for future TUI clients.
  • A planned ActivityWatch-style local browser UI served by patinad; Tauri remains the desktop client and can be evaluated independently against future Linux UI frameworks.

Linux-only Development Policy

This repository no longer participates in or continuously tracks the upstream Windows line. External implementations can still be used as ordinary technical references, but there is no feature-parity obligation.

Windows code follows a freeze-then-remove policy:

  • Existing conditional code remains while patinad is stabilized, but receives no new Windows features, tests, or release work.
  • Windows cfgs, dependencies, and sources will be removed in a separate release after daemon ownership is stable.
  • Linux tracking correctness, data safety, desktop usability, and release reliability take priority over platform parity.

Selected cross-platform capabilities already adapted to the Linux product include:

  • History timeline zoom.
  • History category distribution fix when Web Sync is disabled.
  • Custom-category rename/merge and excluded filtering, restricted so built-in categories cannot be renamed or deleted.
  • Upgrade protection for invalid Data bootstrap snapshots.
  • Automatic browser bridge recovery after temporary port conflicts.
  • Removal of the framer-motion runtime while retaining Quiet Pro CSS feedback.
  • Linux-native data-directory and WebView-cache management.
  • App/site activity details, app/category/web trends, safe activity import, and local scheduled backups.

Upstream changes are reviewed for Linux correctness and data-safety value. They are not merged wholesale or used as a version-parity target.

Interface Preview

Today
Today page
History
History page
Data
Data page
Apps
Apps page
Settings
Settings page
About
About page

Current Linux Status

Area Status Notes
GNOME Wayland window tracking Working prototype Uses org.patina.WindowTracker from the GNOME Shell extension.
X11 tracking Implemented fallback / limited verification Used on X11 sessions; GNOME Wayland does not silently fall back to X11.
KDE / wlroots Wayland Not promised Needs compositor-specific work later.
patinad Packaged Linux daemon After first-launch owner migration, the installed Production desktop is a client of patinad.service; closing the UI does not stop tracking. The package itself does not enable the unit. Settings provides migration diagnostics, explicit rollback and confirmed version reload. Patina 1.8.4 and earlier used the embedded desktop runtime; upgrades use the first-launch migration.
Local browser UI Candidate future client A read-only loopback client served by patinad is one option; client priority has not been selected and it is not implemented.
Local API Implemented Binds to 127.0.0.1:14840, uses a bearer token, and exposes daemon capabilities plus an authenticated SSE stream.
MCP wrapper and Agent Skill Implemented npm run mcp:patina; controlled writes cover app/settings, local API configuration, daemon restart verification, and Tools reminders, timers, and pomodoro.
Chromium Web Sync Implemented extensions/chromium.
Firefox / Zen Web Sync Implemented The signed 0.1.1 XPI can be installed directly and identifies Firefox-family forks before generic Firefox.
Linux packaging Stable, candidate and beta pipelines configured Stable and explicit rc tags build x86_64 AppImage and .deb; daemon-backed beta.N tags remain DEB-only.
Local API token/port UI Implemented Settings applies ports atomically and rotates the owner-only API Token separately from browser Web Sync.

Linux Daemon And Releases

The daemon separation developed on feature/patinad-daemon is part of Linux main. The 1.9.1 stable release packages Desktop, patinad, the user unit, and GNOME extension for both AppImage and DEB delivery. Earlier daemon-backed beta.N releases remain DEB-only; use the release list to find prereleases.

Before upgrading, export and verify a backup outside the Patina data directory. Reopen Desktop after package installation; if Settings reports different Desktop/Daemon versions, explicitly confirm Reload background service. Installation alone does not replace an already-running daemon. Reload briefly interrupts tracking and does not download a package.

The 1.9.2 Linux release delivers signed x86_64 AppImage and DEB packages; check Releases for the published assets and current Latest version. The standalone daemon keeps tracking after the desktop closes. AppImage and DEB updates select the matching package type, and older AppImage clients retain a compatible update target. GNOME 42 Wayland remains the declared support environment; GNOME 46 and Fedora GNOME 50 have isolated technical acceptance without an expanded support promise. Widget flicker/docking remains deferred; Flatpak and additional browser/TUI clients are not included.

Quick Start On Linux

1. Install dependencies

npm install

You also need Rust and the Tauri Linux build dependencies for your distribution.

2. Install the GNOME Shell extension

npm run extension:gnome:check
npm run extension:gnome:install
gnome-extensions enable patina-window-tracker@patina

Log out and back in if GNOME Shell keeps an older extension copy.

Verify D-Bus:

gdbus call --session \
  --dest org.patina.WindowTracker \
  --object-path /org/patina/WindowTracker \
  --method org.patina.WindowTracker.GetFocusedWindow

3. Run Patina

npm run tauri dev

The app starts the local API automatically:

http://127.0.0.1:14840

Token path:

${XDG_DATA_HOME:-~/.local/share}/Patina/api_token

Linux Packages

The current stable release workflow produces:

  • Patina_<version>_amd64.AppImage
  • Patina_<version>_amd64.deb
  • patina-gnome-shell-extension-v<version>.zip
  • patina-gnome-shell-extension-esm-v<version>.zip (GNOME 46/50 candidate)
  • patina-chromium-extension-v<version>.zip
  • patina-firefox-extension-v<version>.xpi
  • latest.json

Ubuntu and Debian users should prefer the .deb. Daemon-backed DEBs install the GNOME Shell extension files, patinad, and a default-disabled systemd user unit into system directories. The first Desktop launch handles owner migration; do not manually enable patinad.service while an older embedded Desktop still owns the same Production profile. Patina 1.8.4 and earlier used the embedded runtime. The GNOME extension must still be enabled for the current user:

gnome-extensions enable patina-window-tracker@patina

Log out and back in if GNOME Shell has cached an older extension.

In-app updates preserve the installed package type. AppImage installations download the signed AppImage, while .deb installations download the signed Debian package and request system authorization before installation. The updater manifest keeps a generic AppImage fallback for older clients.

When upgrading from the 1.8.4 AppImage, the old updater may replace the file successfully but restart the old mounted program. If About still shows 1.8.4 after installation, use Quit and reopen the original AppImage file; the updated package then performs the daemon migration. Do not start a second copy or restore an old binary over a migrated database.

The AppImage does not modify system directories:

chmod +x Patina_<version>_amd64.AppImage
./Patina_<version>_amd64.AppImage

GNOME Wayland users must also install the extension archive matching their Shell version. Use the legacy archive for GNOME 42; the separate ESM archive is available for the isolated GNOME 46/50 candidate environments and does not expand the current support promise:

gnome-extensions install --force patina-gnome-shell-extension-v<version>.zip
gnome-extensions enable patina-window-tracker@patina

For GNOME 46/50, replace the archive name with patina-gnome-shell-extension-esm-v<version>.zip. Log out and back in after installing either variant.

Release Validation

Before publishing a Linux tag, run:

npm run release:validate-version-files -- <version>
npm run release:validate-changelog -- <version>
npm run test:release
npm run extension:gnome:check
npm run extension:chromium:check
npm run extension:firefox:check

npm run test:release verifies both release contracts: stable and explicit rc tags build signed AppImage and .deb artifacts with package-aware updater targets, while daemon-backed beta.N tags publish only the signed Debian package and its DEB updater target.

Daemon-backed beta.N releases are a documented exception: they publish only the DEB containing Patina Desktop, patinad, and the systemd user unit. A dual-bundle rc is reserved for public-channel AppImage validation before the stable release.

Browser Web Sync

Patina can record the active webpage URL/title/domain through a browser extension. It does not read page contents, form contents, screenshots, clipboard data, or browser history.

The browser extension port/token shown in Settings are separate from the local API token used by http://127.0.0.1:14840.

Chromium / Chrome / Edge

Use:

extensions/chromium

Open chrome://extensions, enable developer mode, and load the unpacked extension directory.

Firefox / Zen

Use:

extensions/firefox

For temporary development loading, open:

about:debugging#/runtime/this-firefox

Then load extensions/firefox/manifest.json.

For persistent Firefox/Zen installation, install the signed .xpi package.

If you rebuild the extension locally, use extensions/firefox/package.sh to create dist/patina-web-sync-unsigned.xpi, then sign it and replace dist/patina-web-sync.xpi before distribution. npm run extension:firefox:verify-signed checks the signature metadata, version, and packaged background source.

Local API

Set helper environment variables:

export PATINA_API_BASE="http://127.0.0.1:14840"
export PATINA_API_TOKEN="$(cat "${XDG_DATA_HOME:-$HOME/.local/share}/Patina/api_token")"

Example:

curl -s "$PATINA_API_BASE/api/v1/diagnostics" \
  -H "Authorization: Bearer $PATINA_API_TOKEN"

Main endpoint index:

Implemented API groups include diagnostics, current activity, sessions, summaries, trends, web activity, apps, tracker settings, local API configuration, external AI context, and Tools reads/writes. The local API also exposes GET /api/v1/openapi.json with a field-level OpenAPI 3.1 schema.

MCP Wrapper

The MCP wrapper maps MCP tool calls to the local API:

npm run mcp:patina

It reads:

  • PATINA_API_BASE
  • PATINA_API_TOKEN
  • PATINA_API_TOKEN_FILE

Current tools include:

  • get_diagnostics
  • get_local_api_configuration, set_local_api_port, rotate_local_api_token
  • get_current_activity
  • query_sessions
  • get_active_session
  • get_today_summary
  • get_week_summary
  • get_activity_trend
  • query_web_activity
  • get_activity_context
  • get_tools_snapshot
  • create_reminder, cancel_reminder
  • timer and pomodoro control tools
  • list_apps
  • classify_app
  • rename_app
  • set_app_excluded

See docs/mcp-wrapper.md for MCP client setup, tool-to-API mapping, and remaining write-side gaps.

For MCP client configuration, invoke scripts/patina-mcp.ts directly with Node and an absolute path. npm run mcp:patina is intended for manual repository use.

Agent Skill

skills/analyzing-patina-activity provides two external-agent workflows:

  • MCP tools when the Patina MCP server is configured.
  • Direct localhost HTTP with bearer authentication as a fallback.

Both workflows share rules for diagnostics-first analysis, local-time boundaries, active-session handling, URL privacy, and explicit confirmation before all writes.

Useful Checks

npm run build
npm run test:release
npm run test:settings
npm run extension:gnome:check
npm run extension:chromium:check
npm run extension:firefox:check
node --experimental-strip-types --experimental-specifier-resolution=node tests/patinaMcpScript.test.ts
cargo check --manifest-path src-tauri/Cargo.toml --quiet

Project Background

Patina is a personal, local-first desktop time tracker. It automatically records foreground apps, handles AFK/lock/sleep/crash boundaries, stores data locally in SQLite, and provides dashboard/history/data/app-management views.

This fork targets Linux exclusively for product development, validation, and releases while exposing stable local structured data for external AI analysis.

Documentation

License

MIT

About

A beautiful Linux desktop time tracking app built with Tauri & React.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages