Added Keybase support#1628
Open
caronc wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new native keybase:// notification plugin that talks directly to the locally running Keybase service, plus a new apprise/utils/saltpack.py utility implementing inline msgpack, Saltpack v2.0 base62 armor, and Ed25519/Curve25519 helpers (with PyNaCl as an optional dependency).
Changes:
- New plugin package
apprise/plugins/keybase/supporting Unix-socket and TCP modes,@userDMs andteam#channeltargets, attachments, and optional Saltpack signing. - New
apprise/utils/saltpack.pyproviding pure-Python msgpack/base62 + PyNaCl-backed signing, box encryption, and Keybase public-key lookup. - Packaging/docs updates (
pyproject.toml,all-plugin-requirements.txt, RedHat spec, README) to registerPyNaClas a recommended dependency and list Keybase among supported services.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| apprise/plugins/keybase/init.py | Exports NotifyKeybase and shared Keybase constants for package-style plugin discovery. |
| apprise/plugins/keybase/common.py | Shared regexes, mode/channel/host defaults, and keybase_default_socket() platform path helper. |
| apprise/plugins/keybase/base.py | Main NotifyKeybase implementation: target parsing, socket/TCP send, attachments, sigkey, URL build/parse. |
| apprise/utils/saltpack.py | Pure-Python msgpack + base62 armor + PyNaCl-backed Saltpack v2 signing, box encryption, Keybase key lookup. |
| tests/test_plugin_keybase.py | Extensive unit + integration coverage for the Keybase plugin. |
| tests/utils/test_saltpack.py | Coverage for msgpack/base62 helpers and PyNaCl-gated controller methods. |
| tests/utils/init.py | Empty package marker for the new tests/utils/ directory. |
| pyproject.toml | Adds Keybase keyword and PyNaCl to all-plugins optional deps. |
| all-plugin-requirements.txt | Adds PyNaCl for backwards-compatible install tooling. |
| packaging/redhat/python-apprise.spec | Adds Keybase to the service summary and recommends python3dist(pynacl). |
| README.md | Inserts a Keybase entry into the alphabetical service table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1628 +/- ##
===========================================
- Coverage 100.00% 99.98% -0.02%
===========================================
Files 211 215 +4
Lines 29881 30331 +450
Branches 4972 5041 +69
===========================================
+ Hits 29881 30327 +446
- Misses 0 3 +3
- Partials 0 1 +1
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related issue (if applicable): N/A
Keybase Notifications
Adds a new Keybase Chat notification plugin that communicates directly with the locally running Keybase service over a Unix domain socket (default) or a local HTTP endpoint (TCP mode).
Two target types are supported in any combination within a single URL:
@usernamefor direct messages andteamname#channelfor team channels (default channelgeneralwhen no channel is specified). Multiple targets are packed into the URL path:keybase://_/@alice/@bob/myteam#dev.An optional Saltpack v2.0 message-signing feature is available via
?sigkey=when the PyNaCl package is installed. Signed messages can be verified withkeybase verifyor any Saltpack client.Account Setup
keybase loginor through the Keybase desktop application.keybase servicekeeps it alive automatically).Syntax
Valid syntax is as follows:
keybase://_/@{username}-- direct message (socket mode)keybase://_/{teamname}-- team message, default channelgeneralkeybase://_/{teamname}#{channel}-- specific team channelkeybase://_/@{user1}/@{user2}/{teamname}#{channel}-- multiple targetskeybase://localhost:{port}/@{username}-- TCP modeParameter Breakdown
@username@.teamname#channelfor a specific channel.channelgeneral.modesocket(default) ortcp.socketkeybase).portsigkeyExamples
Send a direct message (socket mode):
Send to a team channel:
Send via TCP mode:
Send a Saltpack-signed message:
New Service Completion Status
apprise/plugins/keybase/pyproject.tomlREADME.mdpackaging/redhat/python-apprise.specChecklist
tox -e lintand optionallytox -e format).tox -e qa).Testing
Anyone can help test as follows: