Skip to content

feat(docker): bundle MeshCore CLI Python package alongside Meshtastic CLI#3591

Merged
Yeraze merged 1 commit into
mainfrom
feat/3587-meshcore-cli-docker
Jun 21, 2026
Merged

feat(docker): bundle MeshCore CLI Python package alongside Meshtastic CLI#3591
Yeraze merged 1 commit into
mainfrom
feat/3587-meshcore-cli-docker

Conversation

@Yeraze

@Yeraze Yeraze commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #3587.

The MeshMonitor Docker image already bundles the official Meshtastic Python CLI. This adds the MeshCore CLI Python application alongside it, using the exact same mechanism (pip install into the existing apprise virtualenv, same RUN layer, --no-cache-dir).

Changes

  • Add meshcore-cli to the pip install line in the Python/Apprise RUN layer in Dockerfile.
  • Symlink both console scripts the package provides — meshcore-cli and meshcli — into /usr/local/bin, mirroring the existing meshtastic symlink.

Package details

  • PyPI package: meshcore-cli (summary: "Command line interface to meshcore companion radios and repeaters").
  • Version: unpinned, matching the existing unpinned meshtastic package on the same line (resolved to meshcore-cli 1.5.7 + meshcore 2.3.7 at build time).
  • Console scripts: the wheel's entry_points.txt declares both meshcore-cli and meshcli; both are symlinked onto PATH.

Note: the codebase does not shell out to a meshcore-cli binary — MeshCore uses the native meshcore.js library (companion) and direct serial CLI (repeater). The few meshcore-cli references in meshcoreManager.ts are comments about users running the CLI out-of-band. Bundling is purely additive operator convenience, consistent with the bundled Meshtastic CLI.

Verification

  • Built a minimal image replicating the modified RUN layer on the same node:24.15.0-alpine3.22 base. The pip install succeeded and which meshtastic meshcore-cli meshcli resolved all three; meshcore-cli --help and meshtastic --version both ran successfully. The Meshtastic install is unaffected (meshtastic-2.7.9).
  • Confirmed package name/version/deps via the PyPI JSON API.
  • tsc: passes. Full Vitest suite: 7012 passed, 0 failed (Dockerfile change does not affect JS tests). Pre-existing ESLint errors in the repo are unrelated (diff touches only Dockerfile).
  • A full production image build was not run (the targeted stage build is sufficient to validate the install).

🤖 Generated with Claude Code

… CLI (#3587)

Install the meshcore-cli PyPI package (CLI for MeshCore companion radios
and repeaters) into the existing apprise venv, mirroring how the Meshtastic
Python CLI is bundled. Symlink both console scripts (meshcore-cli and
meshcli) into /usr/local/bin so they are on PATH inside the container.

Closes #3587

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011JEaCGwY9Wz8jeV4e22GW4
@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown

Claude finished @Yeraze's task —— View job


PR Review: feat(docker): bundle MeshCore CLI Python package alongside Meshtastic CLI

Tasks:

  • Gather context
  • Read Dockerfile changes
  • Analyze for code quality, bugs, security, and performance
  • Post review feedback

Review Summary

This is a clean, minimal, and well-scoped change. The implementation is consistent with the existing pattern for the meshtastic CLI. Below are observations in order of importance.

Security / Supply Chain

Unpinned package versions — both meshtastic and now meshcore-cli are unpinned. This is a pre-existing pattern, but adding another unpinned package increases supply-chain risk. A malicious or accidental breaking release on PyPI would silently make it into the next image build. Consider pinning to a minimum version (e.g. meshcore-cli>=1.5.7,<2), or using pip-compile/pip freeze to generate a lockfile. This is a follow-up concern, not a blocker for this PR.

New transitive dependencymeshcore-cli pulls in meshcore 2.3.7 (and its own dependencies). These are not reviewed here; verify they are trustworthy before shipping.

Correctness

Symlink existence — the PR symlinks both meshcore-cli and meshcli from the venv's bin/. If a future release of meshcore-cli removes or renames the meshcli entry point, the ln -sf step will silently create a dangling symlink (no error, but the binary won't work). The existing meshtastic symlink has the same exposure. Low risk, acceptable as-is.

venv activation — all three symlinks correctly point into /opt/apprise-venv/bin/, consistent with the meshtastic pattern. No issues here.

Code Quality

The change is idiomatic and minimal. The single RUN layer approach (chaining with &&) is correct and avoids unnecessary intermediate layers. The --no-cache-dir flag is already present on the pip install line.

Line 67 — the modified pip install line:

&& /opt/apprise-venv/bin/pip install --no-cache-dir apprise "paho-mqtt<2.0" meshtastic meshcore-cli \

This is clean. The new package is appended at the end of the existing package list, no formatting changes needed.

Lines 69–70 — new symlinks:

&& ln -sf /opt/apprise-venv/bin/meshcore-cli /usr/local/bin/meshcore-cli \
&& ln -sf /opt/apprise-venv/bin/meshcli /usr/local/bin/meshcli \

Consistent with line 68's meshtastic symlink pattern.

Performance

No build performance impact beyond the additional pip resolution/download time. This is folded into the same RUN layer, so it doesn't add a Docker layer.

Test Coverage

Dockerfile changes are not exercised by the Vitest suite (correctly noted in the PR description). There are no automated Dockerfile integration tests in this repo. The manual verification described in the PR (building the modified layer and running --help/--version) is the appropriate level of validation for this type of change.

Minor Suggestions

  1. Version pin (optional, non-blocking): At minimum, add a comment documenting the version resolved at author time (already done in PR description — consider adding it as an inline comment in the Dockerfile for future maintainers).
  2. CI image build: A smoke test that builds the Dockerfile and checks which meshcore-cli meshcli would catch regressions. Currently there is no such CI step for the runtime image.

Verdict

The change is correct, minimal, and follows the established pattern exactly. The supply-chain concern around unpinned packages is pre-existing and out of scope for this PR. LGTM pending maintainer comfort with the unpinned version policy.


@Yeraze Yeraze merged commit 4f9c42d into main Jun 21, 2026
16 checks passed
@Yeraze Yeraze deleted the feat/3587-meshcore-cli-docker branch June 21, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add MeshCore CLI Python application to Docker image

1 participant