3.5 KiB
Alby Command-line Boosting App
boostagram
A command-line tool for sending Podcasting 2.0 boostagrams via AlbyHub. The following workflow has been confirmed on NixOS, but should work about the same on other distros.
Prerequisites
- NixOS with AlbyHub installed and funded (channels open)
- Network access to the AlbyHub machine
- Python 3 and Node.js available on the sending machine
Setup
1. Add packages to configuration.nix
environment.systemPackages = with pkgs; [
nodejs
(python3.withPackages (ps: with ps; [ feedparser ]))
];
Rebuild:
sudo nixos-rebuild switch
2. Connect the Alby CLI to AlbyHub
You have two options:
Option A: Auth flow (recommended if you have HTTPS)
npx @getalby/cli auth https://YOUR_ALBYHUB_ADDRESS --app-name "boostagram"
Open the URL it prints in your browser, approve the connection in AlbyHub, then:
npx @getalby/cli auth --complete
Option B: NWC connection string (works without HTTPS)
- Open the AlbyHub web UI in your browser
- Go to Apps or NWC Connections
- Create a new connection named "boostagram"
- Copy the
nostr+walletconnect://...string - Paste it into the CLI:
npx @getalby/cli connect "nostr+walletconnect://YOUR_CONNECTION_STRING"
3. Place the script
Copy boostagram somewhere in your $PATH (e.g. ~/bin/ or /usr/local/bin/):
cp boostagram ~/bin/boostagram
chmod +x ~/bin/boostagram
Usage
boostagram --feed <RSS_FEED_URL> --amount <SATS> --message "<TEXT>" --sender "<NAME>"
Required flags
| Flag | Description |
|---|---|
--feed |
Podcast RSS feed URL |
--amount |
Total sats to boost (split across recipients automatically) |
--sender |
Your display name |
Optional flags
| Flag | Description | Default |
|---|---|---|
--message |
Boostagram message text | (none) |
--episode |
Episode title to boost (partial match, case-insensitive) | Latest episode |
--ts |
Playback position in seconds | (none) |
--app-name |
App name in the boostagram metadata | boostagram |
Examples
Boost the last available episode:
python ./boostagram --feed https://linuxunplugged.com/rss --amount 608221 --message "Dis me massage." --sender "poopie mcfartweiner"
Boost a specific episode:
boostagram --feed https://linuxunplugged.com/rss \
--amount 500 \
--message "Loved this episode!" \
--sender "YourName" \
--episode "Oops! All Shells"
How it works
- Fetches the RSS feed and finds the
<podcast:value>block - If
--episodeis given, matches against episode titles; otherwise uses the latest episode - Splits the sats across all recipients defined in the feed's value block
- Constructs a BLIP-0010 boostagram JSON payload
- Sends a keysend payment to each recipient via the Alby CLI with the boostagram attached as TLV record 7629169
Troubleshooting
"error: no <podcast:value> block found in feed" The podcast doesn't support Podcasting 2.0 value blocks. Not all podcasts have this.
"Timed out waiting for wallet approval" The Alby CLI isn't authenticated. Run the auth flow from step 2 above.
Auth URL won't load in browser Use the Tailscale IP instead of the hostname, or use Option B (NWC connection string).
Payments fail individually Check your AlbyHub has sufficient channel balance. Each recipient split is sent as a separate keysend payment.