Skip to main content

CLI

All commands live under the mc-sunset: prefix and run from the XenForo installation root: php cmd.php mc-sunset:<command>.

CommandWhat it does
mc-sunset:score-user <user_id>Prints the member's composite score, days inactive, and the tier they would currently be placed in. Read-only.
mc-sunset:status <user_id>Prints the member's current tier, entered-tier date, reactivation model, and a summary of their snapshots. Read-only.
mc-sunset:evaluate [--dry-run] [--limit=N]Runs one evaluator pass inline (bypassing the cron schedule). Honours the master switch, batch size, excluded groups, and request-model freeze. --dry-run reports the target tiers without writing. --limit caps the pass at N candidates.
mc-sunset:transition <user_id> --to=<tier> [--reason=...] [--dry-run]Forces a member to a specific tier through the Sunsetter. Snapshots captured, policies fired, audit written. --dry-run prints what would happen.
mc-sunset:reactivate <user_id> [--model=<model>] [--dry-run]Reactivates a member through the Reactivator. --model overrides the per-tier reactivation model for this run (useful for forcing a partial restore on a member whose tier would otherwise auto-restore).
mc-sunset:test-policy <policy_key> <user_id> [--dry-run] [--reverse]Applies a single policy to a member, bypassing the matrix. Used for ad-hoc verification of a policy's mutations. --reverse runs the inverse (snapshot restore) where applicable. Pass no arguments to list the registered policies.
mc-sunset:reconcile [--repair]Sweeps the add-on's tables for orphaned and inconsistent rows: user-state or snapshot rows with no matching xf_user, stale pending requests on already-active members, missing approval-queue rows. Read-only by default; --repair deletes the unambiguous garbage. Exit code is non-zero while anything remains unresolved.
mc-sunset:self-testCreates a synthetic user inside a rolled-back database transaction and exercises the full lifecycle (snapshot capture, all four destructive transitions, reactivation, approval-queue sync, request-model lockout). No rows survive the run; no mail leaves the server. Used by the release process and the post-install verification step. Exit code is non-zero on any failure.

Common flows

Verify a fresh install:

php cmd.php mc-sunset:self-test

Preview a configuration change without writing:

php cmd.php mc-sunset:evaluate --dry-run --limit=100

Manually reactivate a specific member:

php cmd.php mc-sunset:reactivate 12345

Force a member into a tier (e.g. to test the Policies page on a real account):

php cmd.php mc-sunset:transition 12345 --to=warned --dry-run
php cmd.php mc-sunset:transition 12345 --to=warned

Repair orphaned rows after a botched user delete:

php cmd.php mc-sunset:reconcile # report
php cmd.php mc-sunset:reconcile --repair # delete