social media crossposting tool. 3rd time's the charm
mastodon misskey crossposting bluesky
Python 100.0%
Other 0.1%
16 2 0

Clone this repository

https://tangled.org/zenfyr.dev/xpost
git@knot.synth.download:zenfyr.dev/xpost

For self-hosted knots, clone URLs may differ based on your setup.

README.md

XPost#

put more readme here uhhh

a silly little crossposting tool based on the mastodon streaming api.

this tool is very, very not production ready or something. use with caution.

Installation#

first install ffmpeg with ffprobe, make sure they are available on PATH! ffmpeg is required to crosspost media.

then get uv and sync the project

uv sync

generate settings.json on first launch

uv run main.py

Settings#

the tool allows you to specify an input and multiple outputs to post to.

some options accept a envvar syntax:

{
    "token": "env:TOKEN"
}

Inputs#

Mastodon WebSocket mastodon-wss#

listens to the user's home timeline for new posts, crossposts only the public/unlisted ones by the user.

{
    "type": "mastodon-wss", // type
    "instance": "env:MASTODON_INSTANCE", // mastodon instance
    "token": "env:MASTODON_TOKEN", // user token (use webtools)
    "options": {
        "allowed_visibility": [
            "public",
            "unlisted"
        ]
    }
}

any instance implementing /api/v1/instance, /api/v1/accounts/verify_credentials and /api/v1/streaming?stream will work fine.

confirmed supported:

  • Mastodon
  • Iceshrimp.NET
  • Akkoma

confirmed unsupported:

  • Mitra
  • Sharkey

Misskey WebSocket#

listens to the homeTimeline channel for new posts, crossposts only the public/home ones by the user.

IMPORTANT: Misskey WSS does Not support deletes, you must delete posts manually. if you know how i can listen to all note events, i would appreciate your help.

Generate an access token with the View your account information scope.

{
    "type": "misskey-wss", // type
    "instance": "env:MISSKEY_INSTANCE",  // misskey instance
    "token": "env:MISSKEY_TOKEN",
    "options": {
        "allowed_visibility": [
            "public",
            "home"
        ]
    }
}

Misskey API is not very good, this also wasn't tested on vanilla misskey.

confirmed supported:

  • Sharkey

Outputs#

Bluesky#

in the bluesky block, you can configure who is allowed to reply to and quote the new posts.

{
    "type": "bluesky", // type
    "handle": "env:BLUESKY_HANDLE", // handle (e.g. melontini.me)
    "app_password": "env:BLUESKY_APP_PASSWORD", // https://bsky.app/settings/app-passwords
    "did": "env:BLUESKY_DID", // use a DID instead of handle (avoids handle resolution)
    "pds": "env:BLUESKY_PDS", // specify Your PDS directly (avoids DID doc lookup)
    "options": {
        "quote_gate": false, // block users from quoting the post
        "thread_gate": [ // block replies. leave empty to disable replies
          "mentioned",
          "following",
          "followers",
          "everybody" // allow everybody to reply (ignores other options)
        ]
    }
}