wpCLI – Virtual command line administration shell plug-in for WordPress
February 22nd, 2010 | by Pyro222 |
My apologies for the lack of content over the last few weeks. I’ve been hard at work on my first wordpress plug-in called wpCLI and I’m excited to present to you an alpha test release (v0.0.2) with it’s plethora of awesome web-admin features and possibilities.
Read on overview of its highlights and the current direction of the project. .
wpCLI is a plugin geared towards Wordpress developers and admins who are looking to get a more intimate interaction with the wordpress environment through its semi-bash inspired virtual command line shell interface. As of the publishing of this post, there are currently only a handful of commands however rest assured that my obsession with this little toy will ensure that I continue to expand the contents and capabilities of the command library and the parser itself. To simplify things, wpCLI is designed so that writing your own interactive command involves little more than creating a small php class and a run function that is passed a string. There is much work and testing still to be done and like I mentioned before, this is my first Wordpress plug-in so there are surly many bugs, traps, and improvements to be made in the parser and command classes. However I strongly believe the possibilities are endless and the potential is great as the ideas continue to flow at a steady rate with this one.
Here are some of its current features…
- An interactive virtual command line shell
- Ability to pipe output to other commands
- A command builder notepad that can be sent to the command line with the push of a button
- Can execute lightweight php code from the command builder or command line as well as pipe its output to another command (needs much more work and testing)
- Can execute JavaScript code from the command builder or command line
- Easily create user(s) (can create multiple users with comma seperation. also generates a password if none is specified)
- Delete posts, users and categories
- Create posts and categories
- Set status of comments
- echo command (useful for piping strings and creating html to display in the shell window)
- Retrieve information and data for posts, users, and categories
All without the necessity of page refreshes thus keeping global data intact and easily accessible. Test php functions, test JavaScript functions, instantiate objects. You name it, and in the right hands, wpCLI can probably do it, as it will in more and more hands as time and development progresses.
Some of the things I am currently working on or implementing to a hopeful 0.1.0 release of wpCLI are..
- Much command line parser improvements to be made
- Extensive help, sysinfo and data retrieval commands
- A tweet command that will allow you to easily tweet from the shell
- Finish implementing resume features for commands to interact with user
- Possibly a position in the DB for storing global values, settings and other data
- A filter command that can filter piped data to be viewed or piped along further
- Activate and deactivate plugins
- Invoke any wordpress function directly through a “wpexec” command (you can currently achieve similar results using the “php” command)
- Finish testing and implementing “php” command which allows direct execution of php code in the shell
- Ability to script wpCLI commands from command line or external files
- Convenience commands for most wordpress functions
- Delete multiple comments in one line (ie. “del comments 1..2000″)
- More documentation on use of wpCLI and how to create custom command classes
- Internationalize the plug-in
- Mail command
- You see where I’m going with this right?
I plan to continue to put as much of my spare time into this project as possible, however being a one man operation, I am quite limited in how much I can diversely test the plug-in so I highly encourage curious wordpress power-admins and developers to give this one a try on your test blogs and please do report requests, bugs, improvements etc.. at either the project home or the sourceforge project site and help work out the kinks. Donations are also another great way to help the development of wpCLI.
Cheers Mates!
NOTE: Although wpCLI does not yet call any volatile wp functions, aside from deleting data like posts and categories, it is still in its testing phase. Please use with extreme care. Obviously I take no responsibility for anything that may result from wpCLI’s use.
Download: Latest Release
Project Home: http://wpcli.phatus.com
Documentation: Wiki or wpcli@SourceForge



Sorry, comments for this entry are closed at this time.