> ## Documentation Index
> Fetch the complete documentation index at: https://orphelix.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# orphelix update

> Update to latest version from GitHub

# orphelix update

Update Orphelix to the latest version from GitHub with automatic backup.

## Usage

```bash theme={null}
orphelix update
```

## Interactive Update Process

```bash theme={null}
$ orphelix update

🔍 Checking for updates...

📦 New version available: v1.3.0 (current: v1.2.3)

Release Notes:
  - Added resource optimization recommendations
  - Improved metrics collection
  - Fixed notification worker crash
  - Enhanced UI performance

View full changelog: https://github.com/corapoid/orphelix/releases/tag/v1.3.0

   Update now? [y/N]: y

💾 Creating backup before update...
✅ Backup created: ~/orphelix-backups/orphelix-backup-2025-11-26-103045.db

📥 Downloading update...
[████████████████████] 100%

✅ Update complete!
   Version: v1.2.3 → v1.3.0

   Restart Orphelix with: orphelix restart
```

## Automatic Backup

> [!NOTE]
>
> Before updating, a full database backup is automatically created. If the update fails, you can restore from this backup.

## Update Source

Updates are fetched from GitHub releases:

```
https://github.com/corapoid/orphelix/releases/latest
```

## Version Checking

The update command:

1. Queries GitHub API for latest release
2. Compares with current version (from package.json)
3. Shows release notes if update available
4. Prompts for confirmation
5. Creates automatic backup
6. Downloads and installs update
7. Preserves all settings and data

## No Update Available

```bash theme={null}
$ orphelix update

🔍 Checking for updates...

✅ You are already running the latest version (v1.3.0)
```

## Skipping Update

Press `N` or `Ctrl+C` to cancel:

```bash theme={null}
Update now? [y/N]: n
⏭️  Update cancelled
```

## After Update

**Restart the application** to use the new version:

```bash theme={null}
orphelix restart
```

## Rollback

If the update causes issues, restore from the automatic backup:

```bash theme={null}
# Find the pre-update backup
orphelix restore ~/orphelix-backups/orphelix-backup-2025-11-26-103045.db

# Reinstall previous version
git clone https://github.com/corapoid/orphelix.git && cd orphelix/app@1.2.3

# Restart
orphelix restart
```

## Update Frequency

Check for updates:

* Automatically when running `orphelix version`
* Manually with `orphelix update`
* Weekly via GitHub notifications (if watching the repository)

## Pre-release Updates

> [!WARNING]
>
> The update command installs stable releases only. Pre-release versions must be installed manually via npm.

To install pre-release:

```bash theme={null}
git clone https://github.com/corapoid/orphelix.git && cd orphelix/app@next
```

## Troubleshooting

### Network Error

```bash theme={null}
Error: Failed to fetch updates from GitHub
```

Check internet connection and try again.

### Permission Denied

```bash theme={null}
Error: EACCES: permission denied
```

Update npm permissions or use:

```bash theme={null}
sudo git clone https://github.com/corapoid/orphelix.git && cd orphelix/app
```

(Not recommended - fix npm permissions instead)

### Update Failed

If update fails:

1. Restore from automatic backup
2. Check logs: `orphelix logs`
3. Run diagnostics: `orphelix doctor`
4. Report issue on GitHub

## Related Commands

* [version](https://orphelix.mintlify.site/cli/commands/version.md) - Check current version
* [backup](https://orphelix.mintlify.site/cli/commands/backup.md) - Manual backup
* [restore](https://orphelix.mintlify.site/cli/commands/restore.md) - Restore from backup
* [restart](https://orphelix.mintlify.site/cli/commands/restart.md) - Restart application

## See Also

> [card] [Changelog](https://github.com/corapoid/orphelix/blob/main/CHANGELOG.md)
>
> View all version history

> [card] [Releases](https://github.com/corapoid/orphelix/releases)
>
> Browse GitHub releases


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.