Sync Twitter and Mastodon nicely
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore initial commit Aug 18, 2018
LICENSE update copyright declaration Jan 17, 2019 bump version to 1.1.0 Sep 25, 2018 fix version number in Jan 17, 2019 update yapf version to 0.24.0 Jan 17, 2019 (v1.1.0)

Sync Twitter and Mastodon nicely ― forward tweets to Mastodon and forward toots to Twitter, carefully not to make duplicate posts on a service. Other features of

  • images are also forwarded each other,
  • sync so-called "thread" and "self BT/RT" as well,
  • shortened URLs (such as*) are expanded before posting, and
  • multiple pairs of Mastodon/Twitter accounts are supported.


This script is designed to work with Python3 (3.5 or later).


All dependencies can be installed by one shot:

$ python3 install


Setup running

After installing the script, run once by hand and fill the following fields:

$ python3
Welcome to Twoot! Please answer a few questions.

#1 First, decide about your application.
Name (optional; empty for ""): 
Website (optional; empty for ""): 

#2 Tell me about your Mastodon account.
Instance (e.g., 
Login e-mail (never stored): 
Login password (never stored): 

#3 Tell me about your Twitter account.
cf. You can get keys and tokens from
API key: 
API secret key: 
Access token: 
Access token secret: 

All configuration done. Thanks!

When the setup mode is completed successfully, all necessary configuration will be stored under $HOME/ No toots nor tweets are sent within the setup mode.

Note: If you want to change these configuration, execute python3 --setup to start setup mode once again or just edit $HOME/ directly.

Regular running

After the setup running, set cron (or whatever) to run python3 regularly, e.g., running every 15 sec:

* * * * * for i in `seq 0 15 59`;do (sleep ${i}; python3 /path/to/ --log=/path/to/twoot.log) & done;

Using profile

You can detect a profile with the command line option --profile (-p) to use this script for multiple accounts. The configuration and the data for a profile NAME are saved to ~/ and ~/ respectively. When you omit the command line option, the "default" profile is automatically selected.


This software is distributed under the MIT license.

Takuto ASAKURA (wtsnjp)