Python API & client shell for talking to Meshtastic devices
Project description
mtjk (Meshtastic Python Fork)
mtjk is a fork of the Meshtastic Python project, published as mtjk.
It is intended to be a drop-in, backward-compatible replacement for upstream:
- package import namespace remains
meshtastic - CLI command remains
meshtastic - existing API compatibility is intentionally preserved
mtjk is a maintained fork, published separately while changes are validated and selectively upstreamed.
Work on this fork began in September 2025; early BLE-focused details are in BLE.md.
What Changed in This Fork
- major BLE and interface internals were refactored for maintainability while keeping compatibility shims in place
- concurrency and lifecycle paths were tightened to reduce race-condition and shutdown edge cases
- CI and release workflows were modernized, including Trusted Publisher-based PyPI release flow
For technical details, see:
- REFACTOR_PROGRAM.md: rationale and early change log for the major refactor work in this fork.
- COMPATIBILITY.md: canonical inventory of compatibility shims, deprecations, and migration mapping.
- CONTRIBUTING.md: local setup, CI-equivalent checks, and contributor workflow conventions.
Install the CLI (recommended: pipx)
pipx is recommended for CLI tools so each app gets an isolated environment.
1) Remove prior installs first (recommended)
If you previously installed upstream meshtastic, remove it before installing this fork.
# If installed with pipx:
pipx uninstall meshtastic || true
# If installed with pip in a Python environment:
python3 -m pip uninstall -y meshtastic
2) Install this fork
pipx install mtjk
3) Verify
meshtastic --version
Install latest from Git (develop)
To install the latest unreleased version from this repository (clean install):
# If you previously installed upstream via pipx, remove it first:
pipx uninstall meshtastic || true
pipx uninstall mtjk || true
pipx install "git+https://github.com/jeremiah-k/meshtastic-python.git@develop"
Upgrade / Uninstall
pipx upgrade mtjk
pipx uninstall mtjk
Developer Usage (existing Meshtastic API)
Dependency name is mtjk, but import namespace remains meshtastic.
Important:
- If your dependency spec says
meshtastic, you will install upstream. - Use
mtjkin dependency specs to install this fork. - This fork does not provide
import mtjk.
requirements.txt
mtjk
Unreleased from Git:
mtjk @ git+https://github.com/jeremiah-k/meshtastic-python.git@develop
If you need optional CLI extras in a dependency spec:
mtjk[cli]
mtjk[cli] @ git+https://github.com/jeremiah-k/meshtastic-python.git@develop
pyproject.toml (PEP 621)
[project]
dependencies = [
"mtjk",
]
Unreleased from Git:
[project]
dependencies = [
"mtjk @ git+https://github.com/jeremiah-k/meshtastic-python.git@develop",
]
setup.cfg
[options]
install_requires =
mtjk
Unreleased from Git:
[options]
install_requires =
mtjk @ git+https://github.com/jeremiah-k/meshtastic-python.git@develop
Python import (unchanged)
import meshtastic
import meshtastic.serial_interface
interface = meshtastic.serial_interface.SerialInterface()
interface.sendText("hello mesh")
interface.close()
Support
Report issues for this fork here:
Please do not file fork-specific issues with upstream maintainers.
Release Notes (Maintainers)
- Versions match upstream releases with a
.postNsuffix (e.g.,2.7.8.post1is the first fork release based on upstream2.7.8). - Create a GitHub release with tag
vX.Y.Z[.postN](or push the tag manually). This triggers the PyPI publish workflow via Trusted Publisher. - Trusted Publisher workflow expects the git tag version to match
pyproject.tomlexactly. - Supported tag formats are
vX.Y.Z...orX.Y.Z...(both map to the same package version check). - PyPI Trusted Publisher must match this repo/workflow/environment tuple:
jeremiah-k/meshtastic-python+.github/workflows/pypi-publish.yml+pypi-release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mtjk-2.7.8.post1.tar.gz.
File metadata
- Download URL: mtjk-2.7.8.post1.tar.gz
- Upload date:
- Size: 862.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bcac62e559f6eee178c58004326098bd2847fa4431f6d9b81cab4763b593b3e
|
|
| MD5 |
1c0faab3852601e94873bb8160a44c85
|
|
| BLAKE2b-256 |
5a63e374045490a4ee950b69b481d823012dee2db174b45c04f2daeada56d051
|
Provenance
The following attestation bundles were made for mtjk-2.7.8.post1.tar.gz:
Publisher:
pypi-publish.yml on jeremiah-k/meshtastic-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mtjk-2.7.8.post1.tar.gz -
Subject digest:
4bcac62e559f6eee178c58004326098bd2847fa4431f6d9b81cab4763b593b3e - Sigstore transparency entry: 1267659183
- Sigstore integration time:
-
Permalink:
jeremiah-k/meshtastic-python@6173ec2c1e62c2b8c5123267e9accb0949b0fec9 -
Branch / Tag:
refs/tags/2.7.8.post1 - Owner: https://github.com/jeremiah-k
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@6173ec2c1e62c2b8c5123267e9accb0949b0fec9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mtjk-2.7.8.post1-py3-none-any.whl.
File metadata
- Download URL: mtjk-2.7.8.post1-py3-none-any.whl
- Upload date:
- Size: 1.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abe33b829f9d3e0a1f0f33db3cc4f17e232295b4000fb0b00372da623afa2215
|
|
| MD5 |
86d1a0e878457630234711a5c5c961d5
|
|
| BLAKE2b-256 |
00b31fce10030f7d21ce0b26ceaf6d7a6385cc21900332d11a664c5b7679c503
|
Provenance
The following attestation bundles were made for mtjk-2.7.8.post1-py3-none-any.whl:
Publisher:
pypi-publish.yml on jeremiah-k/meshtastic-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mtjk-2.7.8.post1-py3-none-any.whl -
Subject digest:
abe33b829f9d3e0a1f0f33db3cc4f17e232295b4000fb0b00372da623afa2215 - Sigstore transparency entry: 1267659268
- Sigstore integration time:
-
Permalink:
jeremiah-k/meshtastic-python@6173ec2c1e62c2b8c5123267e9accb0949b0fec9 -
Branch / Tag:
refs/tags/2.7.8.post1 - Owner: https://github.com/jeremiah-k
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@6173ec2c1e62c2b8c5123267e9accb0949b0fec9 -
Trigger Event:
release
-
Statement type: