Oxrun provides a cli toolset for the OXID eShop Community Edition.
Thanks to the netz98 magerun project which heavily inspired oxrun.
PHP 5.6 is required.
If you are using composer (which you probably are), just add "marcharding/oxrun": "dev-master"
to your composer.json and run composer install.
You can then use oxrun by calling vendor/bin/oxrun
or add vendor/bin
to your $PATH to be able to just call oxrun
.
You can also install oxrun by simply downloading the phar file from the release tab.
Here is a bash snippet which automatically downloads the latest release from github:
curl -LOk `curl --silent https://api.github.com/repos/marcharding/oxrun/releases/latest | awk '/browser_download_url/ { print $2 }' | sed 's/"//g'`
You can oxrun now via php oxrun.phar
Alternatively you can also make the phar itself executable and copy it to your /usr/local/bin/ directory for global usage.
chmod +x oxrun.phar
sudo mv oxrun.phar /usr/local/bin/oxrun
You can then run oxrun by just calling oxrun
To use oxrun just execute php oxrun.phar
or oxrun
(see above).
Execute oxrun inside your OXID eShop base directory (or subdirectory) if you want to interact with an existing shop. It will automatically try to find the oxid boostrap.php and load it.
- Description: Clears the cache
- Usage:
cache:clear
- Description: Updates a cms page
- Usage:
cms:update [--title[="..."]] [--content[="..."]] [--language="..."] [--active="..."] ident
ident:
- Name: ident
- Description: Content ident
title:
- Name:
--title
- Is value required: no
- Description: Content title
content:
- Name:
--content
- Is value required: no
- Description: Content body
language:
- Name:
--language
- Is value required: yes
- Description: Content language
active:
- Name:
--active
- Is value required: yes
- Description: Content active
- Description: Gets a config value
- Usage:
config:get [--shopId[="..."]] [--moduleId[="..."]] variableName
variableName:
- Name: variableName
- Description: Variable name
shopId:
- Name:
--shopId
- Is value required: no
- Description:
moduleId:
- Name:
--moduleId
- Is value required: no
- Description:
- Description: Sets a config value
- Usage:
config:set [--variableType="..."] [--shopId[="..."]] [--moduleId[="..."]] variableName variableValue
variableName:
- Name: variableName
- Description: Variable name
variableValue:
- Name: variableValue
- Description: Variable value
variableType:
- Name:
--variableType
- Is value required: yes
- Description: Variable type
shopId:
- Name:
--shopId
- Is value required: no
- Description:
moduleId:
- Name:
--moduleId
- Is value required: no
- Description:
- Description: Sets a shop config value
- Usage:
config:shop:get [--shopId[="..."]] variableName
variableName:
- Name: variableName
- Description: Variable name
shopId:
- Name:
--shopId
- Is value required: no
- Description: oxbaseshop
- Default:
'oxbaseshop'
- Description: Sets a shop config value
- Usage:
config:shop:set [--shopId[="..."]] variableName variableValue
variableName:
- Name: variableName
- Description: Variable name
variableValue:
- Name: variableValue
- Description: Variable value
shopId:
- Name:
--shopId
- Is value required: no
- Description: oxbaseshop
- Default:
'oxbaseshop'
- Description: Dumps the the current shop database
- Usage:
db:dump [--file="..."]
Dumps the the current shop database.
Requires php exec and MySQL CLI tools installed on your system.
file:
- Name:
--file
- Is value required: yes
- Description: Dump sql in to this file
- Description: Import a sql file
- Usage:
db:import file
Imports an SQL file on the current shop database.
Requires php exec and MySQL CLI tools installed on your system.
file:
- Name: file
- Description: The sql file which is to be imported
- Description: Executes a query
- Usage:
db:query [--raw] query
Executes an SQL query on the current shop database. Wrap your SQL in quotes.
If your query produces a result (e.g. a SELECT statement), the output will be returned via the table component. Add the raw option for raw output.
Requires php exec and MySQL CLI tools installed on your system.
query:
- Name: query
- Description: The query which is to be executed
raw:
- Name:
--raw
- Accept value: no
- Is value required: no
- Description: Raw output
- Default:
false
- Description: Installs the shop
- Usage:
install:shop [--oxidVersion[="..."]] [--installationFolder[="..."]] [--dbHost="..."] [--dbUser="..."] [--dbPwd="..."] [--dbName="..."] [--dbPort[="..."]] [--installSampleData[="..."]] [--shopURL="..."] [--adminUser="..."] [--adminPassword="..."]
oxidVersion:
- Name:
--oxidVersion
- Is value required: no
- Description: Oxid version
- Default:
'v4.9.5'
installationFolder:
- Name:
--installationFolder
- Is value required: no
- Description: Installation folder
- Default:
'/vagrant/web/oxrun'
dbHost:
- Name:
--dbHost
- Is value required: yes
- Description: Database host
- Default:
'localhost'
dbUser:
- Name:
--dbUser
- Is value required: yes
- Description: Database user
- Default:
'oxid'
dbPwd:
- Name:
--dbPwd
- Is value required: yes
- Description: Database password
- Default:
''
dbName:
- Name:
--dbName
- Is value required: yes
- Description: Database name
- Default:
'oxid'
dbPort:
- Name:
--dbPort
- Is value required: no
- Description: Database port
- Default:
3306
installSampleData:
- Name:
--installSampleData
- Is value required: no
- Description: Install sample data
- Default:
true
shopURL:
- Name:
--shopURL
- Is value required: yes
- Description: Installation base url
adminUser:
- Name:
--adminUser
- Is value required: yes
- Description: Admin user email/login
adminPassword:
- Name:
--adminPassword
- Is value required: yes
- Description: Admin password
- Description: Generate a raw command documentation of the available commands
- Usage:
misc:generate:documentation
command:
- Name: command
- Description: The command to execute
- Description: Generate a PhpStorm metadata file for autocompletion
- Usage:
misc:phpstorm:metadata
output-dir:
- Name:
--output-dir
,-o
- Accept value: yes
- Is value required: yes
- Description: Writes the metadata for PhpStorm to the specified directory.
- Description: Activates a module
- Usage:
module:activate module
module:
- Name: module
- Description: Module name
- Description: Deactivates a module
- Usage:
module:deactivate module
module:
- Name: module
- Description: Module name
- Description: Fixes a module
- Usage:
module:fix module
module:
- Name: module
- Description: Module name
- Description: Generates a module skeleton
- Usage:
module:generate module
module:
- Name: module
- Description: Module name
- Description: Lists all modules
- Usage:
module:list
- Description: Sets a new password
- Usage:
user:password username password
username:
- Name: username
- Description: Username
password:
- Name: password
- Description: New password
- Description: Updates the views
- Usage:
views:update