https://github.com/guest271314/native-messaging-bash
Bash Native Messaging host.
https://github.com/guest271314/native-messaging-bash
bash native-messaging native-messaging-host
Last synced: 2 months ago
JSON representation
Bash Native Messaging host.
- Host: GitHub
- URL: https://github.com/guest271314/native-messaging-bash
- Owner: guest271314
- License: wtfpl
- Created: 2022-04-25T12:04:24.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-25T14:14:34.000Z (almost 2 years ago)
- Last Synced: 2025-01-22T06:46:56.409Z (4 months ago)
- Topics: bash, native-messaging, native-messaging-host
- Language: Shell
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Bash Native Messaging host
Installation and usage on Chrome and Chromium
1. Navigate to `chrome://extensions`.
2. Toggle `Developer mode`.
3. Click `Load unpacked`.
4. Select native-messaging-quickjs folder.
5. Note the generated extension ID.
6. Open `nm_bash.json` in a text editor, set `"path"` to absolute path of `nm_bash.sh` and `chrome-extension:///` using ID from 5 in `"allowed_origins"` array.
7. Copy the `nm_bash.json` file to Chrome or Chromium configuration folder, e.g., Chromium on \*nix `~/.config/chromium/NativeMessagingHosts`; Chrome dev channel on \*nix `~/.config/google-chrome-unstable/NativeMessagingHosts`.
8. Make sure `nm_bash.sh` is executable.
9. To test click `service worker` link in panel of unpacked extension which is DevTools for `background.js` in MV3 `ServiceWorker`, observe echo'ed message from txiki.js Native Messaging host. To disconnect run `port.disconnect()`.The Native Messaging host echoes back the message passed.
For differences between OS and browser implementations see [Chrome incompatibilities](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Chrome_incompatibilities#native_messaging).
# License
Do What the Fuck You Want to Public License [WTFPLv2](http://www.wtfpl.net/about/)