agentleFS
nirholasnirholas/XActions/skills/xactions-cli/SKILL.md

xactions-cli

Skill648 starsChanged 9 months agoApache-2.0View on GitHub

Command-line interface for scraping X/Twitter data, managing MCP server config, and running automation. Scrapes profiles, followers, tweets, search results, and more from terminal. Outputs text, JSON, or CSV. Uses Puppeteer stealth. Use when running Twitter operations from command line or automated pipelines.

  • Installs packages

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default output is pretty-printed to terminal with colored formatting.

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

XActions CLI

Entry point: src/cli/index.js. Config stored at ~/.xactions/config.json.

Installation

npm install -g xactions

Authentication

xactions login    # Interactive prompt for auth_token cookie
xactions logout   # Removes saved cookie
xactions info     # Show current auth status and config

Get your auth_token: DevTools (F12) -> Application -> Cookies -> x.com -> copy auth_token value.

Scraping Commands

xactions profile <username>
xactions followers <username> [-l <limit>] [-o json|csv]
xactions following <username> [-l <limit>] [-o json|csv]
xactions non-followers <username>
xactions tweets <username> [-l <limit>] [-o json|csv]
xactions search "<query>" [-l <limit>] [-o json|csv]
xactions hashtag <tag> [-l <limit>] [-o json|csv]
xactions thread <url>
xactions media <username> [-l <limit>]

MCP Server Commands

xactions mcp-config                     # Generate config for Claude Desktop
xactions mcp-config --client cursor     # Generate for Cursor
xactions mcp-config --client windsurf   # Generate for Windsurf
xactions mcp-config --client vscode     # Generate for VS Code
xactions mcp-config --write             # Write config directly to file

The mcp-config command auto-detects your OS and generates the correct config file path.

Output Flags

FlagDescription
-l, --limit <n>Maximum items to scrape
-o, --output <format>json or csv — saves to {username}_{command}.{ext}

Default output is pretty-printed to terminal with colored formatting.

Programmatic API

The CLI wraps the same scraper API available as a library:

import { createBrowser, createPage, loginWithCookie,
  scrapeProfile, scrapeFollowers, scrapeFollowing, scrapeTweets,
  searchTweets, scrapeHashtag, scrapeThread, scrapeMedia,
  exportToJSON, exportToCSV } from 'xactions';

Examples

# Scrape a profile
xactions profile elonmusk

# Export followers as CSV
xactions followers nichxbt -l 200 -o csv

# Search tweets and save as JSON
xactions search "AI agents" -l 50 -o json

# Unroll a thread
xactions thread https://x.com/nichxbt/status/1234567890

# Generate Claude Desktop MCP config
xactions mcp-config --write

Troubleshooting

ProblemSolution
"Not authenticated"Run xactions login first
Browser won't launchInstall Chromium: npx puppeteer browsers install chrome
Scraping returns emptyAccount may be private or auth_token expired
Command not foundReinstall: npm install -g xactions
MCP config path wrongUse --client flag to specify your IDE

Related Skills

  • twitter-scraping — Detailed scraper API documentation
  • xactions-mcp-server — MCP server setup and tools

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.