# Overview

The Commands section serves as a detailed reference for administrators and advanced users to efficiently manage and configure the PteroCA panel through the command-line interface (CLI). Each command is designed to perform a specific action, such as managing configurations, maintaining system health, managing plugins, or troubleshooting issues.

## Command Naming in v0.6+

Starting with **PteroCA v0.6**, all CLI commands use the `pteroca:` namespace with hierarchical organization (e.g., `pteroca:user:create`, `pteroca:plugin:enable`).

**Deprecation Timeline:**

* **v0.6** (Current): New names available with aliases. Old names show deprecation warnings
* **v0.7-v0.9**: Old names continue to work with warnings
* **v1.0.0**: Old names removed completely ⚠️

**Action Required:** Update your scripts and cron jobs to use new command names before upgrading to v1.0.0.

## Command Categories

1. [User Management Commands](https://docs.pteroca.com/for-developers/cli-reference/user-management) - Create and manage user accounts
2. [Server Management Commands](https://docs.pteroca.com/for-developers/cli-reference/server-management) - Sync, suspend, and delete servers
3. [System Configuration & Maintenance Commands](https://docs.pteroca.com/for-developers/cli-reference/system-commands) - Configure and maintain the system
4. [Data Operations Commands](https://docs.pteroca.com/for-developers/cli-reference/data-operations) - Data synchronization and migration
5. [Plugin Management Commands](https://docs.pteroca.com/for-developers/cli-reference/plugin-commands) - Complete plugin management system
6. [Cron Scheduler Command](https://docs.pteroca.com/for-developers/cli-reference/cron-scheduler) - Automated task scheduling
7. [Development Tools Commands](https://docs.pteroca.com/for-developers/cli-reference/dev-tools) - Developer utilities
8. [Theme Commands](https://docs.pteroca.com/for-developers/cli-reference/theme-commands) - List, activate, and reset themes

## Getting Help

### Command Help

Get detailed help for any command using the `--help` flag:

```bash
# Get help for specific command
php bin/console pteroca:user:create --help
php bin/console pteroca:plugin:enable --help
php bin/console pteroca:system:update --help
```

### List All Commands

List all available commands or filter by category:

```bash
# List all pteroca commands
php bin/console list pteroca

# List commands by category
php bin/console list pteroca:user
php bin/console list pteroca:server
php bin/console list pteroca:plugin
php bin/console list pteroca:system
php bin/console list pteroca:data
php bin/console list pteroca:dev
php bin/console list pteroca:cron
php bin/console list pteroca:theme
```

## Command Migration Guide

If you're upgrading from an earlier version of PteroCA, here's a quick reference for updating your scripts:

### Common Command Migrations

```bash
# User Management
app:create-new-user           → pteroca:user:create
app:change-user-password      → pteroca:user:change-password

# Server Management
app:suspend-unpaid-servers    → pteroca:server:suspend-unpaid
app:delete-inactive-servers   → pteroca:server:delete-inactive
pteroca:sync-servers          → pteroca:server:sync

# System
app:configure-database        → pteroca:system:configure-database
app:configure-system          → pteroca:system:configure
app:update-system             → pteroca:system:update
app:delete-old-logs           → pteroca:system:cleanup-logs
app:cleanup-purchase-tokens   → pteroca:system:cleanup-tokens

# Cron Scheduler (IMPORTANT!)
app:cron-job-schedule         → pteroca:cron:schedule

# Data Operations
app:synchronize-data          → pteroca:data:sync
pterodactyl:migrate-servers   → pteroca:data:migrate-servers

# Development
app:show-missing-translations → pteroca:dev:check-translations
make:theme                    → pteroca:dev:make-theme

# Theme Management
theme:list                    → pteroca:theme:list
theme:set                     → pteroca:theme:set
theme:reset                   → pteroca:theme:reset

# Plugin Management (all new commands)
plugin:*                      → pteroca:plugin:*
```

### Update Your Crontab

**Before (v0.5.x):**

```bash
* * * * * php /var/www/pteroca/bin/console app:cron-job-schedule >> /dev/null 2>&1
```

**After (v0.6+):**

```bash
* * * * * php /var/www/pteroca/bin/console pteroca:cron:schedule >> /dev/null 2>&1
```

### Update Your Scripts

**Before:**

```bash
#!/bin/bash
php bin/console app:suspend-unpaid-servers
php bin/console app:delete-inactive-servers
php bin/console plugin:cron:run
```

**After:**

```bash
#!/bin/bash
php bin/console pteroca:server:suspend-unpaid
php bin/console pteroca:server:delete-inactive
php bin/console pteroca:plugin:cron:run
```

## Running Commands

All commands should be run from the root directory of your PteroCA installation:

```bash
# Docker environment (recommended)
php bin/console <command>

# Direct execution (if not using Docker)
php bin/console <command>
```

## Additional Resources

* [Command Migration Guide](https://github.com/PteroCA-Org/panel/blob/develop/docs/COMMAND_MIGRATION_GUIDE.md) - Full migration details
* [Crontab Configuration](https://github.com/PteroCA-Org/pteroca-homepage/blob/docs/installation/installation/manual-installation/README.md#crontab-configuration) - Automation setup
* [System Configuration](https://docs.pteroca.com/core-configuration/core-configuration) - Initial setup via CLI
