Skip to main content

🚀 onboot

PyPI version Python Support License: MIT Code style: black

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 script
  • name (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.

Metadata

Release files for onboot 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for onboot 1.0.2
File Size Uploaded
onboot-1.0.2.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for onboot 1.0.2
File Interpreter ABI Platform
onboot-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 20.1 kB

Release files / onboot-1.0.2.tar.gz

Download URL onboot-1.0.2.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3a77adc016b368bef3f066ed47bf8f88d95eafae5f9bb34818e38dd2b69f11c4
BLAKE2b-256 checksum
How to use checksums
1431d8f7d7b25b739078974738a9d0216bcdf845b88c1d007f34b19a533d098a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release files / onboot-1.0.2-py3-none-any.whl

Download URL onboot-1.0.2-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fae95d6330872fb0ed7a707ebc38816af58a5043f9791a4df5f016ba34ee5e5
BLAKE2b-256 checksum
How to use checksums
c59bb5288dc88e4c96895c22f552eba9fddda47d69fcb474bd4e91d692764a95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page