Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/philsturgeon/codeigniter-cli
Work with CodeIgniter over the command line with handy prompts, clear screen, etc.
https://github.com/philsturgeon/codeigniter-cli
Last synced: 20 days ago
JSON representation
Work with CodeIgniter over the command line with handy prompts, clear screen, etc.
- Host: GitHub
- URL: https://github.com/philsturgeon/codeigniter-cli
- Owner: philsturgeon
- Created: 2009-03-26T23:50:11.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2011-08-24T16:42:10.000Z (about 13 years ago)
- Last Synced: 2024-05-01T23:46:19.561Z (6 months ago)
- Language: PHP
- Homepage: http://getsparks.org/packages/cli/show
- Size: 108 KB
- Stars: 97
- Watchers: 12
- Forks: 20
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-codeigniter - CodeIgniter-CLI - Work with CodeIgniter over the command line. (Libraries)
README
# 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);