Search by

yireo / magento2-customer-commands

yireo

N/A

Package info

github.com/yireo/Yireo_CustomerCommands

Type:magento2-module

pkg:composer/yireo/magento2-customer-commands

Fund package maintenance!

yireo

www.paypal.me/yireo

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.0.0 2026-11-25 18:54 UTC

This package is auto-updated.

Last update: 2026-11-28 22:21:42 UTC


README

Magento version PHP version License Latest Version

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: --country is a two-letter ISO code. --region is a region ID, code (like TX) or name that must belong to that country; for countries without predefined regions, a name is stored as text. --default-billing and --default-shipping are flags without a value.
  • customer:address:remove: With --customer_id or --customer_email, the address is only removed when it belongs to that customer. --website can only be used together with one of these options.
  • customer:address:remove and customer:address:remove-all ask for confirmation. In non-interactive mode (scripts, cron, CI) they refuse to remove anything unless --force (-f) is passed. customer:address:remove-all --dry-run only 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.

Current status

Static Tests Unit Tests Integration Tests Playwright DI Compilation