Skip to content

Kohana CLI Reloaded extends default Kohana CLI functionalities with the static methods run(), read(), write(), password(), wait(), color(), error(), beep(), new_line(), clear_screen() & check() mostly adapted from FuelPHP & Minion CLI Framework

Notifications You must be signed in to change notification settings

sebicas/kohana-cli-reloaded

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

Kohana CLI Reloaded

Kohana CLI Reloaded Module provides extended Command Line functionalities to the default Kohana CLI Class.

The following the static methods are included:

CLI::run()
CLI::read()
CLI::write()
CLI::password()
CLI::wait()
CLI::color()
CLI::error()
CLI::beep()
CLI::new_line()
CLI::clear_screen()
CLI::check()

Most of the code has been extracted and adapted from:

How to use this module

To use the Kohana CLI Reloaded Model, just:

  1. Download and extract the code from Github.
  2. Configure Paths in ./kohana file
  3. Give executing permissions to ./kohana file ( chmod +x ./kohana )
  4. Place the module into your Kohana instances modules folder.
  5. Enable the module within the application bootstrap within the section entitled modules.

Optionally: You could add your ./kohana file to your PATH adding it to your .bashrc

# Add Kohana CLI Reloaded
export PATH=/home/redremax/modules/kohana-cli-reloaded/:$PATH

Configure Paths:

// Define Application & System Paths
define('INDEX', '/home/myuser/kohana/index.php'); // Use Full Path if Possible
define('PHP_BIN', '/usr/bin/php');

Define your paths to your index.php file and executable php.

Then go to application/bootstrap.php, look for Kohana::modules() and add:

'kohana-cli-reloaded' => MODPATH.'kohana-cli-reloaded', // Kohana CLI Reloaded

Example:

Kohana::modules(array(
    // 'auth'       => MODPATH.'auth',       // Basic authentication
    // 'cache'      => MODPATH.'cache',      // Caching with multiple backends
    // 'codebench'  => MODPATH.'codebench',  // Benchmarking tool
    // 'database'   => MODPATH.'database',   // Database access
    // 'image'      => MODPATH.'image',      // Image manipulation
    // 'orm'        => MODPATH.'orm',        // Object Relationship Mapping
    // 'unittest'   => MODPATH.'unittest',   // Unit testing
    // 'userguide'  => MODPATH.'userguide',  // User guide and API documentation
    'kohana-cli-reloaded' => MODPATH.'kohana-cli-reloaded', // Kohana CLI Reloaded
));

See it working

To see a Demo of the Module working go to the Module directory and type:

./kohana cli_demo

Important: Make sure ./kohana file has executing permissions ( chmod +x ./kohana )

Contributing

  1. Fork it.
  2. Create a branch (git checkout -b my_markup)
  3. Commit your changes (git commit -am "Added Snarkdown")
  4. Push to the branch (git push origin my_markup)
  5. Create an [Issue][1] with a link to your branch
  6. Enjoy a refreshing orange juice and wait

Colaborators

Thanks to the following colaborators:

About

Kohana CLI Reloaded extends default Kohana CLI functionalities with the static methods run(), read(), write(), password(), wait(), color(), error(), beep(), new_line(), clear_screen() & check() mostly adapted from FuelPHP & Minion CLI Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages