Engagement & Interaction
Browser automation for X/Twitter engagement — liking, replying, bookmarking, hiding replies, and bulk unlike.
Script Selection
| Goal |
File |
Navigate to |
| Like/unlike/reply/bookmark tweets |
src/engagementManager.js |
Tweet URL or timeline |
| Auto-like by keyword |
src/engagementManager.js |
x.com/home or search page |
| Get engagement analytics for a post |
src/engagementManager.js |
Tweet URL |
| Hide replies on your posts |
src/engagementManager.js |
Reply URL |
| Unlike ALL liked posts |
src/unlikeAllPosts.js |
x.com/USERNAME/likes |
| Like + repost + reply to EVERY post in a feed (profile, search, list, hashtag, home) |
scripts/engageProfile.js, xactions engage , or MCP x_engage |
the feed itself, or any terminal |
Engagement Manager
File: src/engagementManager.js
Puppeteer-based module for individual and bulk engagement actions.
Functions
| Function |
Purpose |
likeTweet(page, tweetUrl) |
Like a specific tweet (skips if already liked) |
unlikeTweet(page, tweetUrl) |
Unlike a specific tweet |
replyToTweet(page, tweetUrl, text, { media? }) |
Reply with text and optional media |
bookmarkTweet(page, tweetUrl) |
Bookmark a tweet |
unbookmarkTweet(page, tweetUrl) |
Remove a bookmark |
hideReply(page, replyUrl) |
Hide a reply on your post |
autoLikeByKeyword(page, { keywords, limit, delay, url }) |
Auto-like posts matching keywords |
getEngagementAnalytics(page, tweetUrl) |
Get likes, reposts, replies, impressions |
Auto-Like by Keyword
Scrolls a timeline or search page and likes posts containing any of the specified keywords. Empty keywords array likes all posts.
await autoLikeByKeyword(page, {
keywords: ['AI', 'javascript'],
limit: 20,
delay: 2000,
url: 'https://x.com/home',
});
Reply to Tweet
Navigates to a tweet, types a reply, optionally attaches media, and submits.
Unlike All Posts
File: src/unlikeAllPosts.js
Browser console script that unlikes every post in your Likes tab. Supports keyword filters, dry run mode, rate limit detection, and exports a log.
How to Use
- Navigate to
x.com/YOUR_USERNAME/likes
- Open DevTools (F12) → Console
- Paste the script → Enter
Configuration
maxUnlikes: Infinity — cap on unlikes
skipKeywords: [] — keep likes containing these words
onlyKeywords: [] — only unlike posts matching these words
dryRun: false — preview without unliking
Controls
window.XActions.pause() / .resume() / .abort() / .status()
DOM Selectors
| Element |
Selector |
| Like button |
[data-testid="like"] |
| Unlike button |
[data-testid="unlike"] |
| Reply button |
[data-testid="reply"] |
| Reply input |
[data-testid="tweetTextarea_0"] |
| Reply submit |
[data-testid="tweetButton"] |
| Share button |
[data-testid="share"] |
| Bookmark |
[data-testid="bookmark"] |
| Remove bookmark |
[data-testid="removeBookmark"] |
| Hide reply |
[data-testid="hideReply"] |
| Tweet |
article[data-testid="tweet"] |
| Tweet text |
[data-testid="tweetText"] |
Rate Limiting & Safety
- Engagement Manager: 1.5–2s delay between actions, 2s default for auto-like
- Unlike All: 1–2.5s between unlikes (gaussian randomized), 1.8s scroll delay
- Rate limit detection via
[data-testid="toast"] with 60s cooldown
- Unlike All is irreversible — use
dryRun: true to preview first
- X may restrict after ~400 like/unlike actions per day
Troubleshooting
| Problem |
Solution |
| Like button not found |
Tweet may already be liked — check for unlike button |
| Reply not posting |
Verify tweetTextarea_0 selector; tweet may have reply restrictions |
| Auto-like stops early |
Rate limit hit — script waits 60s and retries |
| Unlike All stops after ~20 |
Rate limit — wait 1 hour and re-run |
1---2name: engagement-interaction3description: Automates X/Twitter engagement actions — like, unlike, reply, bookmark, hide replies, auto-like by keyword, and sweeping an entire profile (like + repost + reply to every post, with template or LLM-written replies). Also bulk-unlikes all posts. Use when users want to automate likes, send replies, manage bookmarks on tweets, hide replies, or clear their entire likes history.4license: Apache-2.05---67# Engagement & Interaction89Browser automation for X/Twitter engagement — liking, replying, bookmarking, hiding replies, and bulk unlike.1011## Script Selection1213| Goal | File | Navigate to |14|------|------|-------------|15| Like/unlike/reply/bookmark tweets | `src/engagementManager.js` | Tweet URL or timeline |16| Auto-like by keyword | `src/engagementManager.js` | `x.com/home` or search page |17| Get engagement analytics for a post | `src/engagementManager.js` | Tweet URL |18| Hide replies on your posts | `src/engagementManager.js` | Reply URL |19| Unlike ALL liked posts | `src/unlikeAllPosts.js` | `x.com/USERNAME/likes` |20| Like + repost + reply to EVERY post in a feed (profile, search, list, hashtag, home) | `scripts/engageProfile.js`, `xactions engage` , or MCP `x_engage` | the feed itself, or any terminal |2122## Engagement Manager2324**File:** `src/engagementManager.js`2526Puppeteer-based module for individual and bulk engagement actions.2728### Functions2930| Function | Purpose |31|----------|---------|32| `likeTweet(page, tweetUrl)` | Like a specific tweet (skips if already liked) |33| `unlikeTweet(page, tweetUrl)` | Unlike a specific tweet |34| `replyToTweet(page, tweetUrl, text, { media? })` | Reply with text and optional media |35| `bookmarkTweet(page, tweetUrl)` | Bookmark a tweet |36| `unbookmarkTweet(page, tweetUrl)` | Remove a bookmark |37| `hideReply(page, replyUrl)` | Hide a reply on your post |38| `autoLikeByKeyword(page, { keywords, limit, delay, url })` | Auto-like posts matching keywords |39| `getEngagementAnalytics(page, tweetUrl)` | Get likes, reposts, replies, impressions |4041### Auto-Like by Keyword4243Scrolls a timeline or search page and likes posts containing any of the specified keywords. Empty keywords array likes all posts.4445```javascript46await autoLikeByKeyword(page, {47 keywords: ['AI', 'javascript'],48 limit: 20,49 delay: 2000,50 url: 'https://x.com/home',51});52```5354### Reply to Tweet5556Navigates to a tweet, types a reply, optionally attaches media, and submits.5758## Unlike All Posts5960**File:** `src/unlikeAllPosts.js`6162Browser console script that unlikes every post in your Likes tab. Supports keyword filters, dry run mode, rate limit detection, and exports a log.6364### How to Use65661. Navigate to `x.com/YOUR_USERNAME/likes`672. Open DevTools (F12) → Console683. Paste the script → Enter6970### Configuration7172- `maxUnlikes: Infinity` — cap on unlikes73- `skipKeywords: []` — keep likes containing these words74- `onlyKeywords: []` — only unlike posts matching these words75- `dryRun: false` — preview without unliking7677### Controls7879- `window.XActions.pause()` / `.resume()` / `.abort()` / `.status()`8081## DOM Selectors8283| Element | Selector |84|---------|----------|85| Like button | `[data-testid="like"]` |86| Unlike button | `[data-testid="unlike"]` |87| Reply button | `[data-testid="reply"]` |88| Reply input | `[data-testid="tweetTextarea_0"]` |89| Reply submit | `[data-testid="tweetButton"]` |90| Share button | `[data-testid="share"]` |91| Bookmark | `[data-testid="bookmark"]` |92| Remove bookmark | `[data-testid="removeBookmark"]` |93| Hide reply | `[data-testid="hideReply"]` |94| Tweet | `article[data-testid="tweet"]` |95| Tweet text | `[data-testid="tweetText"]` |9697## Rate Limiting & Safety9899- **Engagement Manager:** 1.5–2s delay between actions, 2s default for auto-like100- **Unlike All:** 1–2.5s between unlikes (gaussian randomized), 1.8s scroll delay101- Rate limit detection via `[data-testid="toast"]` with 60s cooldown102- **Unlike All is irreversible** — use `dryRun: true` to preview first103- X may restrict after ~400 like/unlike actions per day104105## Troubleshooting106107| Problem | Solution |108|---------|----------|109| Like button not found | Tweet may already be liked — check for unlike button |110| Reply not posting | Verify `tweetTextarea_0` selector; tweet may have reply restrictions |111| Auto-like stops early | Rate limit hit — script waits 60s and retries |112| Unlike All stops after ~20 | Rate limit — wait 1 hour and re-run |