cln-plugins/summary
daywalker90 e372b06773
Some checks failed
Integration Tests (latest) / Test CLN=25.12.1, PY=3.10, BCD=31.0, EXP=1, DEP=0 (push) Has been cancelled
Integration Tests (latest) / Test CLN=25.12.1, PY=3.12, BCD=31.0, EXP=1, DEP=0 (push) Has been cancelled
Integration Tests (latest) / Test CLN=26.04.1, PY=3.10, BCD=31.0, EXP=1, DEP=0 (push) Has been cancelled
Integration Tests (latest) / Test CLN=26.04.1, PY=3.12, BCD=31.0, EXP=1, DEP=0 (push) Has been cancelled
Integration Tests (latest) / Test CLN=26.06.6, PY=3.10, BCD=31.0, EXP=1, DEP=0 (push) Has been cancelled
Integration Tests (latest) / Test CLN=26.06.6, PY=3.14, BCD=31.0, EXP=1, DEP=0 (push) Has been cancelled
Integration Tests (latest) / CI completion (push) Has been cancelled
Integration Tests (latest) / CI completion-1 (push) Has been cancelled
Integration Tests (latest) / CI completion-2 (push) Has been cancelled
summary: fix test flake
```
          wait_for(lambda: l1.rpc.listpeers(l2id)["peers"][0]["connected"] is False)
          l1.daemon.wait_for_log("Peerstate wrote to datastore")
          time.sleep(1)
          s2 = l1.rpc.summary()

          # then
          avail1 = int(re.search(" ([0-9]*)% ", s1["channels"][2]).group(1))
          avail2 = int(re.search(" ([0-9]*)% ", s2["channels"][2]).group(1))
  >       assert avail1 == 100
  E       assert 50 == 100
```
2026-08-11 12:43:49 +02:00
..
__init__.py summary: fixes and restores the summary plugin 2024-09-25 16:18:04 +02:00
manifest.json summary: add reckless manifest 2026-07-24 15:18:49 +02:00
pyproject.toml build(deps): bump the all-dependencies group across 2 directories with 2 updates 2026-05-25 11:17:15 +02:00
README.md python plugins: add note for systemd and uv 2025-12-22 15:27:54 +01:00
summary.py summary: make summary-availability-window an actual integer option 2026-06-26 18:15:45 +02:00
summary_avail.py ruff: update paths and rerun format 2026-05-12 15:33:07 +02:00
test_summary.py summary: fix test flake 2026-08-11 12:43:49 +02:00
uv.lock build(deps): bump cryptography from 49.0.0 to 50.0.0 in /summary 2026-08-06 12:12:27 +02:00

Summary plugin

This plugin is a little hack to show a summary of your node, including fiat amounts. If you have pylightning 0.0.7.1 or above, you get nice linegraphs, otherwise normal ASCII.

Installation

You need uv to run this plugin like a binary. After uv is installed you can simply run

lightning-cli plugin start /path/to/summary.py

If you use systemd to start CLN, you must have uv in the PATH that systemd uses, which is likely different than the PATH from your shell. Most uv installation methods install uv into your user's home directory (~/.local/bin or ~/.cargo/bin), which systemd cannot access.

You can either:

Option 1: Install uv system-wide (recommended):

curl -LsSf https://astral.sh/uv/install.sh | sudo env UV_INSTALL_DIR="/usr/local/bin" sh

Option 2: Copy your existing user installation:

sudo cp "$(command -v uv)" /usr/local/bin/uv

Option 3: Configure your systemd service to use a custom PATH (see systemd documentation).

To verify uv is accessible to systemd:

sudo systemd-run --user --wait command -v uv

This should output /usr/local/bin/uv.

For general plugin installation instructions see the repos main README.md

Options:

  • --summary-currency: Currency ticker to look up on bitaverage (default: USD)
  • --summary-currency-prefix: Prefix when printing currency (default: USD $)

Example Usage

Unfortunately the python plugin framework doesn't pretty-print, nor does lightning-cli, so best viewed with -H:

$ lightning-cli -H summary
network=TESTNET
my_address=031a3478d481b92e3c28810228252898c5f0d82fc4d07f5210c4f34d4aba56b769@165.227.30.200
num_utxos=5
utxo_amount=1.20119332000btc (USD $4473.84)
num_channels=29
num_connected=2
num_gossipers=1
avail_out=0.27095103btc (USD $1009.16)
avail_in=2.05851379btc (USD $7666.93)
fees_collected=0.00000012341btc (USD $0.00)
channels_key=P=private O=offline
channels=          ├────────────╢                       (O):02ac05912f89e43b88de3472e8c3003b
           ├───────────╢                       (O):02dd4cef0192611bc34cd1c3a0a7eb0f
                       ╟────────────┤          (PO):02a13878947a133d7c96e70303a9bf27
                       ║                       (O):033e2db012833d997e3c
                       ╟┤                      (O):Kenny_Loggins
                       ╟──────────────────────┤(O):DeutscheTestnetBank
                       ╟─────────────────────┤ (O):BlueLagoon1
                       ╟──────────────────────┤(O):0270dd38e8af9a64b4a483ab12b6aeb1
                       ╟┤                      (O):btctest.lnetwork.tokyo
                       ╟─┤                     (O):microbet.fun
                       ╟──────────────────────┤(PO):02fcab6e34a2ad21be2a752ab96d13f5
                       ╟──────────────────────┤(O):htlc.me
                       ╟───┤                   (O):02229ea9a7a4f9bf8bf25ce225079aed
                       ╟─────────────────────┤ (O):025d5b572a94235cfcbdc429181b2b88
                       ╟────────────┤          (PO):03c56de3a84336b4a939777ace9ecbef
                       ╟────────┤              (O):LiteStrikeBTClnd
                       ╟────────────────┤      (PO):037c9cf1cde4414c59407d547b7eac08
                       ║                       (O):03490a74e4def9125a84aee2d84e8cfe
             ├─────────┼─────────┤             (O):aranguren.org
                       ║                       (PO):03cc6603e1f6df535dd8b423284f2c09
                       ║                       (O):cyclopes
                       ╟─────────────────────┤ (PO):02b73a2160863e925e9fa978b0ddc56b
                       ╟───┤                   (O):lnd-testnet.ignios.net
                       ╟─┤                     (PO):0327a104108173d4a4f34ab2cbc3084c
                       ╟─┤                     :dwarf
                       ║                       (PO):028133777757ce281658804dd82f5758
                       ╟────────────┤          (PO):02db62ffff5c35be74e7f856bba136db
                       ╟┤                      (PO):03015ac044f5fa9768ededf6fed9c0ff
                       ╟──────────────────────┤:0270685ca81a8e4d4d01