PHPackages                             designcoil/module-import-command - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. designcoil/module-import-command

ActiveMagento2-module[CLI &amp; Console](/categories/cli)

designcoil/module-import-command
================================

CLI commands (product:import:validate, product:import:run) wrapping Magento's native ImportExport pipeline

1.0.0(4mo ago)131MITPHPPHP ~8.2.0||~8.3.0||~8.4.0

Since Feb 12Pushed 4mo agoCompare

[ Source](https://github.com/designcoil/module-import-command)[ Packagist](https://packagist.org/packages/designcoil/module-import-command)[ RSS](/packages/designcoil-module-import-command/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

CLI Import for Magento 2
========================

[](#cli-import-for-magento-2)

CLI commands that wrap Magento's native **ImportExport** pipeline - the exact same codepath used by **Admin &gt; System &gt; Data Transfer &gt; Import**.

Useful for large catalog imports without Admin timeouts. Importing 10k–100k+ products through the Admin UI often results in PHP max execution time exceeded, browser session expiration, Cloudflare timeouts. Running imports via CLI avoids web server limits and is suitable for large catalogs and scheduled batch jobs.

Commands
--------

[](#commands)

CommandDescription`product:import:validate`Validate a CSV import file and report errors`product:import:run`Validate, import, and invalidate indexesRequirements
------------

[](#requirements)

- Magento 2.4.x (Open Source or Commerce)
- PHP 8.2, 8.3, or 8.4

Installation
------------

[](#installation)

### Via Composer (recommended)

[](#via-composer-recommended)

```
composer require designcoil/module-import-command
bin/magento module:enable DesignCoil_ImportCommand
bin/magento setup:upgrade
bin/magento setup:di:compile
```

### Manual

[](#manual)

Copy the module to `app/code/DesignCoil/ImportCommand/`, then:

```
bin/magento module:enable DesignCoil_ImportCommand
bin/magento setup:upgrade
bin/magento setup:di:compile
```

Usage
-----

[](#usage)

### Validate a CSV file

[](#validate-a-csv-file)

```
bin/magento product:import:validate \
  --entity=catalog_product \
  --file=var/import/products.csv
```

Output on success:

```
Validation result: OK

Summary:
  Rows processed:       100
  Entities processed:   100
  Invalid rows:         0
  Total errors:         0
  Error limit exceeded: No

```

Output on failure:

```
Validation result: FAILED

Errors:
  Wrong URL/path used for attribute additional_images in row(s): 1, 2

Summary:
  Rows processed:       100
  Entities processed:   100
  Invalid rows:         2
  Total errors:         2
  Error limit exceeded: No

```

### Run a full import

[](#run-a-full-import)

```
bin/magento product:import:run \
  --entity=catalog_product \
  --file=var/import/products.csv \
  --behavior=append \
  --images-file-dir=var/import/images
```

Output:

```
Validating import data...
Validation passed. Importing 100 row(s) in 1 batch(es)...
  1/1 batches [============================] 100%

Import completed successfully.

  Created: 80
  Updated: 20
  Deleted: 0

Summary:
  Rows processed:       100
  Entities processed:   100
  Invalid rows:         0
  Total errors:         0
  Error limit exceeded: No

```

CLI Options
-----------

[](#cli-options)

All options are available on both commands.

### Required

[](#required)

OptionDescription`--entity`Entity type code: `catalog_product`, `customer`, `customer_address`, etc.`--file`Path to CSV file. Absolute or relative to Magento root.### Import behavior

[](#import-behavior)

OptionDefaultDescription`--behavior``append`Import behavior: `append`, `add_update`, `replace`, `delete`### Validation

[](#validation)

OptionDefaultDescription`--validation-strategy``validation-stop-on-errors``validation-stop-on-errors` or `validation-skip-errors``--allowed-error-count``10`Maximum number of errors before stopping### CSV format

[](#csv-format)

OptionDefaultDescription`--field-separator``,`Column delimiter`--multiple-value-separator``,`Separator for multi-value fields`--enclosure``"`CSV field enclosure character`--fields-enclosure`offFlag. Enables fields enclosed by double-quotes (matches Admin checkbox)### File &amp; locale

[](#file--locale)

OptionDefaultDescription`--images-file-dir`*(none)*Images directory relative to Magento root (e.g. `var/import/images`)`--locale`*(none)*Locale code for import (e.g. `en_US`)How it works
------------

[](#how-it-works)

1. The CSV file is copied into `var/importexport/` - the same temp location Magento's admin upload uses.
2. A native `Magento\ImportExport\Model\Import\Source\Csv` adapter is created.
3. `Import::validateSource()` validates the data and saves it to the database in batches.
4. `Import::importSource()` reads those batches and performs the actual create/update/delete operations.
5. `Import::invalidateIndex()` marks related indexers for reindex.

This is identical to clicking **Check Data** and then **Import** in the admin panel.

Examples
--------

[](#examples)

Product import with semicolon-delimited CSV:

```
bin/magento product:import:run \
  --entity=catalog_product \
  --file=/absolute/path/to/products.csv \
  --behavior=append \
  --field-separator=";" \
  --multiple-value-separator="|" \
  --images-file-dir=var/import/images \
  --fields-enclosure
```

Customer import, skip errors:

```
bin/magento product:import:run \
  --entity=customer \
  --file=var/import/customers.csv \
  --behavior=add_update \
  --validation-strategy=validation-skip-errors \
  --allowed-error-count=50
```

Validate only (dry run):

```
bin/magento product:import:validate \
  --entity=catalog_product \
  --file=var/import/products.csv \
  --validation-strategy=validation-skip-errors \
  --allowed-error-count=100 \
  --images-file-dir=var/import/images
```

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance74

Regular maintenance activity

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

141d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f7b4786cf4d6526d25736c81f5cfda62a7e1c45b810ae298b9e19af4410f7c0?d=identicon)[designcoil](/maintainers/designcoil)

---

Top Contributors

[![alex-netalico](https://avatars.githubusercontent.com/u/54718241?v=4)](https://github.com/alex-netalico "alex-netalico (2 commits)")[![designcoil](https://avatars.githubusercontent.com/u/8476300?v=4)](https://github.com/designcoil "designcoil (1 commits)")

---

Tags

clicsvimportcatalogmagento2product-import

### Embed Badge

![Health badge](/badges/designcoil-module-import-command/health.svg)

```
[![Health](https://phpackages.com/badges/designcoil-module-import-command/health.svg)](https://phpackages.com/packages/designcoil-module-import-command)
```

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B13.9k](/packages/symfony-console)[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.7k357.7M11.1k](/packages/nunomaduro-collision)[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k271.5M385](/packages/nunomaduro-termwind)[wp-cli/php-cli-tools

Console utilities for PHP

68227.8M375](/packages/wp-cli-php-cli-tools)[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[myparcelnl/magento

A Magento 2 module that creates MyParcel labels

1860.2k](/packages/myparcelnl-magento)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
