Skip to main content

Migrate X (Twitter) lists and follows between accounts

Project description

x-migrate

PyPI version License: MIT

Migrate X (Twitter) lists and follows between accounts.

Extract members from any X list or following page, then follow them or add them to a list on your destination account — with rate-limit detection, progress tracking, and a Rich TUI.

Requirements

  • Python 3.11+
  • Google Chrome installed

Installation

From PyPI (recommended)

pip install x-migrate
playwright install chromium

From source

git clone https://github.com/tongliuTL/x-migrate
cd x-migrate
pip install -e .
playwright install chromium

Quick Start

Tip: All commands support the short alias xm — use it instead of x-migrate to save typing.

1. Run setup wizard (first time only)

xm setup

This creates ~/.x-migrate/config.toml with your source and destination Chrome profile paths and daily follow limit.

2. Extract members from an X list

xm extract --source list --url "https://x.com/i/lists/YOUR_LIST_ID"

The /members suffix is added automatically if omitted.

Or extract from someone's following list:

xm extract --source following --account "@handle"

3. Follow those members from your destination account

Follow up to 20 members (default):

xm follow

Increase the limit:

xm follow --limit 50

Preview who would be followed without launching the browser:

xm follow --dry-run

4. Add to a list instead of following

xm list-add --list-name "My List Name"

5. Check progress

xm report

Shows migration progress from local data (no browser needed). To cross-check against your live following list:

xm report --verify

Rate Limits

X typically allows ~400 follows per day. The script detects rate limiting and stops automatically. Re-run the next day — your progress is saved in ~/.x-migrate/progress/.

Configuration

Configuration is stored in ~/.x-migrate/config.toml:

source_profile = "/path/to/source/profile"
dest_profile = "/path/to/dest/profile"
daily_limit = 20    # default for --limit when not specified
active_job = "a1b2c3d4e5f6"  # auto-set by extract

Data Storage

All data is stored in ~/.x-migrate/:

  • config.toml — settings (profiles, daily limit)
  • profile_source/ — Chrome profile for source account (contains login session)
  • profile_dest/ — Chrome profile for destination account
  • progress/ — per-job progress files (JSON format, automatically managed)

Development

Install with dev dependencies:

pip install -e ".[dev]"

Run tests:

pytest

Releasing a new version

  1. Update version in pyproject.toml
  2. Add a ## [X.Y.Z] — YYYY-MM-DD section to CHANGELOG.md
  3. Commit: git commit -m "Release vX.Y.Z"
  4. Tag and push:
    git tag vX.Y.Z
    git push && git push --tags
    
  5. GitHub Actions runs tests, builds the wheel, publishes a GitHub Release, and pushes to PyPI automatically.

Pre-releases (e.g. v0.2.0-beta.1) are automatically marked as pre-release on GitHub.

Commands

  • xm setup — Create or update configuration
  • xm extract — Extract members from a list or following list
  • xm follow — Follow extracted members on destination account
  • xm list-add — Add extracted members to a list
  • xm report — Show progress from local data; add --verify to scrape live following list

All commands also work as x-migrate <command> if you prefer the full name.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

x_migrate-0.1.1.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

x_migrate-0.1.1-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file x_migrate-0.1.1.tar.gz.

File metadata

  • Download URL: x_migrate-0.1.1.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for x_migrate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 322ee219eabcb23fe835b022997270364e9d2dcc112080c3d50db461db7f6d99
MD5 37fa5259dd535a56b1c8fd680baf6acc
BLAKE2b-256 dc70a855c148ba46923e209ed55d68c693f0596c1d065faf8b165f9f9389426c

See more details on using hashes here.

Provenance

The following attestation bundles were made for x_migrate-0.1.1.tar.gz:

Publisher: release.yml on tongliuTL/x-migrate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file x_migrate-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: x_migrate-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for x_migrate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 83287f09142e1d04dccdfefe4881f8a4c9b89d7575b3c5ee9342583470f866e1
MD5 8aa9b6995dcb3f02311d5c76085d7632
BLAKE2b-256 d6d682bdf67fcbbb4f638bfffcad0ef049f0a2f0a6276696d9bcf75d0c0a0a20

See more details on using hashes here.

Provenance

The following attestation bundles were made for x_migrate-0.1.1-py3-none-any.whl:

Publisher: release.yml on tongliuTL/x-migrate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page