Magento 2 OpenAI Commerce CLI Commands | Generate AI Product Feed
Looking for Magento 2 OpenAI commerce integration? View the full Magento 2 OpenAI commerce integration page to explore features, configuration options, and pricing.
Command line tools for the OpenAI Commerce extension. These commands are useful for manual feed generation, automation scripts, and troubleshooting.
Available Commands
| Command | Description |
|---|---|
mm-openai:feed:create |
Generate the OpenAI Commerce feed |
mm-openai:feed:cleanup |
Remove old feed files |
mm-openai:feed:create
Generates the OpenAI Commerce JSON feed. This is the same feed that runs via cron.
# Generate feeds for all enabled store views
bin/magento mm-openai:feed:create
# Generate feed for specific store view only
bin/magento mm-openai:feed:create --store-id=1
Options:
| Option | Description |
|---|---|
--store-id |
Generate feed for this store view only. If omitted, all enabled store views are processed. |
Output: Shows progress and the number of products exported per store view.
Use this when:
- Testing feed generation without waiting for cron
- Troubleshooting feed issues (CLI provides more detailed output)
- Running feed generation from deployment scripts
- Manual feed refresh after catalog updates
mm-openai:feed:cleanup
Removes old feed files from the feed directory. Useful for cleaning up storage.
bin/magento mm-openai:feed:cleanup
Use this when:
- Disk space is running low
- You want to remove outdated feed files
- After changing feed filenames
Examples
Manual feed generation after catalog update
# Generate fresh feed immediately
bin/magento mm-openai:feed:create --store-id=1
Generate all feeds (deployment script)
# After deployment, regenerate all feeds
bin/magento cache:flush
bin/magento mm-openai:feed:create
Troubleshoot specific store view
# Generate with output visible
bin/magento mm-openai:feed:create --store-id=1
# Check the generated feed
cat var/export/openai/openai_1.json | head -100
Need More Help?
Documentation:
- All Help Articles - Complete documentation overview
Support:
- Contact Support - Get help from our team
For a complete overview of features and configuration options, see Magento 2 OpenAI commerce integration.