Skip to content

philsturgeon/codeigniter-cli

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

CodeIgniter-CLI

Interact with the command line by accepting input options, parameters and output text.

History

This library was originally written in 2009 and was... alright. Now it has been totally rewritten based on the FuelPHP CLI library I wrote, which was based on this. MADNESS!

Requirements

  • CodeIgniter 2.0.x

Examples

// Output "Hello World" to the CLI
$this->cli->write('Hello World!');

// Waits for any key press
$this->cli->prompt();

// Takes any input
$color = $this->cli->prompt('What is your favorite color?');

// Takes any input, but offers default
$color = $this->cli->prompt('What is your favorite color?', 'white');

// Will only accept the options in the array
$ready = $this->cli->prompt('Are you ready?', array('y','n'));

$this->cli->write('Loading...');
$this->cli->wait(5, true);

About

Work with CodeIgniter over the command line with handy prompts, clear screen, etc.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages