Skip to content

Add support for adding contacts using the CLI, including remotely#933

Merged
ianmcorvidae merged 6 commits into
meshtastic:masterfrom
ianmcorvidae:shared-contact
Jun 17, 2026
Merged

Add support for adding contacts using the CLI, including remotely#933
ianmcorvidae merged 6 commits into
meshtastic:masterfrom
ianmcorvidae:shared-contact

Conversation

@ianmcorvidae

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a CLI workflow for sharing and importing “contact” (node/user) information via a shareable URL/QR, enabling users to add contacts to the NodeDB locally or via remote admin actions.

Changes:

  • Add Node.getContactURL() and Node.addContactURL() for generating/parsing shareable contact URLs backed by admin_pb2.SharedContact.
  • Extend the CLI with --contact-qr (generate + print QR/URL) and --add-contact (import from URL), supporting remote destinations via --dest.
  • Add unit tests covering CLI argument plumbing and a protobuf URL encode/decode roundtrip.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
meshtastic/node.py Implements contact URL generation/parsing and sends AdminMessage.add_contact.
meshtastic/__main__.py Adds CLI flags and wiring to call the new Node APIs (local or remote).
meshtastic/tests/test_node.py Adds a protobuf-level contact URL encode/decode roundtrip test.
meshtastic/tests/test_main.py Adds CLI tests for --add-contact and --contact-qr argument handling.

Comment thread meshtastic/node.py Outdated
Comment thread meshtastic/tests/test_node.py Outdated
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.20290% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.72%. Comparing base (e4f0fb2) to head (405a6bb).

Files with missing lines Patch % Lines
meshtastic/node.py 94.23% 3 Missing ⚠️
meshtastic/__main__.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #933      +/-   ##
==========================================
+ Coverage   63.24%   63.72%   +0.47%     
==========================================
  Files          25       25              
  Lines        4527     4595      +68     
==========================================
+ Hits         2863     2928      +65     
- Misses       1664     1667       +3     
Flag Coverage Δ
unittests 63.72% <94.20%> (+0.47%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread meshtastic/node.py
Comment thread meshtastic/node.py
@ianmcorvidae ianmcorvidae merged commit 307d8d8 into meshtastic:master Jun 17, 2026
13 checks passed
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.

2 participants