Mash is a command line shell and scripting interface for Magento.
The objective is to make common Magento tasks accessible via the command line. The project is inspired by drush.
Mash is a PHP shell script executing various included PHP files to perform a
given task. To run mash, download or clone it to a directory in your bash
include path. Or download it to a home directory and alias the mash file (like,
alias mash=/Users/baalexander/Development/mash/mash
.
Commands should be ran inside the Magento project directory (or a subdirectory in the Magento project directory).
-
clear-cache (cc for short) Clears the Magento cache.
Example:
mash cc
-
create-block [Block] [Block_To_Rewrite]
Creates a block and optionally rewrites an existing block. Block and Block_To_Rewrite can be specified as an argument or be prompted for the names while running. If Block_To_Rewrite is not given, the block will extend class Mage_Core_Block_Template.
Example:
mash create-block Package_Adminhtml_Block_Customer_Grid Mage_Adminhtml_Block_Customer_Grid
-
create-module [Package_Module]
Creates a modules in app/code/local. Package_Module can be specified as an argument or be prompted for the names while running
Example:
mash create-module MyPackage_MyModule
-
create-route [Package_Module] [area] [frontname]
Adds a route to the config.xml for the given module. Package_Module, the area (like frontend), and frontname can be specified as an argument or be prompted for the names while running
Example:
mash create-route MyPackage_MyModule frontend mymodule
-
help List of commands for mash
Example:
mash help
Copyright (C) 2011 by Brandon Alexander Copyright (C) 2012 by Simon Morvan
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.