Skip to main content

No project description provided

Project description

🚀 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
  • WMCI - Windows Management Instrumentation
  • Cortana - Cortana integration
  • People - Windows People integration

📦 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,
    CrontabInstaller,
    ProfileInstaller,
    KDEPlasmaInstaller,
    InitInstaller
)

macOS:

from onboot.darwin import PListInstaller

Windows:

from onboot.windows import (
    HKCUInstaller,      # HKEY_CURRENT_USER
    HKLMInstaller,      # HKEY_LOCAL_MACHINE
    StartMenuInstaller,
    SchTaskInstaller    # Task Scheduler
)

📝 Configuration

The InstallerConfiguration class accepts the following parameters:

  • path (str): Path to the executable or script
  • name (str): Name of the application/service
  • args (list, optional): Command-line arguments
  • description (str, optional): Description of the service

Example:

from onboot import InstallerConfiguration

config = InstallerConfiguration(
    path="/usr/local/bin/myapp",
    name="MyApplication",
    args=["--daemon", "--config=/etc/myapp.conf"],
    description="My awesome application"
)

🛠️ 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

📋 TODO

  • 🧪 Comprehensive test coverage
  • 🔍 Specific exception handling (replace catch-all except:)
  • 📚 Additional platform support

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


🔗 Links

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

onboot-1.0.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

onboot-1.0.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file onboot-1.0.1.tar.gz.

File metadata

  • Download URL: onboot-1.0.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for onboot-1.0.1.tar.gz
Algorithm Hash digest
SHA256 78066f0ce1a2849f535e7503ca3ba717721634696c2fa55d371913d4f73a9e30
MD5 1587bcdfa8b50c03f3e695f87407ef73
BLAKE2b-256 1da8c5080a56ca28fcb3fefd95d508870f69b3a64525623e78431bd38dfbed85

See more details on using hashes here.

Provenance

The following attestation bundles were made for onboot-1.0.1.tar.gz:

Publisher: publish.yml on nbdy/onboot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file onboot-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: onboot-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for onboot-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9661d611673d890b7c0a9d6b4d1dcf65b4050ad990ff8d186aca3fae6d6592cb
MD5 1d8d48e0d64e9b5cc03dad8b7e6e55ef
BLAKE2b-256 40c9bbb16f42d4be35960971b908b06a667dd77045cfb7c6781987570a4da0d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for onboot-1.0.1-py3-none-any.whl:

Publisher: publish.yml on nbdy/onboot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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