WP-CLI commands
Run the plugin's big jobs from the command line: refresh, export, import, scan, rebuild the usage index, demo data, bring another plugin's products over.
Registered as wp sda. Each command runs the same code as its button in the admin.
wp sda refresh: one scheduler run now (prices, alerts, due reports and the content scans), even if automatic refresh is off, like "Run now".wp sda export<file> [--format=csv|json] [--force]: writes the catalog. The format defaults to the file extension, and an existing file is not overwritten without --force.wp sda import<file> [--format=csv|json]: imports products and generic links. Products are matched by ASIN; generic links are created again every time. Rows with problems are reported as warnings.wp sda scan[--only=links|health]: one batch of the internal-linking scan and of the broken-link check (a Premium feature). Run it again to cover a large site.wp sda usage-rebuild: re-reads every post for the "Used on" index, after a big import or restore.wp sda migrate products[--dry-run] [--merge=fill|mine|theirs] [--no-categories] [--no-tags] [--no-images]: brings the products of Amazing Affiliates into your catalog, as "Bring products over" does on Switch from another plugin. --dry-run only says what would happen. It prints the run's number;wp sda migrate products --undo=<run> undoes it.wp sda demo seed|remove|status: adds or removes a made-up demo (eight invented manual products, a comparison table, a generic link, a page and thirty days of invented clicks). Every link goes to example.com, and remove takes out exactly what seed added.