A command-line interface for managing Pollora framework projects.
- Create new Pollora projects with a single command
- Automatically configure DDEV, WordPress, and Pollora components
- Extensible architecture for adding new commands
- Check project status and display project information
You can install Pollora CLI directly from GitHub with a single command:
sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/Pollora/cli/main/install.sh)"INSTALL_DIR=~/bin bash -c "$(curl -fsSL https://raw.githubusercontent.com/Pollora/cli/main/install.sh)"Make sure ~/bin is in your PATH. If not, add it:
echo 'export PATH="$PATH:$HOME/bin"' >> ~/.bashrc
source ~/.bashrcIf you prefer to manually install:
# Clone the repository
git clone https://github.com/Pollora/cli.git
cd cli
# Make scripts executable
chmod +x pollora install.sh
# Install (global or local)
sudo ./install.sh
# OR
INSTALL_DIR=~/bin ./install.shpollora create mon-projetThis will:
- Create a new directory for your project
- Configure DDEV
- Install Pollora via Composer
- Set up WordPress
- Configure permalink structure
pollora create mon-projet --site-name=mon-site --docroot=web --no-rewrite--site-name=NAME: Set the DDEV site name (default: project name)--docroot=FOLDER: Set the document root folder (default: "public")--no-rewrite: Skip WordPress permalink configuration
pollora statusFor more detailed information:
pollora status --detailedpollora helpFor command-specific help:
pollora help createThe CLI is designed to be easily extensible. To add a new command:
- Create a new file in the
commandsdirectory, e.g.,commands/your-command.sh - Follow this template:
#!/bin/bash
# Description: Description of your command
# Usage: ./pollora your-command [options]
#
# Arguments:
# arg1 Description of argument 1
#
# Options:
# --option1 Description of option 1
# Command implementation
command_your_command() {
# Your code here
log_info "Command executed successfully"
}The CLI will automatically detect your new command and add it to the list of available commands.
This project is licensed under the MIT License - see the LICENSE file for details.