# How the Multi-Platform Installer Handles Different OS Package Managers in Claude-Video

> Discover how the Claude-Video multi-platform installer expertly manages macOS Homebrew, Linux apt/dnf, and Windows winget package managers for seamless cross-platform installation without admin rights.

- Repository: [bradautomates/claude-video](https://github.com/bradautomates/claude-video)
- Tags: how-to-guide
- Published: 2026-07-12

---

**The multi-platform installer automatically resolves dependencies on macOS via Homebrew while providing manual installation hints for apt/dnf on Linux and winget on Windows, ensuring cross-platform compatibility without requiring elevated privileges.**

The `claude-video` repository provides a `/watch` skill that requires `ffmpeg`, `ffprobe`, and `yt-dlp` binaries to function across different operating systems. The multi-platform installer located at [`skills/watch/scripts/setup.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/setup.py) detects the host environment and adapts its installation strategy to leverage native package managers. This approach maintains security by avoiding `sudo` requirements and ensures idempotency across repeated runs.

## OS Detection and Binary Verification

The installer begins by identifying the operating system via `platform.system()` and scanning for required binaries through the `_check_binaries()` function.

### Platform Identification

The script imports the standard library `platform` module to determine the host OS at runtime:

```python
import platform

system = platform.system()  # Returns 'Darwin', 'Linux', or 'Windows'

```

### Missing Binary Detection

The `_check_binaries()` function (lines 66-68 in [`setup.py`](https://github.com/bradautomates/claude-video/blob/main/setup.py)) returns a list of any missing dependencies from the set of `ffmpeg`, `ffprobe`, and `yt-dlp`. If all binaries are present on `PATH`, the script exits silently with status code 0.

## macOS Homebrew Automation

On **Darwin** systems, the installer attempts **automatic installation** using Homebrew. The script first verifies that `brew` exists on the system; if absent, it displays a friendly error directing users to install Homebrew first.

When Homebrew is available, the script builds a deduplicated package list using the `_brew_pkg()` helper (lines 165-188) and executes the installation command:

```bash
brew install ffmpeg yt-dlp

```

This automation runs without user intervention during the standard `python3 setup.py` execution.

## Linux Package Manager Hints

For **Linux** hosts, the installer does not perform automatic installation. Instead, it prints specific **install hints** covering the most common distribution package managers:

- **Debian/Ubuntu**: `sudo apt install ffmpeg`
- **Fedora**: `sudo dnf install ffmpeg`
- **yt-dlp**: Install via `pipx` or `pip --user` to avoid system-wide changes

These recommendations appear in the console output (lines 96-104) when the script detects missing binaries on Linux platforms.

## Windows Winget Instructions

On **Windows**, the installer similarly avoids automatic installation and instead displays **winget** commands for the user to execute manually:

```powershell
winget install ffmpeg
winget install yt-dlp

```

If winget is unavailable, the script suggests using `pip` as a fallback for installing `yt-dlp` (lines 106-114).

## Unsupported Platforms

If `platform.system()` returns anything other than Darwin, Linux, or Windows, the installer aborts with a generic manual-install message (lines 122-126), requiring the user to install dependencies manually without specific hints.

## Configuration Persistence and Idempotency

The installer guarantees **idempotency**—re-running the script never overwrites existing API keys or configuration files. After successful completion or manual dependency resolution, the script writes `SETUP_COMPLETE=true` to `~/.config/watch/.env` (lines 42-48) to silence future setup prompts.

The design explicitly avoids `sudo` or elevated privileges; users must run the suggested commands themselves on Linux and Windows, while macOS installations proceed through the user's existing Homebrew configuration without privilege escalation.

## Command-Line Usage Examples

The installer supports several modes via command-line flags:

**Silent Pre-flight Check**

```bash
python3 setup.py --check

```

Returns exit code 0 if ready, or prints a single actionable line identifying missing binaries.

**Machine-Readable Status**

```bash
python3 setup.py --json

```

Outputs JSON describing missing binaries, API-key status, and detected platform:

```json
{
  "status": "needs_install",
  "missing_binaries": ["ffmpeg"],
  "platform": "Linux"
}

```

**Full Installation Mode**

```bash
python3 setup.py

```

Runs the complete workflow: automatic installation on macOS, hint display on Linux/Windows, and environment scaffolding.

## Summary

- The multi-platform installer in [`skills/watch/scripts/setup.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/setup.py) uses `platform.system()` to detect macOS, Linux, or Windows.
- **macOS**: Automatically installs missing dependencies via Homebrew using the `_brew_pkg()` helper.
- **Linux**: Displays manual installation hints for `apt` and `dnf` package managers without auto-installation.
- **Windows**: Shows `winget` commands for manual execution with `pip` fallback options.
- The script maintains **idempotency** and writes `SETUP_COMPLETE=true` to `~/.config/watch/.env` to track completion status.
- No `sudo` or elevated privileges are required by the script itself.

## Frequently Asked Questions

### Does the multi-platform installer automatically install dependencies on all operating systems?

No. According to the `claude-video` source code, automatic installation only occurs on macOS via Homebrew. Linux and Windows implementations print manual installation commands for `apt`/`dnf` and `winget` respectively, requiring the user to execute them with appropriate privileges.

### Where does the installer store configuration status?

The script writes `SETUP_COMPLETE=true` to `~/.config/watch/.env` after successful initialization or dependency resolution. This persistent configuration prevents the `/watch` skill from prompting for setup on subsequent runs.

### What happens if I run the installer multiple times?

The installer is designed to be idempotent. Re-running `python3 setup.py` will not overwrite existing API keys or configuration files. It will re-check for binaries via `_check_binaries()` and only display installation hints for components still missing from the system `PATH`.

### Which binaries does the multi-platform installer check for?

The installer verifies the presence of three specific binaries: `ffmpeg`, `ffprobe`, and `yt-dlp`. These are checked through the `_check_binaries()` function in [`skills/watch/scripts/setup.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/setup.py), and the script adapts its package manager recommendations based on which binaries are missing and the detected operating system.