Command Reference

Run Meerkat commands through Artisan or Statamic's please executable.

#Install and check setup

#meerkat:install

Publishes the comment blueprint and migrations, then runs the migrations on meerkat.database.connection (or the application's default connection).

1php artisan meerkat:install
2php artisan meerkat:install --no-migrate
3php artisan meerkat:install --force
  • --no-migrate: publish without running migrations.
  • --force: overwrite already-published blueprint and migration files.

#meerkat:health

Checks the configured database connection, published blueprint, and required tables. It returns a failure exit code when a check fails.

1php artisan meerkat:health

#Import and maintenance

#meerkat:sync

Imports or updates threads and comments from the filesystem mirror. It is safe to rerun; use --dry-run to preview changes.

1php artisan meerkat:sync
2php artisan meerkat:sync --path=/srv/backup/comments
3php artisan meerkat:sync --dry-run

See Filesystem Mirror for the on-disk format and recovery workflow.

#meerkat:sync-titles

Refreshes each thread's cached title, entry ID, site, and collection from its published Statamic entry. The command does not rename thread IDs.

1php artisan meerkat:sync-titles --chunk=100

#meerkat:sync-metrics

Rebuilds thread_metrics from comments that are not soft-deleted. Use it after imports or database changes made outside Meerkat.

1php artisan meerkat:sync-metrics --chunk=100

#meerkat:sync-users-meta

Refreshes users_meta for Statamic users referenced by comments and reports missing users.

1php artisan meerkat:sync-users-meta --chunk=100

#Identity and retention

#meerkat:export-identity

Exports rows associated with an email address, user ID, or both as JSON.

1php artisan meerkat:export-identity --email=person@example.com --out=/tmp/meerkat.json

Options: --email, --user-id, --collection, --site, and --out. Specify at least one identity option. Without --out, the command writes JSON to standard output.

#meerkat:forget-identity

Anonymizes, tombstones, or hard-deletes rows associated with an identity.

1php artisan meerkat:forget-identity --email=person@example.com --mode=anonymize --dry-run

Options: --email, --user-id, --mode=anonymize|tombstone|hard-delete, --collection, --site, --scrub-moderator-actions, --dry-run, and --force. Review the selected rows and make a database backup before using a destructive mode.

#meerkat:purge

Removes or anonymizes one type of old comment data.

1php artisan meerkat:purge --tombstones --older-than=90 --dry-run
2php artisan meerkat:purge --spam --older-than=30 --force
3php artisan meerkat:purge --rejected --older-than=90 --force
4php artisan meerkat:purge --anonymize-request-metadata --older-than=365 --force

Choose --tombstones, --spam, --rejected, or --anonymize-request-metadata, plus the required age in days. Optional filters are --collection, --site, and --thread. --dry-run shows the target rows, and --force skips confirmation.

Test destructive commands with --dry-run and make a database backup. Permanent deletion also removes descendant replies.

Was this page helpful?