Skip to content

x-use 2.0.0

Choose a tag to compare

@ihuzaifashoukat ihuzaifashoukat released this 23 Jul 22:01

The v2 relaunch of twitter-automation-ai: an installable package, a proper CLI, and a first-class MCP server. The automation engine is unchanged; everything around it is new.

Highlights

  • One-line installers for Windows, macOS, and Linux (install.ps1 / install.sh): clone, venv, install, config bootstrap, and x-use doctor in a single command
  • New CLI: x-use init (interactive setup wizard), x-use run, x-use doctor (preflight checks), x-use mcp
  • MCP server over stdio with 9 tools, so Claude Desktop, Claude Code, Cursor, and other MCP clients can post, reply, search, and engage directly
  • Draft mode on by default: write tools return reviewable drafts and nothing reaches X until approve_draft is called
  • Installable from PyPI: pip install x-use-mcp (PyPI rejected the bare x-use name as too similar to an existing project; import xuse and the x-use command are unchanged)

What changed since v1

  • Packaging: src-layout src/xuse/ package, pyproject.toml, Python 3.10+ floor, x-use console script, project-root anchoring that survives install location
  • CLI: Typer app with in-memory --account and --pipeline scoping (config files never mutated)
  • MCP: 9 tools on the official MCP Python SDK (FastMCP, pinned mcp>=1,<2), lazy per-account browser session pool with idle reaping, persistent draft store in data/drafts.jsonl, structured secret-sanitized error envelopes
  • LLM keys: env / .env overrides above config/settings.json, placeholder rejection from both sources, key values never logged
  • Engine fixes: FileHandler now honors the configured processed_tweets_file; proxy pool hash strategy pins accounts with sha256 (stable across restarts); engagement count parsing handles lowercase k/m suffixes and comma separators
  • Pipeline names shared between the CLI and MCP run_cycle via xuse/pipelines.py
  • Security: config/accounts.json untracked (ships accounts.example.json), cookie paths explicitly gitignored, get_metrics validates account ids against path traversal
  • Tests: 148 pytest tests (pure logic, MCP contract/drafts/sessions, CLI, env keys) plus CI on Python 3.10/3.11/3.12
  • Docs: README rewritten, ARCHITECTURE.md and BEST_PRACTICES.md refreshed, CONFIG_REFERENCE.md now covers the mcp settings block

Upgrade notes

  • Python 3.10 or newer is required
  • The legacy python src/main.py entry point still works via a deprecation shim (removal no earlier than v2.1)
  • Config file formats are unchanged; existing config/settings.json and config/accounts.json keep working