All the proper web framework those days have some sort of Command line tools - the first that I’ve personally encountered where rails and symfony and I haven’t been able to live without them ever since, but Kohana 3 seems to be awfully backwards in that respect - no CLI in 2.3 and now no CLI in Kohana 3. They did structure it very well to create those tools - its just the tools themselves seem to be missing. Anyway here’s my take on this.
1
|
|
Or
1 2 |
|
To use it properly after you’ve downloaded the module you have to symlink or copy the kohana file from the root module directory to your root directory.
1 2 3 4 |
|
Or if you want system-wide support
1 2 3 |
|
Alright - so now you’re set to explore what commands you have
1
|
|
This will go through all your modules and search for specially designated “command” folders which contain cli scripts. Now several of my own modules have predefined command line utilities but kohana-cli
comes with some useful ones itself.
1 2 |
|
You can get help for the commands with the usual syntax
1 2 |
|
And it’s ridiculously easy to write your own CLI commands with color output and all that check out cache:clear
’s source:
1 2 3 4 5 6 7 8 9 10 11 12 |
|