Mewsh MediaWiki Shell
mewsh currently does the following:
- finds a mediawiki installation (also checks w/ and wiki/)
- checks for .mewsh/mewsh.aliasesrc.php
There are subcommands like wp-cli.
mewsh db cli # gives you a mysql cli with the database, you can probably also pipe into this mewsh db dump # dumps the entire database
mewsh maintenance update # will run maintenance/update.php mewsh maintenance getText Main_Page # will get the Main_Page article through maintenance/getText.php
mewsh var variableName # shows $variableName, e.g. mewsh var wgSitename mewsh var sitename # mewsh also tries wgArgument
mewsh var mewDir mewsh cd # shortcut for the above cd $(mewsh cd) # go to mediawiki root directory
$aliases = array(); $aliases['wikiyt'] = array( 'uri' => 'wiki.yt', 'root' => '/var/www/wiki.yt/htdocs/w', 'remote-host' => 'wiki.yt', // This will try to run the command over ssh );
With that you can do mewsh @wikiyt db cli from anywhere on the machine where this is set up. ssh support is planned, just like drush.
Bug reports / feature requests
And feel free to add bug reports, feature/pull requests, etc. https://github.com/guaka/mewsh/issues/new