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
.debassets 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
.debasset 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
actionoption specifies what should be done with the downloaded asset. It determines how the asset is processed, installed, or linked. Below are the supportedactiontypes and their descriptions:- Depending on the
type, additional fields may be required (e.g.,commandforexec,urlfordownload-extract-and-link). - This modular approach allows
aptatorto support a wide range of installation and setup workflows.
- Depending on the
Supported Action Types
-
deb-install- Installs the downloaded
.debpackage usingdpkg. - Example:
action = { type = "deb-install" }
- Installs the downloaded
-
exec- Executes a custom shell command.
- Example:
action = { type = "exec", command = "sudo apt update && sudo apt install -y example" }
-
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:
- Download the Zotero tarball from the specified URL.
- Extract it to
/opt. - Create a symbolic link to
/opt/zoterofor easier access.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d66e1d215b52865b1a0c569047bcf3ee57916c9f46f9450649cc0f8dd194462
|
|
| MD5 |
ed814e4fbac8991c460fc9a7fac817a6
|
|
| BLAKE2b-256 |
49e02e11f238cd6843e954ecda150ccb882e00040a58aef6e3234160cf254e71
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b50edc4b62d103a7e1f5976b2d8f9adc2c57ff7df05f74f0613f5141162fd6f0
|
|
| MD5 |
10338ca97a3da0c92fdc9332914665fd
|
|
| BLAKE2b-256 |
15cce720a98cf0f9ea957e34f1030985f5f127dcfec39aa4f3b81594c3a7b2d6
|