Skip to main content

Command Line Interface

Some jobs do not belong in a browser. A feed over a large catalog will outlast a PHP timeout, a deploy script needs a gate that fails loudly, and when something is broken you want output you can read rather than a spinner.

These commands do all of that. They run the same engines the admin does, without the time limit.

Generate feeds

php bin/magento mirasvit:feed:export

This command can use one of the following options:

OptionDescription
--id=1the actual ID of the feed. Use this to generate only the specified feed (e.g., ID is 1).
--step=100use if your server has sufficient resources, you can adjust the processing step size to improve performance (e.g., steps is 100). By default, the step value is 50. Increasing it can speed up feed generation, while lowering it can reduce server load.

Deliver feeds

php bin/magento mirasvit:feed:delivery

This command will deliver all active feeds to marketplaces if configured. It can use one of the following options:

OptionDescription
--id=1the actual ID of the feed. Use this to deliver only the specified feed (e.g., ID is 1).

Run AI optimization

php bin/magento mirasvit:feed:ai:optimize

Runs AI feed optimization until all pending work is covered. It uses the same engine as the background cron job - the same portions, the same approve mode, the same per-profile time limit - only the pace differs. Only enabled profiles are considered.

OptionDescription
--profile=CODEthe code of the profile to optimize. Repeatable, so --profile=title_google --profile=description_shopping runs both. All enabled profiles when omitted.
--limit=100stop after this many items in total. Useful for a controlled first run on a large catalog.

The command prints per-profile totals and a summary of items processed, failed, skipped and tokens spent. It exits with 1 when every launch failed, which makes it safe to use in a deploy script. If no AI provider is configured it prints the reason and exits 0 without spending anything.

Note

This command is only needed when you want to force the work through faster than the once-a-minute cron job manages, or to run a catch-up after a long period with cron stopped. In normal operation nothing has to be run by hand.


Validate generated feeds

php bin/magento mirasvit:feed:validate

Checks generated feed files for structural problems - malformed XML, a row with the wrong number of columns, invalid JSON - and exits non-zero when it finds one. Useful as a post-generation gate in a deploy or CI script.

OptionDescription
--feed=1validate only the feed with this ID. By default every active feed is validated.
--format=jsonoutput format, text or json. Defaults to text.