Skip to main content

Install and update .deb and binary releases from GitHub

Project description

aptator

A lightweight Python utility to automatically check and install the latest releases of applications from GitHub repositories as Debian packages.

Features

  • Automatic version checking: Compares installed package versions against the latest GitHub release
  • Selective installation: Uses regex patterns to match specific .deb assets from releases
  • XDG config directory support: Stores configuration in ~/.config/aptator/aptator.toml
  • TOML configuration: Human-readable configuration format using Python's built-in tomllib
  • Standard library only: No external dependencies (Python 3.11+)
  • Error handling: Graceful error reporting for individual package failures

Installation

pipx install aptator

Configuration

Configuration is stored in ~/.config/aptator/aptator.toml and uses TOML format.

Configuration Format

[[packages]]
name = "Display Name"
repo = "owner/repository"
asset_pattern = ".*_amd64\\.deb$"
package_name = "debian-package-name"
action = { type = "deb-install" }

Configuration Fields

  • name: Human-readable name of the application
  • repo: GitHub repository in the format owner/repository
  • asset_pattern: Regular expression pattern to match the desired .deb asset filename
  • asset_version_pattern: Regular expression pattern to extract the version from the asset filename. Should contain one capture group () for the version string. Defaults to (.*) (entire filename as version). Optional.
  • prerelease: Boolean to allow pre-release versions. Defaults to false. Optional.
  • action: The action option specifies what should be done with the downloaded asset. It determines how the asset is processed, installed, or linked. Below are the supported action types and their descriptions:
    • Depending on the type, additional fields may be required (e.g., command for exec, url for download-extract-and-link).
    • This modular approach allows aptator to support a wide range of installation and setup workflows.

Supported Action Types

  1. deb-install

    • Installs the downloaded .deb package using dpkg.
    • Example:
      action = { type = "deb-install" }
      
  2. exec

    • Executes a custom shell command.
    • Example:
      action = { type = "exec", command = "sudo apt update && sudo apt install -y example" }
      
  3. download-extract-and-link

    • Downloads an asset, extracts it to a specified directory, and creates a symbolic link.
    • Fields:
      • url: The URL to download the asset from.
      • extract_to: The directory where the asset will be extracted.
      • link_to: The target location for the symbolic link.
    • Example:
      action = { type = "download-extract-and-link", url = "https://example.com/app.tar.gz", extract_to = "/opt", link_to = "/usr/local/bin/app" }
      

Asset Version Pattern Examples

The asset_version_pattern uses regex capture groups to extract the version from the asset filename:

# Extract version from "freetube-0.19.1_amd64.deb"
# Result: 0.19.1
asset_version_pattern = "freetube-([0-9.]+)"

# Extract version from "app-v1.2.3-beta_amd64.deb"
# Result: v1.2.3-beta
asset_version_pattern = "app-(v[0-9.]+-beta)"

# Use entire filename as version (default)
# Result: app_1.0.0_amd64.deb
asset_version_pattern = "(.*)"

Example Configuration

# FreeTube - Privacy-focused YouTube client
[[packages]]
name = "FreeTube"
repo = "FreeTubeApp/FreeTube"
asset_pattern = ".*_amd64\\.deb$"
asset_version_pattern = "FreeTube-([0-9.]+)"
prerelease = false
action = { type = "deb-install" }

# Add more packages as needed
[[packages]]
name = "Example App"
repo = "owner/repo"
asset_pattern = ".*\\.deb$"
asset_version_pattern = "([0-9.]+)"  # Extract semver
prerelease = false
action = { type = "deb-install" }

Example: Zotero Configuration

The following example demonstrates how to configure Zotero using the download-extract-and-link action:

[[packages]]
name = "Zotero"
repo = "zotero/zotero"
asset_pattern = "\\.tar.gz$"
asset_version_pattern = "(.*).tar.gz"
use_tag = true
action = { type = "download-extract-and-link", url = "https://www.zotero.org/download/client/dl?channel=release&platform=linux-x86_64", extract_to = "/opt", link_to = "/opt/zotero" }

This configuration will:

  1. Download the Zotero tarball from the specified URL.
  2. Extract it to /opt.
  3. Create a symbolic link to /opt/zotero for easier access.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aptator-0.1.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aptator-0.1.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file aptator-0.1.0.tar.gz.

File metadata

  • Download URL: aptator-0.1.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for aptator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9d66e1d215b52865b1a0c569047bcf3ee57916c9f46f9450649cc0f8dd194462
MD5 ed814e4fbac8991c460fc9a7fac817a6
BLAKE2b-256 49e02e11f238cd6843e954ecda150ccb882e00040a58aef6e3234160cf254e71

See more details on using hashes here.

File details

Details for the file aptator-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aptator-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for aptator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b50edc4b62d103a7e1f5976b2d8f9adc2c57ff7df05f74f0613f5141162fd6f0
MD5 10338ca97a3da0c92fdc9332914665fd
BLAKE2b-256 15cce720a98cf0f9ea957e34f1030985f5f127dcfec39aa4f3b81594c3a7b2d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page