---
feature: "Operations"
description: "Backup, restore, deploy, install, OS adaptation — Kodi lifecycle management"
files:
  - ".agent/workflows/backup.md"
  - ".agent/workflows/restore.md"
  - ".agent/workflows/reset-kodi.md"
  - ".agent/workflows/deploy.md"
  - ".agent/workflows/install.md"
  - ".agent/workflows/change-os.md"
  - ".agent/skills/macos-system/SKILL.md"
  - ".agent/skills/shell-commands/SKILL.md"
  - ".agent/rules/hosting.md"
  - ".agent/rules/os-detection.md"
  - ".agent/rules/shell-safety.md"
parent: true
children:
  - "Backup & Restore"
  - "Deploy"
  - "Install"
  - "OS Adaptation"
updated: "2026-04-12"
---

# Operations

Kodi lifecycle management — backup, restore, deploy, install, OS adaptation. All operations work via shell without Kodi GUI.

## Children

### Backup & Restore
- **What it does**: Named Kodi backups (userdata + addons), quick state switching, factory reset
- **Workflows**: `/backup <name>`, `/restore <name>`, `/reset-kodi`
- **Backup path**: `/Users/chudy/Documents/KodiAgent/backups/kodi-<name>/`
- **Protected**: `clean` backup cannot be overwritten
- **Key distinction**: factory reset ≠ clean restore (different states)

### Deploy
- **What it does**: Package addon into ZIP and upload to hosting server
- **Workflow**: `/deploy` (nightly) or `/deploy X.Y.Z` (release)
- **Source**: Production Kodi path `~/Library/.../Kodi/addons/<addon-id>/`
- **Target**: `hosting.pilsfree.cz` via SSH (key: `~/.ssh/pilsfree`)
- **Process**: update version in addon.xml → include docs → ZIP → upload → verify HTTP 200

### Install
- **What it does**: Install Kodi addon from ZIP or URL — validate, fix, register in database
- **Workflow**: `/install <path-or-url>`
- **Validation**: addon.xml structure, folder naming, entry point, Python version
- **Dependencies**: Recursive resolution from Kodi mirrors, Addons33.db registration

### OS Adaptation
- **What it does**: Adapts `.agent/` system to different operating system
- **Workflow**: `/change-os [windows|linux|macos]`
- **Process**: detect OS → research Kodi paths → create OS-specific rule + skill
- **Safety**: NEVER deletes macOS files, only adds new OS-specific ones
- **Supported**: macOS (default), Windows, Linux
