Skip to main content

meshcore-irc-bridge

This is an AI-generated application. The design, code, tests, and documentation in this repository were produced by an AI coding agent (Claude), directed and reviewed by a human maintainer.

A one-way bridge: it connects to a MeshCore companion radio, listens for channel messages, and relays them into IRC channels — one mesh channel mapped to one IRC channel. It never sends anything back to the mesh; IRC messages are received and ignored.

Built on the meshcore Python package for the radio side (BLE, serial, or TCP companion connection). The IRC side is a small hand-rolled asyncio client with first-class IRCv3 SASL support, a NickServ IDENTIFY fallback (with a configurable wait before joining channels), and support for connecting with a fully unregistered nickname.

Install

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"    # from a checkout, until this is published

Configure

Copy config.example.yaml to config.yaml and edit it:

cp config.example.yaml config.yaml
  • mesh.connection — how to reach your companion radio: type: ble (with address), type: serial (with port/baudrate), or type: tcp (with host/port).

  • irc — the IRC server and how to authenticate. irc.auth.mode is one of:

    • sasl — authenticate with AUTHENTICATE PLAIN before registration completes. Requires irc.auth.sasl.username/password.
    • nickserv — connect without SASL, wait for the welcome (001), send PRIVMSG NickServ :IDENTIFY <password>, then wait irc.auth.nickserv.join_wait_seconds before joining channels (long enough for services to apply your cloak/account before you join gated channels). Requires irc.auth.nickserv.password.
    • none — connect with a fully unregistered nickname and join immediately.

    The auth mode is fixed by config — if it fails (e.g. the server doesn't offer SASL, or the password is rejected), the bridge logs the failure and retries the same mode on reconnect rather than silently switching methods.

    Secrets support ${ENV_VAR} interpolation so passwords don't need to sit in the YAML file in plaintext, e.g. password: "${IRC_SASL_PASSWORD}".

  • channels — the mesh-channel-to-IRC-channel mapping, e.g.:

    channels:
      - mesh_channel: 0
        irc_channel: "#mesh-general"
      - mesh_channel: 1
        irc_channel: "#mesh-emergency"
    

    Several mesh channels may map to the same IRC channel. When they do, each relayed line is prefixed with [<mesh_channel>] so messages from either stay attributable once interleaved there (e.g. [0] hello, [1] hi); a mesh channel with an IRC channel all to itself is left unprefixed.

Setting up a channel on the radio itself

This bridge only reads channel messages — it never creates, renames, or rekeys a channel on the companion radio. To set one up (or check what's already configured), use meshcorectl, a companion CLI for MeshCore radios:

meshcorectl create channel 0 "General"   # create/rename channel 0
meshcorectl get channels                  # list what's configured on the radio

Run

meshcore-irc-bridge --config config.yaml
# or
python -m meshcore_irc_bridge --config config.yaml

--log-level (default INFO) controls verbosity.

Development

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest                # 100% line+branch coverage enforced
ruff check .
mypy

Tests never touch real hardware or a real IRC network: the mesh side is exercised against a hardware-free double of meshcore.MeshCore (tests/fakes/meshcore_double.py), and the IRC client is exercised against a real (loopback-only) asyncio TCP server that scripts IRC protocol exchanges (tests/fakes/fake_irc_server.py).

Real end-to-end verification against an actual radio and IRC network is out of scope for the automated test suite — run the bridge against your own setup once installed to confirm it end-to-end.

License

MIT

Download files

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

Source Distribution

meshcore_irc_bridge-0.1.0.tar.gz (45.1 kB view details)

Uploaded Source

Built Distribution

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

meshcore_irc_bridge-0.1.0-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: meshcore_irc_bridge-0.1.0.tar.gz
  • Upload date:
  • Size: 45.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for meshcore_irc_bridge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b253b0245adf8e1115582995a1d0a83d6c9bf3a06fde55face9464e02f8e464c
MD5 a3cb266f2d8009bb0b4101955e4c7900
BLAKE2b-256 21355ab91eb04b55756ee9954face1f857086652d04a6e49a77a7be8bfe784b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for meshcore_irc_bridge-0.1.0.tar.gz:

Publisher: publish.yml on Faradome/meshcore-irc-bridge

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

File details

Details for the file meshcore_irc_bridge-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for meshcore_irc_bridge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c59de515c2fe130b6d63fcdc6ececceb1b6dc0e41b25cf88a1b510a5084e723
MD5 202d660cea2775be03520039aff7e658
BLAKE2b-256 6c6be1c3bc5687fc24ceb292c7b5dbdf6b120f254ec46d9cc8806700bc8708a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for meshcore_irc_bridge-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Faradome/meshcore-irc-bridge

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

Release history Release notifications | RSS feed

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page