Skip to content

Instantly share code, notes, and snippets.

@dfelton
Last active January 20, 2017 04:57
Show Gist options
  • Select an option

  • Save dfelton/58bfc3f2598ac145fd30268e9bb58c0b to your computer and use it in GitHub Desktop.

Select an option

Save dfelton/58bfc3f2598ac145fd30268e9bb58c0b to your computer and use it in GitHub Desktop.
CLI options for Magento 2 CLI

Magento CLI version 2.1.3

Usage:

command [options] [arguments]

Options:

--help (-h)           Display this help message
--quiet (-q)          Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V)        Display this application version
--ansi                Force ANSI output
--no-ansi             Disable ANSI output
--no-interaction (-n) Do not ask any interactive question

Available commands:

help                                      Displays help for a command
list                                      Lists commands
admin
admin:user:create                         Creates an administrator
admin:user:unlock                         Unlock Admin Account
app
app:config:dump                           Create dump of application
cache
cache:clean                               Cleans cache type(s)
cache:disable                             Disables cache type(s)
cache:enable                              Enables cache type(s)
cache:flush                               Flushes cache storage used by cache type(s)
cache:status                              Checks cache status
catalog
catalog:images:resize                     Creates resized product images
catalog:product:attributes:cleanup        Removes unused product attributes.
cron
cron:run                                  Runs jobs by schedule
customer
customer:hash:upgrade                     Upgrade customer's hash according to the latest algorithm
deploy
deploy:mode:set                           Set application mode.
deploy:mode:show                          Displays current application mode.
dev
dev:source-theme:deploy                   Collects and publishes source files for theme.
dev:tests:run                             Runs tests
dev:urn-catalog:generate                  Generates the catalog of URNs to *.xsd mappings for the IDE to highlight xml.
dev:xml:convert                           Converts XML file using XSL style sheets
i18n
i18n:collect-phrases                      Discovers phrases in the codebase
i18n:pack                                 Saves language package
i18n:uninstall                            Uninstalls language packages
indexer
indexer:info                              Shows allowed Indexers
indexer:reindex                           Reindexes Data
indexer:reset                             Resets indexer status to invalid
indexer:set-mode                          Sets index mode type
indexer:show-mode                         Shows Index Mode
indexer:status                            Shows status of Indexer
info
info:adminuri                             Displays the Magento Admin URI
info:backups:list                         Prints list of available backup files
info:currency:list                        Displays the list of available currencies
info:dependencies:show-framework          Shows number of dependencies on Magento framework
info:dependencies:show-modules            Shows number of dependencies between modules
info:dependencies:show-modules-circular   Shows number of circular dependencies between modules
info:language:list                        Displays the list of available language locales
info:timezone:list                        Displays the list of available timezones
maintenance
maintenance:allow-ips                     Sets maintenance mode exempt IPs
maintenance:disable                       Disables maintenance mode
maintenance:enable                        Enables maintenance mode
maintenance:status                        Displays maintenance mode status
migrate
migrate:data                              Main migration of data
migrate:delta                             Migrate the data is added into Magento after the main migration
migrate:settings                          Migrate system configuration
module
module:disable                            Disables specified modules
module:enable                             Enables specified modules
module:status                             Displays status of modules
module:uninstall                          Uninstalls modules installed by composer
queue
queue:consumers:list                      List of MessageQueue consumers
queue:consumers:start                     Start MessageQueue consumer
sampledata
sampledata:deploy                         Deploy sample data modules
sampledata:remove                         Remove all sample data packages from composer.json
sampledata:reset                          Reset all sample data modules for re-installation
setup
setup:backup                              Takes backup of Magento Application code base, media and database
setup:config:set                          Creates or modifies the deployment configuration
setup:cron:run                            Runs cron job scheduled for setup application
setup:db-data:upgrade                     Installs and upgrades data in the DB
setup:db-schema:add-slave                 Move checkout quote related tables to a separate DB server
setup:db-schema:split-quote               Move checkout quote related tables to a separate DB server
setup:db-schema:split-sales               Move sales related tables to a separate DB server
setup:db-schema:upgrade                   Installs and upgrades the DB schema
setup:db:status                           Checks if DB schema or data requires upgrade
setup:di:compile                          Generates DI configuration and all missing classes that can be auto-generated
setup:install                             Installs the Magento application
setup:performance:generate-fixtures       Generates fixtures
setup:rollback                            Rolls back Magento Application codebase, media and database
setup:static-content:deploy               Deploys static view files
    setup:store-config:set                    Installs the store configuration
setup:uninstall                           Uninstalls the Magento application
setup:upgrade                             Upgrades the Magento application, DB data, and schema
support
support:backup:code                       Create Code backup
support:backup:db                         Create DB backup
support:utility:check                     Check required backup utilities
support:utility:paths                     Create utilities paths list
theme
theme:uninstall                           Uninstalls theme
--admin-user           (Required) Admin user
--admin-password       (Required) Admin password
--admin-email          (Required) Admin email
--admin-firstname      (Required) Admin first name
--admin-lastname       (Required) Admin last name
--magento-init-params  Add to any command to customize Magento initialization parameters
                       For example: "MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/example.com&MAGE_DIRS[cache][path]=/var/tmp/cache"
--help (-h)            Display this help message
--quiet (-q)           Do not output any message
--verbose (-v|vv|vvv)  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V)         Display this application version
--ansi                 Force ANSI output
--no-ansi              Disable ANSI output
--no-interaction (-n)  Do not ask any interactive question
--backend-frontname             Backend frontname (will be autogenerated if missing)
--amqp-host                     Amqp server host
--amqp-port                     Amqp server port
--amqp-user                     Amqp server username
--amqp-password                 Amqp server password
--amqp-virtualhost              Amqp virtualhost
--amqp-ssl                      Amqp SSL
--key                           Encryption key
--session-save                  Session save handler
--definition-format             Type of definitions used by Object Manager
--db-host                       Database server host
--db-name                       Database name
--db-user                       Database server username
--db-engine                     Database server engine
--db-password                   Database server password
--db-prefix                     Database table prefix
--db-model                      Database type
--db-init-statements            Database  initial set of commands
--skip-db-validation (-s)       If specified, then db connection validation will be skipped
--http-cache-hosts              http Cache hosts
--base-url                      URL the store is supposed to be available at
--language                      Default language code
--timezone                      Default time zone code
--currency                      Default currency code
--use-rewrites                  Use rewrites
--use-secure                    Use secure URLs. Enable this option only if SSL is available.
--base-url-secure               Base URL for SSL connection
--use-secure-admin              Run admin interface with SSL
--admin-use-security-key        Whether to use a "security key" feature in Magento Admin URLs and forms
--admin-user                    (Required) Admin user
--admin-password                (Required) Admin password
--admin-email                   (Required) Admin email
--admin-firstname               (Required) Admin first name
--admin-lastname                (Required) Admin last name
--cleanup-database              Cleanup the database before installation
--sales-order-increment-prefix  Sales order number prefix
--use-sample-data               Use sample data
--magento-init-params           Add to any command to customize Magento initialization parameters
                                For example: "MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/example.com&MAGE_DIRS[cache][path]=/var/tmp/cache"
--help (-h)                     Display this help message
--quiet (-q)                    Do not output any message
--verbose (-v|vv|vvv)           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V)                  Display this application version
--ansi                          Force ANSI output
--no-ansi                       Disable ANSI output
--no-interaction (-n)           Do not ask any interactive question
--base-url                URL the store is supposed to be available at
--language                Default language code
--timezone                Default time zone code
--currency                Default currency code
--use-rewrites            Use rewrites
--use-secure              Use secure URLs. Enable this option only if SSL is available.
--base-url-secure         Base URL for SSL connection
--use-secure-admin        Run admin interface with SSL
--admin-use-security-key  Whether to use a "security key" feature in Magento Admin URLs and forms
--magento-init-params     Add to any command to customize Magento initialization parameters
                          For example: "MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/example.com&MAGE_DIRS[cache][path]=/var/tmp/cache"
--help (-h)               Display this help message
--quiet (-q)              Do not output any message
--verbose (-v|vv|vvv)     Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V)            Display this application version
--ansi                    Force ANSI output
--no-ansi                 Disable ANSI output
--no-interaction (-n)     Do not ask any interactive question
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment