> ## 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.

# CLI Overview

> Command-line interface for managing Orphelix Kubernetes Dashboard

# Orphelix CLI

The Orphelix CLI provides a convenient way to manage your Kubernetes dashboard as a background service using pm2. It handles installation, configuration, and lifecycle management with simple commands.

## Key Features

* 🚀 **One-Command Setup** - Auto-installs dependencies, builds, and configures on first run
* 🔄 **Background Execution** - Runs as a daemon via pm2, no need to keep terminal open
* 🌐 **Custom Hostname** - Configures `orphelix.local` for easier access
* 💾 **SQLite Database** - Persistent storage for settings and preferences
* 🔔 **Desktop Notifications** - Get alerts for critical Kubernetes issues
* 📦 **Multi-Instance Support** - Run multiple instances for different clusters
* 🔄 **Auto-Update** - Update to latest version from GitHub with automatic backup
* 💾 **Backup & Restore** - Easy database backup and restore functionality
* 🚀 **Auto-Startup** - Optional system boot auto-start

## Quick Start

```bash theme={null}
# Install globally via npm
git clone https://github.com/corapoid/orphelix.git && cd orphelix/app

# Start Orphelix (first run will auto-install and configure)
orphelix start

# Open in browser
orphelix open

# View logs
orphelix logs

# Stop the application
orphelix stop
```

## First Run Setup

On first run, `orphelix start` will automatically:

1. ✅ Check and install npm dependencies
2. ✅ Build standalone Next.js application
3. ✅ Configure `orphelix.local` hostname (requires sudo)
4. ✅ Initialize SQLite database
5. ✅ Start application in background via pm2
6. ✅ Start notification worker for desktop alerts

You'll be prompted once for sudo password to configure `/etc/hosts`.

## Access URLs

After starting, access Orphelix at:

* **Custom hostname:** `http://orphelix.local:3000`
* **Standard localhost:** `http://localhost:3000`

## Architecture

```
┌─────────────────────────────────────────────────────┐
│              Orphelix CLI (orphelix)                │
│                                                      │
│  Commands: start, stop, restart, logs, status, etc. │
└─────────────────────┬───────────────────────────────┘
                      │
                      ▼
┌─────────────────────────────────────────────────────┐
│                  PM2 Process Manager                 │
│                                                      │
│  ┌──────────────────┐    ┌───────────────────────┐ │
│  │  orphelix        │    │ orphelix-notifications│ │
│  │  (main app)      │    │ (worker)              │ │
│  │  Port: 3000      │    │                       │ │
│  └──────────────────┘    └───────────────────────┘ │
└─────────────────────┬───────────────────────────────┘
                      │
                      ▼
┌─────────────────────────────────────────────────────┐
│               orphelix.db (SQLite)                   │
│                                                      │
│  - User settings                                     │
│  - GitHub configuration                              │
│  - Cluster aliases                                   │
│  - Notification preferences                          │
└──────────────────────────────────────────────────────┘
```

## Command Categories

### Process Management

Start, stop, restart, and monitor the application

* [start](https://orphelix.mintlify.site/cli/commands/start.md) - Start Orphelix in background
* [stop](https://orphelix.mintlify.site/cli/commands/stop.md) - Stop Orphelix
* [restart](https://orphelix.mintlify.site/cli/commands/restart.md) - Restart Orphelix
* [status](https://orphelix.mintlify.site/cli/commands/status.md) - Check if running
* [logs](https://orphelix.mintlify.site/cli/commands/logs.md) - View real-time logs
* [list](https://orphelix.mintlify.site/cli/commands/list.md) - List all running instances
* [delete](https://orphelix.mintlify.site/cli/commands/delete.md) - Remove from pm2

### Information

Get information about the application

* [version](https://orphelix.mintlify.site/cli/commands/version.md) - Show version and check for updates
* [info](https://orphelix.mintlify.site/cli/commands/info.md) - Show detailed application info
* [doctor](https://orphelix.mintlify.site/cli/commands/doctor.md) - Run health checks

### Backup & Configuration

Manage data and settings

* [backup](https://orphelix.mintlify.site/cli/commands/backup.md) - Create database backup
* [restore](https://orphelix.mintlify.site/cli/commands/restore.md) - Restore from backup
* [export-config](https://orphelix.mintlify.site/cli/commands/export-config) - Export configuration as JSON
* [import-config](https://orphelix.mintlify.site/cli/commands/import-config) - Import configuration from JSON

### Development

Tools for developers

* [dev](https://orphelix.mintlify.site/cli/commands/dev) - Start in development mode
* [debug](https://orphelix.mintlify.site/cli/commands/debug) - Start with debugger
* [test](https://orphelix.mintlify.site/cli/commands/test) - Run tests
* [clean](https://orphelix.mintlify.site/cli/commands/clean) - Clean caches and logs

### Maintenance

System maintenance and updates

* [update](https://orphelix.mintlify.site/cli/commands/update.md) - Update to latest version
* [startup](https://orphelix.mintlify.site/cli/commands/startup.md) - Enable auto-startup on boot
* [unstartup](https://orphelix.mintlify.site/cli/commands/unstartup.md) - Disable auto-startup

## Global Options

These options work with multiple commands:

* `--port, -p` - Specify custom port (default: 3000)
* `--name, -n` - Instance name for multi-instance support

## Environment Variables

* `ORPHELIX_PORT` - Set default port (can be overridden with `--port`)

## Next Steps

> [card] [Installation](https://orphelix.mintlify.site/cli/installation.md)
>
> Install Orphelix CLI globally

> [card] [Commands](https://orphelix.mintlify.site/cli/commands/start.md)
>
> Explore all available commands

> [card] [Multi-Instance](https://orphelix.mintlify.site/cli/multi-instance.md)
>
> Run multiple instances for different clusters

> [card] [Troubleshooting](https://orphelix.mintlify.site/cli/troubleshooting.md)
>
> Common issues and solutions


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