Installation
The Loopar CLI is installed automatically when you install theloopar package:
loopar command, defined in the package.json:
Basic Usage
All Loopar CLI commands follow this pattern:The command to execute (dev, start, stop, restart, delete, list, status, logs)
Optional site name to target a specific site. If omitted, the command applies to all sites.
How It Works
The Loopar CLI operates within your project directory:All processes are organized under a namespace based on your project name, making it easy to manage multiple Loopar projects on the same system.
Available Commands
The CLI provides several command categories:Development
dev- Start the development server with hot module replacement
Process Control
start [siteName]- Start production server(s)stop [siteName]- Stop running server(s)restart [siteName]- Restart server(s)delete [siteName]- Remove server(s) from PM2
Monitoring
list- Display all running sitesstatus- Show detailed status informationlogs [siteName]- View real-time logs
Getting Help
To see available commands, run:Process Management
Loopar uses PM2 for process management, which provides:- Auto-restart - Processes automatically restart if they crash
- Load balancing - Multiple instances can be run for high availability
- Monitoring - CPU, memory, and uptime tracking
- Log management - Centralized logging for all processes
- Zero-downtime reloads - Graceful restarts without service interruption
Project Structure
The CLI expects your project to follow this structure:If no dev site exists when running
loopar dev, one will be automatically created with default configuration.Environment Variables
Each site has its own.env file in sites/<site-name>/.env with configuration:
Next Steps
Development
Learn how to use the dev command for local development
Process Control
Manage your production servers with start, stop, and restart
Monitoring
Monitor your sites with list, status, and logs commands
PM2 Documentation
Learn more about PM2 process manager