# FeatherPanel CLI — how to run in production

FeatherPanel’s CLI lives in `backend/cli` and is invoked as `php cli <command>` inside the backend container.

## Production (recommended)

After Docker install, the installer creates a global wrapper:

```bash
featherpanel help
featherpanel migrate
featherpanel settings
featherpanel users
featherpanel saas listusers 20
```

`featherpanel` is installed at `/usr/local/bin/featherpanel` and runs:

```bash
docker exec -it featherpanel_backend php cli <args…>
```

Special wrapper command:

```bash
featherpanel run-script   # downloads and runs the public installer (get.featherpanel.com)
```

## Docker (explicit)

```bash
docker exec -it featherpanel_backend php cli help
docker exec -it featherpanel_backend php cli migrate
docker exec -i featherpanel_backend php cli saas listsettings   # non-TTY / scripts
```

## Source / development installs

```bash
cd /var/www/featherpanel/backend
php cli help
php cli migrate --skip-path-check
```

Valid working directories when path checks are enabled: `/var/www/featherpanel`, `/var/www/html`, `/var/www/featherpanel/backend`.

## Global flags

| Flag | Purpose |
| --- | --- |
| `--skip-path-check` | Skip CWD validation. Required in CI and some container contexts where cwd is not /var/www/featherpanel or /var/www/html. |
| `--no-colors` | Disable Minecraft-style color codes in CLI output. |
| `--clean-output` | Strip decorative formatting for machine-friendly output. |
| `--no-prefix` | Omit the [FeatherPanel] prefix on each output line. |

## Plugin commands

Plugins may add commands under `backend/storage/addons/<Plugin>/Commands/`. They are discovered by class name (same as built-ins) and show under the Plugins section of `featherpanel help`.

## Built-in commands (14)

### `cron`

Run all scheduled cron jobs

```bash
featherpanel cron
```

  - _(no subcommands — run the command directly)_

### `developer`

Manage developer server and VS Code Tunnel (start, stop, status, logs)

```bash
featherpanel developer
```

  - `developer start`: Start the developer server and VS Code Tunnel
  - `developer stop`: Stop the developer server and VS Code Tunnel
  - `developer status`: Check if the developer server is running
  - `developer logs`: Show VS Code Tunnel logs (usage: developer logs [lines])

### `help`

Get help for all commands

```bash
featherpanel help
```

  - _(no subcommands — run the command directly)_

### `logs`

Upload the logs to MythicalSystems Paste!

```bash
featherpanel logs
```

  - _(no subcommands — run the command directly)_

### `migrate`

Migrate the database to the latest version

```bash
featherpanel migrate
```

  - _(no subcommands — run the command directly)_

### `module`

Manage FeatherPanel modules (install, ensure, list, uninstall)

```bash
featherpanel module
```

  - `module install`: Install a module (usage: module install <module>)
  - `module ensure`: Reinstall a module if its install marker exists but files are missing (usage: module ensure <module>)
  - `module list`: List available and installed modules
  - `module uninstall`: Uninstall a module (usage: module uninstall <module>)

### `rebuild`

Rebuild the database!

```bash
featherpanel rebuild
```

  - _(no subcommands — run the command directly)_

### `saas`

SaaS administrative helper for automation and scripting

```bash
featherpanel saas
```

  - `saas createuser`: Create a new user (usage: saas createuser <username> <email> <firstName> <lastName> <password> [roleId])
  - `saas deleteuser`: Delete a user (usage: saas deleteuser <uuid|username|email>)
  - `saas updateuser`: Update a user field (usage: saas updateuser <uuid|username|email> <field> <value>)
  - `saas banuser`: Ban a user (usage: saas banuser <uuid|username|email>)
  - `saas unbanuser`: Unban a user (usage: saas unbanuser <uuid|username|email>)
  - `saas resetpassword`: Reset user password (usage: saas resetpassword <uuid|username|email> <newPassword>)
  - `saas userinfo`: Get user information (usage: saas userinfo <uuid|username|email>)
  - `saas listusers`: List users (usage: saas listusers [limit] [search])
  - `saas setsetting`: Set a configuration setting (usage: saas setsetting <key> <value>)
  - `saas getsetting`: Get a configuration setting (usage: saas getsetting <key>)
  - `saas listsettings`: List all configurable settings (usage: saas listsettings)

### `seedWebPlates`

Upsert bundled system WebPlate templates (static, PHP, Node, Python)

```bash
featherpanel seedWebPlates
```

  - _(no subcommands — run the command directly)_

### `settings`

Interactive settings configuration with a beautiful UI!

```bash
featherpanel settings
```

  - _(no subcommands — run the command directly)_

### `setup`

Setup the database and the application!

```bash
featherpanel setup
```

  - _(no subcommands — run the command directly)_

### `snapshots`

Manage database snapshots (create, list, download, restore, delete)

```bash
featherpanel snapshots
```

  - `snapshots list`: List all available database snapshots
  - `snapshots create`: Create a new database snapshot
  - `snapshots download`: Download a snapshot file (usage: snapshots download <filename>)
  - `snapshots restore`: Restore database from a snapshot (usage: snapshots restore <filename> [-y])
  - `snapshots delete`: Delete a snapshot file (usage: snapshots delete <filename>)

### `testAsyncRunner`

Test mail sending

```bash
featherpanel testAsyncRunner
```

  - _(no subcommands — run the command directly)_

### `users`

Interactive user management with a beautiful UI!

```bash
featherpanel users
```

  - _(no subcommands — run the command directly)_

## Common ops playbook

| Goal | Command |
| --- | --- |
| List all commands | `featherpanel help` |
| Apply DB migrations | `featherpanel migrate` |
| Interactive settings | `featherpanel settings` |
| Interactive users | `featherpanel users` |
| Scripted user create | `featherpanel saas createuser …` |
| Get/set a setting key | `featherpanel saas getsetting <key>` / `setsetting <key> <value>` |
| Upload logs for support | `featherpanel logs` |
| DB snapshots | `featherpanel snapshots list` |
| Run cron jobs once | `featherpanel cron` |
| Seed WebPlates | `featherpanel seedWebPlates` |

Setting keys and categories: [../settings/index.md](../settings/index.md).
Installer: [../installer/index.md](../installer/index.md).
