Oxrun provides a cli toolset for the OXID eShop Community Edition.
- Fully Documentation
- Documentation for contributing
- Changelog of command between v4.x to v5.x
composer require oxidprojects/oxrun
.
- PHP >=7.1 is required.
- OXID eShop >= CE v6.5 is required.
After installation manually clear the cache via ./vendor/bin/oxrun-light cache:clear
to make all oxrun commands available.
./vendor/bin/oe-console
is standard call.
./vendor/bin/oxrun-light
is a light version of tools that are not need an active OXID eSale database connection../vendor/bin/oxrun
is a alias fromoe-console
- Copyright (c) 2021 Tobias Matthaiou http://www.tobimat.eu/
- Copyright (c) 2018 Stefan Moises https://www.rent-a-hero.de/
- Copyright (c) 2015 Marc Harding http://www.marcharding.de (https://github.com/marcharding/oxrun)
- cache:clear Clear OXID cache
- config:get Gets a config value
- config:multiset
- config:set Sets a config value
- config:shop:get Gets a shop config value
- config:shop:set Sets a shop config value
- db:anonymize Anonymize relevant OXID db tables
- db:dump Create a dump, with mysqldump
- db:import Import a sql file
- db:info Show a Table with size of all Tables
- db:list List of all Tables
- db:query Executes a query
- deploy:config Sets multiple configuration values that are not in module settings
- deploy:generate:configuration Generate a yaml with configuration from Database. For command
deploy:config
- deploy:generate:module-activator Generate a yaml file for command
deploy:module-activator
- deploy:link:environment Links the environment configration files. Ideal for CI/CD
- deploy:module-activator Activates multiple modules, based on a YAML file
- deploy:module-apply-configuration-light It the same as
oe:module:apply-configuration
but faster. - deploy:update-module-config Update the module configuration yaml with the data from the database
- misc:generate:yaml:config
- misc:generate:yaml:module
- misc:phpstorm:metadata Generate a PhpStorm metadata file for auto-completion and a oxid module chain.Ideal for psalm or phpstan
- misc:register:command Extends the service.yaml file with the commands. So that they are found in oe-console.
- module:generate Generates a module skeleton
- module:list Lists all modules
- module:multiactivator
- module:reload Deactivate and activate a module
- oxid:shops Lists the shops
- route:debug Returns the route. Which controller and parameters are called.
- user:create Creates a new user
- user:password Sets a new password
- views:update Updates the views
Clear OXID cache
cache:clear [-f|--force]
Clear OXID cache
Try to delete the cache anyway. [danger or permission denied]
- Accept value: no
- Is value required: no
- Default:
false
Gets a config value
config:get [--moduleId [MODULEID]] [--json] [--yaml] [--] <variableName>
Gets a config value
Variable name
- Is value required: no
- Default:
''
Output as json
- Accept value: no
- Is value required: no
- Default:
false
Output as YAML (default)
- Accept value: no
- Is value required: no
- Default:
false
Sets multiple configuration values that are not in module settings
deploy:config [-f|--force-db] [--production] [--staging] [--development] [--testing] [--] <configfile>
config:multiset
This command can import settings into the database that are not found in the module settings. If they are module settings, they are stored in the module configuration yaml, not in the database.
The file path is relative to the shop installation_root_path/var/oxrun_config/. You can also pass a YAML string on the command line.
To create YAML use command oe-console deploy:generate:configration --help
YAML example:
environment:
- "production"
- "staging"
- "development"
- "testing"
config:
1:
blReverseProxyActive:
variableType: bool
variableValue: false
sMallShopURL: http://myshop.dev.local
sMallSSLShopURL: http://myshop.dev.local
2:
blReverseProxyActive:
...
If you want, you can also specify a YAML string on the command line instead of a file, e.g.:
../vendor/bin/oe-console deploy:config $'config:
1:
foobar: barfoo
' --shop-id=1
The file containing the config values, see example/malls.yml.dist. (e.g. dev.yml, stage.yml, prod.yml)
Still write everything into the database.
- Accept value: no
- Is value required: no
- Default:
false
For "production" system
- Accept value: no
- Is value required: no
- Default:
false
For "staging" system
- Accept value: no
- Is value required: no
- Default:
false
For "development" system
- Accept value: no
- Is value required: no
- Default:
false
For "testing" system
- Accept value: no
- Is value required: no
- Default:
false
Sets a config value
config:set [--variableType VARIABLETYPE] [--moduleId [MODULEID]] [--] <variableName> <variableValue>
Sets a config value
Variable name
Variable value
Variable type
- Is value required: yes
- Is value required: no
Gets a shop config value
config:shop:get <variableName>
Gets a shop config value
Variable name
Sets a shop config value
config:shop:set <variableName> <variableValue>
Sets a shop config value
Variable name
Variable value
Anonymize relevant OXID db tables
db:anonymize [--debug] [-d|--domain [DOMAIN]] [-k|--keepdomain [KEEPDOMAIN]]
Anonymizes user relevant data in the OXID database. Relevant tables are: Array ( [0] => oxnewssubscribed [1] => oxuser [2] => oxvouchers [3] => oxaddress [4] => oxorder )
Debug SQL queries generated
- Accept value: no
- Is value required: no
- Default:
false
Domain to use for all anonymized usernames /email addresses, default is "@oxrun.com"
- Is value required: no
Domain which should NOT be anonymized, default is "@foobar.com". Data with this domain in the email address will NOT be anonymized.
- Is value required: no
Create a dump, with mysqldump
db:dump [--file FILE] [-t|--table TABLE] [-i|--ignoreViews] [-a|--anonymous] [-w|--withoutTableData WITHOUTTABLEDATA]
Create a dump from the current database.
usage:
oe-console db:dump --withoutTableData oxseo,oxvou%
- To dump all Tables, but `oxseo`, `oxvoucher`, and `oxvoucherseries` without data.
possibilities: oxseo%,oxuser,%logs%
oe-console db:dump --table %user%
- to dump only those tables `oxuser` `oxuserbasketitems` `oxuserbaskets` `oxuserpayments`
oe-console db:dump --anonymous # Perfect for Stage Server
- Those table without data: `oxseo`, `oxseologs`, `oxseohistory`, `oxuser`, `oxuserbasketitems`, `oxuserbaskets`, `oxuserpayments`, `oxnewssubscribed`, `oxremark`, `oxvouchers`, `oxvoucherseries`, `oxaddress`, `oxorder`, `oxorderarticles`, `oxorderfiles`, `oepaypal_order`, `oepaypal_orderpayments`.
oe-console db:dump -v
- With verbose mode you will see the mysqldump command
(`mysqldump -u 'root' -h 'oxid_db' -p ... `)
oe-console db:dump --file dump.sql
- Put the Output into a File
** Only existing tables will be exported. No matter what was required.
* php
* MySQL CLI tools.
Save dump at this location.
- Is value required: yes
Only names of tables are dumped. Default all tables. Use comma separated list and or pattern e.g. %voucher%
- Is value required: yes
Ignore views
- Accept value: no
- Is value required: no
- Default:
false
Export not table with person related data.
- Accept value: no
- Is value required: no
- Default:
false
Export tables only with their CREATE statement. So without content. Use comma separated list and or pattern e.g. %voucher%
- Is value required: yes
Import a sql file
db:import <file>
Imports an SQL file on the current shop database.
Requires php exec and MySQL CLI tools installed on your system.
The sql file which is to be imported
Show a Table with size of all Tables
db:info [--tableSize] [--databaseSize]
Show a Table with size of all Tables
Size of all Tables
- Accept value: no
- Is value required: no
- Default:
false
Size of the Databases
- Accept value: no
- Is value required: no
- Default:
false
List of all Tables
db:list [-p|--plain] [-t|--pattern PATTERN]
List Tables
usage:
oe-console db:list --pattern oxseo%,oxuser
- To dump all Tables, but oxseo
, oxvoucher
, and oxvoucherseries
without data.
possibilities: oxseo%,oxuser,%logs%
print list as comma separated.
- Accept value: no
- Is value required: no
- Default:
false
table name pattern test. e.g. oxseo%,oxuser
- Is value required: yes
Executes a query
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.
The query which is to be executed
Raw output
- Accept value: no
- Is value required: no
- Default:
false
Sets multiple configuration values that are not in module settings
deploy:config [-f|--force-db] [--production] [--staging] [--development] [--testing] [--] <configfile>
config:multiset
This command can import settings into the database that are not found in the module settings. If they are module settings, they are stored in the module configuration yaml, not in the database.
The file path is relative to the shop installation_root_path/var/oxrun_config/. You can also pass a YAML string on the command line.
To create YAML use command oe-console deploy:generate:configration --help
YAML example:
environment:
- "production"
- "staging"
- "development"
- "testing"
config:
1:
blReverseProxyActive:
variableType: bool
variableValue: false
sMallShopURL: http://myshop.dev.local
sMallSSLShopURL: http://myshop.dev.local
2:
blReverseProxyActive:
...
If you want, you can also specify a YAML string on the command line instead of a file, e.g.:
../vendor/bin/oe-console deploy:config $'config:
1:
foobar: barfoo
' --shop-id=1
The file containing the config values, see example/malls.yml.dist. (e.g. dev.yml, stage.yml, prod.yml)
Still write everything into the database.
- Accept value: no
- Is value required: no
- Default:
false
For "production" system
- Accept value: no
- Is value required: no
- Default:
false
For "staging" system
- Accept value: no
- Is value required: no
- Default:
false
For "development" system
- Accept value: no
- Is value required: no
- Default:
false
For "testing" system
- Accept value: no
- Is value required: no
- Default:
false
Generate a yaml with configuration from Database. For command deploy:config
deploy:generate:configuration [-u|--update] [-c|--configfile CONFIGFILE] [--oxvarname OXVARNAME] [--oxmodule OXMODULE] [-d|--no-descriptions] [-l|--language LANGUAGE] [--list] [--production] [--staging] [--development] [--testing]
misc:generate:yaml:config
Configration that is not included in the modules can be saved. With the command: deploy:config they can be read again
Update an exited config file, with data from DB
- Accept value: no
- Is value required: no
- Default:
false
The config file to update or create if not exits
- Is value required: yes
- Default:
'dev_config.yml'
Dump configs by oxvarname. One name or as comma separated List
- Is value required: yes
Dump configs by oxmodule. One name or as comma separated List
- Is value required: yes
No descriptions are added.
- Accept value: no
- Is value required: no
- Default:
false
Speech selection of the descriptions.
- Is value required: yes
- Default:
0
list all saved configrationen
- Accept value: no
- Is value required: no
- Default:
false
For "production" system
- Accept value: no
- Is value required: no
- Default:
false
For "staging" system
- Accept value: no
- Is value required: no
- Default:
false
For "development" system
- Accept value: no
- Is value required: no
- Default:
false
For "testing" system
- Accept value: no
- Is value required: no
- Default:
false
Generate a yaml file for command deploy:module-activator
deploy:generate:module-activator [-c|--configfile CONFIGFILE] [-w|--whitelist] [-b|--blacklist]
misc:generate:yaml:module
Generate a yaml file for command deploy:module-activator
The Config file to change or create if not exits
- Is value required: yes
- Default:
'dev_module.yml'
Takes modules that are always activated. All others remain deactive.
- Accept value: no
- Is value required: no
- Default:
false
Takes modules that always need to be disabled. All others are activated.
- Accept value: no
- Is value required: no
- Default:
false
Links the environment configration files. Ideal for CI/CD
deploy:link:environment [--rm] [--production] [--staging] [--development] [--testing]
In files structure you has multiple files per shop in var/configuration/environment directory. e.g. production.1.yaml, staging.1.yaml This might be useful when deploying files to some specific environment. @see: Modules configuration deployment
Remove the links
- Accept value: no
- Is value required: no
- Default:
false
For "production" system
- Accept value: no
- Is value required: no
- Default:
false
For "staging" system
- Accept value: no
- Is value required: no
- Default:
false
For "development" system
- Accept value: no
- Is value required: no
- Default:
false
For "testing" system
- Accept value: no
- Is value required: no
- Default:
false
Activates multiple modules, based on a YAML file
deploy:module-activator [-s|--skipDeactivation] [-d|--clearModuleData] [--] <yaml>
module:multiactivator
usage: oe-console deploy:module-activator modules.yml
- to activate all modules defined in the YAML file based on a white- or blacklist
Example:
whitelist:
1:
- ocb_cleartmp
- moduleinternals
#- ddoevisualcms
#- ddoewysiwyg
2:
- ocb_cleartmp
priorities:
1:
moduleinternals:
1200
ocb_cleartmp:
950
Supports either a "whitelist" and or a "blacklist" entry with multiple shop ids and the desired module ids to activate (whitelist) or to exclude from activation (blacklist).
With "priorities", you can define the order (per subshop) in which the modules will be activated.
If you want, you can also specify a YAML string on the command line instead of a file, e.g.:
oe-console deploy:module-activator $'whitelist:
1:
- oepaypal
' --shop-id=1
YAML module list filename or YAML string. The file path is relative to /var/www/oxid-esale/var/oxrun_config/
Skip deactivation of modules, only activate.
- Accept value: no
- Is value required: no
- Default:
false
Clear module data in oxconfig.
- Accept value: no
- Is value required: no
- Default:
false
It the same as oe:module:apply-configuration
but faster.
deploy:module-apply-configuration-light
The module configurations will ONLY written into the database.
- Without deactivating or activating the modules
- Without rewrite module configration yaml's
WARNING: If you make changes on metadata.php::controllers|::extend then this command doesn't work.
That automatic activate or deactive module with the param configured: true|false
.
It the same as oe:module:apply-configuration
but faster!
Update the module configuration yaml with the data from the database
deploy:update-module-config [--production] [--staging] [--development] [--testing]
Is the reverse command from oe:module:apply-configuration
.
For "production" system
- Accept value: no
- Is value required: no
- Default:
false
For "staging" system
- Accept value: no
- Is value required: no
- Default:
false
For "development" system
- Accept value: no
- Is value required: no
- Default:
false
For "testing" system
- Accept value: no
- Is value required: no
- Default:
false
Generate a yaml with configuration from Database. For command deploy:config
deploy:generate:configuration [-u|--update] [-c|--configfile CONFIGFILE] [--oxvarname OXVARNAME] [--oxmodule OXMODULE] [-d|--no-descriptions] [-l|--language LANGUAGE] [--list] [--production] [--staging] [--development] [--testing]
misc:generate:yaml:config
Configration that is not included in the modules can be saved. With the command: deploy:config they can be read again
Update an exited config file, with data from DB
- Accept value: no
- Is value required: no
- Default:
false
The config file to update or create if not exits
- Is value required: yes
- Default:
'dev_config.yml'
Dump configs by oxvarname. One name or as comma separated List
- Is value required: yes
Dump configs by oxmodule. One name or as comma separated List
- Is value required: yes
No descriptions are added.
- Accept value: no
- Is value required: no
- Default:
false
Speech selection of the descriptions.
- Is value required: yes
- Default:
0
list all saved configrationen
- Accept value: no
- Is value required: no
- Default:
false
For "production" system
- Accept value: no
- Is value required: no
- Default:
false
For "staging" system
- Accept value: no
- Is value required: no
- Default:
false
For "development" system
- Accept value: no
- Is value required: no
- Default:
false
For "testing" system
- Accept value: no
- Is value required: no
- Default:
false
Generate a yaml file for command deploy:module-activator
deploy:generate:module-activator [-c|--configfile CONFIGFILE] [-w|--whitelist] [-b|--blacklist]
misc:generate:yaml:module
Generate a yaml file for command deploy:module-activator
The Config file to change or create if not exits
- Is value required: yes
- Default:
'dev_module.yml'
Takes modules that are always activated. All others remain deactive.
- Accept value: no
- Is value required: no
- Default:
false
Takes modules that always need to be disabled. All others are activated.
- Accept value: no
- Is value required: no
- Default:
false
Generate a PhpStorm metadata file for auto-completion and a oxid module chain.Ideal for psalm or phpstan
misc:phpstorm:metadata [-o|--output-dir OUTPUT-DIR]
Generate a PhpStorm metadata file for auto-completion and a oxid module chain.Ideal for psalm or phpstan
Writes the metadata for PhpStorm to the specified directory.
- Is value required: yes
Extends the service.yaml file with the commands. So that they are found in oe-console.
misc:register:command [--isModule] [-s|--service-yaml SERVICE-YAML] [-y|--yaml-inline YAML-INLINE] [--] <command-dir>
Extends the service.yaml file with the commands. So that they are found in oe-console.
The folder where the commands are located or Module with option --isModule
Just write the Module and the path and the service-yaml will be found automatically.
- Accept value: no
- Is value required: no
- Default:
false
The service.yaml file that will be updated (default: var/configuration/configurable_services.yaml)
- Is value required: yes
The level where you switch to inline YAML
- Is value required: yes
- Default:
4
Generates a module skeleton
module:generate [-s|--skeleton SKELETON] [--name NAME] [--vendor VENDOR] [--description DESCRIPTION] [--author AUTHOR] [--email EMAIL]
Generates a module skeleton
Zip of a Oxid Module Skeleton
- Is value required: yes
- Default:
'https://github.com/OXIDprojects/oxid-module-skeleton/archive/v6_module.zip'
Module name
- Is value required: yes
Vendor
- Is value required: yes
Description of your Module: OXID eShop Module ...
- Is value required: yes
Author of Module
- Is value required: yes
Email of Author
- Is value required: yes
Lists all modules
module:list
Lists all modules
Activates multiple modules, based on a YAML file
deploy:module-activator [-s|--skipDeactivation] [-d|--clearModuleData] [--] <yaml>
module:multiactivator
usage: oe-console deploy:module-activator modules.yml
- to activate all modules defined in the YAML file based on a white- or blacklist
Example:
whitelist:
1:
- ocb_cleartmp
- moduleinternals
#- ddoevisualcms
#- ddoewysiwyg
2:
- ocb_cleartmp
priorities:
1:
moduleinternals:
1200
ocb_cleartmp:
950
Supports either a "whitelist" and or a "blacklist" entry with multiple shop ids and the desired module ids to activate (whitelist) or to exclude from activation (blacklist).
With "priorities", you can define the order (per subshop) in which the modules will be activated.
If you want, you can also specify a YAML string on the command line instead of a file, e.g.:
oe-console deploy:module-activator $'whitelist:
1:
- oepaypal
' --shop-id=1
YAML module list filename or YAML string. The file path is relative to /var/www/oxid-esale/var/oxrun_config/
Skip deactivation of modules, only activate.
- Accept value: no
- Is value required: no
- Default:
false
Clear module data in oxconfig.
- Accept value: no
- Is value required: no
- Default:
false
Deactivate and activate a module
module:reload [-f|--force-cache] [-s|--skip-cache-clear] [-c|--based-on-config BASED-ON-CONFIG] [--] <module>
Deactivate and activate a module
Module name
cache:clear with --force option
- Accept value: no
- Is value required: no
- Default:
false
skip cache:clear command
- Accept value: no
- Is value required: no
- Default:
false
Checks if module is allowed to be reloaded based on the deploy:module-activator yaml file.
- Is value required: yes
Lists the shops
oxid:shops [-i|--only-ids]
Lists the shops
show only Shop id's. eg. "oe-console oxid:shops --only-ids | xargs -tn1 oe-console ... --shop-id "
- Accept value: no
- Is value required: no
- Default:
false
Returns the route. Which controller and parameters are called.
route:debug [-c|--copy] [--] <url>
Returns the route. Which controller and parameters are called.
Website URL. Full or Path
Copy file path from the class to the clipboard (only MacOS)
- Accept value: no
- Is value required: no
- Default:
false
Creates a new user
user:create
Creates a new user
Sets a new password
user:password <username> <password>
Sets a new password
Username
New password
Updates the views
views:update
Updates the views