Skip to main content

Migrate X (Twitter) lists and follows between accounts

Project description

x-migrate

Migrate X (Twitter) lists and follows between accounts.

Note: This is a personal tool for migrating X (Twitter) accounts. It helps you extract members from an X list or following list and then follow or add those members to a list on your destination account.

Requirements

  • Python 3.11+
  • Google Chrome installed

Installation

git clone https://github.com/tongliuTL/x-migrate
cd x-migrate
python3 -m venv venv
source venv/bin/activate
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/members"

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 your following/members counts and migration progress.

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
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, and publishes a GitHub Release 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 and statistics

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.0.tar.gz (27.3 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.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: x_migrate-0.1.0.tar.gz
  • Upload date:
  • Size: 27.3 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.0.tar.gz
Algorithm Hash digest
SHA256 bd7049fcfa4429036257028456c41bab0354ee2a8e5408d93c0f9b5eabfaad4a
MD5 ed6eb55979e4576480b0dc483f2fc472
BLAKE2b-256 08ed4145cadd978b0481a65aa27aa812ebd9027703d810b6fb3e4b44749e577d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: x_migrate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1af57663ca133adf7875960fa74ddb6592e357da14313a7f83d35cf05fb74c07
MD5 1d00f6f91372a2e81cf1b0a940382d09
BLAKE2b-256 9547d8121b2021c033d95274e64698924bc20de0cae4c875650cab4a218d8564

See more details on using hashes here.

Provenance

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