Cross-platform autostart installer library for Python
Project description
🚀 onboot
Cross-platform autostart installer library for Python
onboot provides a unified interface to install and manage autostart entries across different operating systems and initialization methods. Whether you need to configure startup scripts on Linux, launch agents on macOS, or registry entries on Windows, onboot has you covered.
✨ Features
🐧 Linux
- ✅ XDG - XDG Autostart standard
- ✅ Cron - Cron jobs (@reboot)
- ✅ Profile.d - Shell profile scripts
- ✅ KDE Plasma - KDE autostart
- ✅ Init.d - System V init scripts
🍎 macOS (Darwin)
- ✅ PList - Launch Agents/Daemons
- ✅ Cron - Cron jobs (@reboot)
🪟 Windows
- ✅ StartMenu - Startup folder
- ✅ Registry - Windows Registry
- ✅ HKCU (Current User)
- ✅ HKLM (Local Machine)
- ⏳ IFEO (Image File Execution Options)
- ⏳ UserInit (Winlogon)
- ✅ Task Scheduler - Windows Task Scheduler
- ⏳ WMIC - Windows Management Instrumentation
📦 Installation
Install onboot using pip:
pip install onboot
Or with uv:
uv add onboot
🔧 Usage
Quick Start - Auto-detect Best Installer
Let onboot automatically try all available installers for your operating system:
from onboot import install_linux, InstallerConfiguration
# Create configuration
config = InstallerConfiguration("/home/user/myapp", "myapp")
# Install - tries all available installers until one succeeds
install_successful, used_installer = install_linux(config)
# Uninstall using the same installer
if install_successful:
used_installer.uninstall()
Platform-Specific Functions
from onboot import install_windows, install_darwin, InstallerConfiguration
# Windows
success, installer = install_windows(InstallerConfiguration("C:\\myapp", "myapp"))
# macOS
success, installer = install_darwin(InstallerConfiguration("/Users/user/myapp", "myapp"))
Use a Specific Installer
For more control, use a specific installer directly:
from onboot.windows import HKCUInstaller
from onboot import InstallerConfiguration
# Create configuration
config = InstallerConfiguration("C:\\myapp", "myapp")
# Use Windows Registry (HKCU) installer
installer = HKCUInstaller(config)
installer.install()
# Later, uninstall
installer.uninstall()
Available Installers by Platform
Linux:
from onboot.linux import (
XDGInstaller, # XDG autostart (.desktop files)
CrontabInstaller, # Crontab @reboot
ProfileInstaller, # /etc/profile.d/
KDEPlasmaInstaller, # KDE Plasma autostart scripts
InitInstaller, # /etc/init.d/
SystemdUserInstaller, # ~/.config/systemd/user/ services
SystemdSystemInstaller, # /etc/systemd/system/ services
BashrcInstaller, # ~/.bashrc
RcLocalInstaller # /etc/rc.local
)
macOS:
from onboot.darwin import (
PListInstaller, # ~/Library/LaunchAgents/
LaunchDaemonInstaller, # /Library/LaunchDaemons/ (system-wide)
ProfileInstaller # /etc/profile
)
Windows:
from onboot.windows import (
HKCUInstaller, # HKEY_CURRENT_USER registry
HKLMInstaller, # HKEY_LOCAL_MACHINE registry
StartMenuInstaller, # Start Menu startup folder
SchTaskInstaller, # Task Scheduler
UserInitInstaller # Winlogon UserInit
)
📝 Configuration
The InstallerConfiguration class accepts the following parameters:
directory(Path): Directory containing the executable or scriptname(str): Name of the application/service (filename)
Example:
from pathlib import Path
from onboot import InstallerConfiguration
config = InstallerConfiguration(
directory=Path("/usr/local/bin"),
name="myapp"
)
# The full path will be: /usr/local/bin/myapp
print(config.get_path())
🛠️ Development
This project uses uv for dependency management.
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync
# Run tests
uv run pytest
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
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
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 onboot-1.0.2.tar.gz.
File metadata
- Download URL: onboot-1.0.2.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a77adc016b368bef3f066ed47bf8f88d95eafae5f9bb34818e38dd2b69f11c4
|
|
| MD5 |
09fe6d674f5ca5900fedfada724004ee
|
|
| BLAKE2b-256 |
1431d8f7d7b25b739078974738a9d0216bcdf845b88c1d007f34b19a533d098a
|
Provenance
The following attestation bundles were made for onboot-1.0.2.tar.gz:
Publisher:
publish.yml on nbdy/onboot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
onboot-1.0.2.tar.gz -
Subject digest:
3a77adc016b368bef3f066ed47bf8f88d95eafae5f9bb34818e38dd2b69f11c4 - Sigstore transparency entry: 628845779
- Sigstore integration time:
-
Permalink:
nbdy/onboot@41ad0d469575488fb2661a14363cff67059b3af7 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/nbdy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@41ad0d469575488fb2661a14363cff67059b3af7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file onboot-1.0.2-py3-none-any.whl.
File metadata
- Download URL: onboot-1.0.2-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fae95d6330872fb0ed7a707ebc38816af58a5043f9791a4df5f016ba34ee5e5
|
|
| MD5 |
702f678cd79d9358f57dbb624d1a8c9f
|
|
| BLAKE2b-256 |
c59bb5288dc88e4c96895c22f552eba9fddda47d69fcb474bd4e91d692764a95
|
Provenance
The following attestation bundles were made for onboot-1.0.2-py3-none-any.whl:
Publisher:
publish.yml on nbdy/onboot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
onboot-1.0.2-py3-none-any.whl -
Subject digest:
5fae95d6330872fb0ed7a707ebc38816af58a5043f9791a4df5f016ba34ee5e5 - Sigstore transparency entry: 628845783
- Sigstore integration time:
-
Permalink:
nbdy/onboot@41ad0d469575488fb2661a14363cff67059b3af7 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/nbdy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@41ad0d469575488fb2661a14363cff67059b3af7 -
Trigger Event:
push
-
Statement type: