CodeIgniter CLI Helper.

A helper library that makes it easy to run CodeIgniter controllers from the command line. This allows you to implement cron jobs, background tasks, and CLI tools using your existing CodeIgniter codebase.

Features

  • Run any controller via CLI
  • Pass arguments directly to controller methods
  • Compatible with CodeIgniter 2.x and 3.x
  • Simple integration with existing projects

Installation

  1. Copy the Cli.php file to your application/libraries folder
  2. Load the library in your controller: $this->load->library('cli');
  3. Done!

Usage

From the command line:

php index.php controller/method/arg1/arg2

This will execute the specified controller method with the provided arguments.