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.3.tar.gz (29.0 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.3-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: x_migrate-0.1.3.tar.gz
  • Upload date:
  • Size: 29.0 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.3.tar.gz
Algorithm Hash digest
SHA256 c5dac27e4c69b6d2ef52bd092bf5e8b9a34ec2edbb259dd598c896b105adfa13
MD5 7450db61c75709f59248c1d771f901b7
BLAKE2b-256 93f5de7efc3c4c597a65d8da9e0f83338d0a218152436db7deb38775f99e2651

See more details on using hashes here.

Provenance

The following attestation bundles were made for x_migrate-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: x_migrate-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8adf7dffca34a3af1e025bb2ae4a078f816317e151ba1dd12f8dc563d0b34fcc
MD5 8717cda703af9367315f6fa722d0093b
BLAKE2b-256 16dda6acbdc0fd142662d6cc5086011a13e7895c994407306350b7495279cbf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for x_migrate-0.1.3-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