x-cleaner  ·  v1  ·  replies only فارسی

Delete your own X.com replies, slowly.

A local Node.js + Playwright tool that drives your own logged-in browser. No API tokens, no third-party server, no password automation. Pacing target: ~6 deletes per minute.

Get the source on GitHub Install

What it actually does

v1 walks x.com/<handle>/with_replies in a visible Chromium window you control, identifies your own reply cards, and deletes them one at a time through the same caret menu you would click yourself. The browser profile is yours. Cookies live in a local ./.profile/ directory. Originals, reposts, and likes are deferred — the modules exist and are tested, just not wired into the CLI yet.

How it works (3 steps)

  1. Log in once. npm run login opens Chromium against the X login flow. You sign in by hand. Cookies land in ./.profile/.
  2. Dry run. npm run run:cleaner -- --handle=<you> --dry-run --max=20 prints which reply ids would be deleted. No clicks happen.
  3. Real run. Drop --dry-run. Watch the visible window. Ctrl-C stops at any point — state is flushed after every action, so resume is the same command again.

Pacing defaults

KnobDefault
Inter-deletion gap6–14 s
Long break every30 deletes
Long break length60–180 s
Hourly cap360
Daily cap1500
Errors → 30 min pause3
Errors → abort10

When something breaks

X ships UI changes on its own schedule. Selectors are a snapshot of the DOM on 2026-04-27. When a selector goes stale, the runner saves a diagnostic bundle to state/diagnostics/<ts>-<reason>/:

Open the bundle, find the selector that broke, update src/selectors.ts and test/fixtures/with-replies.html, re-run tests, then resume.

Install

git clone https://github.com/cocodedk/x-cleaner
cd x-cleaner
npm install
npx playwright install chromium

Requires Node 20+.

Caveats — read these

Grey area of X's terms. Browser automation of your own account for content deletion sits in a grey area. We mirror what Cyd, Redact, XDelete do. Use a real account at your own discretion.

Selectors break without notice. No CAPTCHA solving, no proxy rotation, no headless-stealth tricks. If X challenges you, the run aborts and you handle it as a human.

License & source

Apache-2.0. Source on github.com/cocodedk/x-cleaner. Issues and selector-breakage reports welcome.