yireo / magento2-customer-commands
N/A
Package info
github.com/yireo/Yireo_CustomerCommands
Type:magento2-module
pkg:composer/yireo/magento2-customer-commands
Requires
- php: >=8.2 <8.6
- ext-pcre: *
- magento/framework: ^103.0
- magento/module-customer: ^103.0
- magento/module-directory: ^100.4
- magento/module-store: ^101.0
- symfony/console: ^5.0 | ^6.0 | ^7.0
Requires (Dev)
- loki/magento2-functional-tests: @dev
- phpunit/phpunit: ^10.5
- yireo/magento2-integration-test-helper: ~0.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-28 22:21:42 UTC
README
This Magento 2 module adds various CLI commands to manage customers
Installation
Install this package via composer:
composer require yireo/magento2-customer-commands
Next, enable this module:
bin/magento module:enable Yireo_CustomerCommands
Usage
All commands identify a customer with either --customer_id or --customer_email (not both). With --website (ID or code), the customer is looked up in that website, which is needed when customer accounts are shared per website. With global account sharing, --website only selects the scope of the lookup and does not need to match the website the customer was created in.
bin/magento customer:address:list --customer_email=jane@example.com --website=base
bin/magento customer:address:add --customer_id=42 --firstname=Jane --lastname=Doe --street="1 Congress Avenue" \
--city=Austin --postcode=78701 --region=Texas --country=US --telephone=0123456789 --default-billing --default-shipping
bin/magento customer:address:remove 12 --customer_id=42
bin/magento customer:address:remove-all --customer_email=jane@example.com --dry-run
customer:address:add:--countryis a two-letter ISO code.--regionis a region ID, code (likeTX) or name that must belong to that country; for countries without predefined regions, a name is stored as text.--default-billingand--default-shippingare flags without a value.customer:address:remove: With--customer_idor--customer_email, the address is only removed when it belongs to that customer.--websitecan only be used together with one of these options.customer:address:removeandcustomer:address:remove-allask for confirmation. In non-interactive mode (scripts, cron, CI) they refuse to remove anything unless--force(-f) is passed.customer:address:remove-all --dry-runonly shows what would be removed, and the command exits with a failure code when some addresses could not be removed.
Note that customer:address:list prints personal data, and options like --customer_email end up in your shell history.