Introduction
The XyraPanel CLI (xyra) is a comprehensive command-line tool for managing your game server panel deployment. It provides streamlined workflows for building, deploying, and managing your XyraPanel instance through PM2.
Installation
Prerequisites
Before installing the CLI, ensure you have:- Node.js 18 or higher
- pnpm package manager
- PM2 process manager (for production deployments)
Global Installation
To make thexyra command available system-wide on your VPS:
xyra from any directory.
Local Usage
If you prefer not to install globally, you can run commands directly from the project root:Quick Start
View Available Commands
Run the CLI without arguments to see the help screen:Common Workflows
Development
Start the development server with hot module replacement:Production Deployment
Build and deploy to production in one command:- Build the Nuxt application
- Attempt to reload the existing PM2 process
- If reload fails, start a new PM2 process
View Logs
Tail the PM2 logs for your running application:Command Categories
The CLI organizes commands into logical groups:Core Workflows
deploy
Build and deploy your application via PM2
pm2
Manage PM2 processes (start, stop, reload, logs)
build
Build the Nuxt application for production
Development Tools
nuxt
Nuxt runtime helpers (dev, preview, generate)
lint
Code linting with oxlint
fmt
Code formatting with oxfmt
test
Run tests with Vitest
Database & Assets
db
Database schema migrations with Drizzle
pwa
Generate PWA assets
Configuration
PM2 Ecosystem File
Most PM2-related commands reference an ecosystem configuration file. By default, the CLI looks forecosystem.config.cjs in your project root.
Example ecosystem file:
ecosystem.config.cjs
Environment Blocks
The CLI supports different PM2 environment blocks for various deployment stages:env- Default production environmentenv_staging- Staging environment
--env flag:
Next Steps
Command Reference
Complete reference for all CLI commands
Deployment Guide
Learn about deploying XyraPanel to production
The CLI uses citty for command parsing and consola for beautiful terminal output.