Skip to content

Pollora/cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pollora CLI

GitHub stars License

A command-line interface for managing Pollora framework projects.

Features

  • 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

Installation

Quick Installation (Recommended)

You can install Pollora CLI directly from GitHub with a single command:

Global Installation (requires sudo)

sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/Pollora/cli/main/install.sh)"

Local Installation (no sudo required)

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 ~/.bashrc

Manual Installation

If 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.sh

Usage

Create a new project

pollora create mon-projet

This will:

  1. Create a new directory for your project
  2. Configure DDEV
  3. Install Pollora via Composer
  4. Set up WordPress
  5. Configure permalink structure

Options

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

Check project status

pollora status

For more detailed information:

pollora status --detailed

Get help

pollora help

For command-specific help:

pollora help create

Extending the CLI

The CLI is designed to be easily extensible. To add a new command:

  1. Create a new file in the commands directory, e.g., commands/your-command.sh
  2. 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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages