Introducing ln-term, a simple terminal display for Core Lightning

Posted 3 months ago by nakoshi-satamoto


ln-term is a simple shell script to serve the role as a terminal interface dashboard for Core Lightning.
 
ln-term shows alot of useful information at a glance. The most useful functionality and what I initially created this for, was to view a list of all my channels and the balance on each side of the channels. To easily identify peers, it also has the ability to program aliases in place of public keys.
chan-view.png 86.5 KB

As an operator of Core Lightning, I wanted a way to visualize my channels, connected peers, and channel balances within the terminal. But I did not want to use one of the many available python plugins due to their heavily complex and huge dependency trees. Python applications in my opinion are a horrendous dependency nightmare with a known high risk of software supply chain compromise. If you want a frustrating challenge, try verifying the integrity of and then compiling an entire dependency tree from source for a python app. The more minimal an application is, the less vulnerable it is to supply chain attacks, and the less of an attack surface it has. When dealing with applications that handle money, security is critical. Simplicity and minimal dependencies are a desirable trait for security.

This is a simple shell script I typed together that utilizes jq for presenting information visually in the terminal for Core Lightning. The only dependency is jq for parsing json. And jq is in itself also minimal software and easy to compile from source-code if you feel the need to. With ln-term being a shell script, it also has the benefit of being transparent and does not need compiled. Making it very easy for anyone to audit and modify.

The release is signed using my nodes public key and can currently be found at my github repository I created for ln-term so that others can contribute to and improve it.
https://github.com/nakoshi-satamoto/ln-term
If you wish to contribute to this script or to request a copy of the latest version without using github; you can contact me.

It is my hopes that this tool I crafted can be of high benefit to other node operators.

------------------------------------
Edit (timestamp: block 832160)
Github censored my account and repo without explanation. I submitted an appeal to github but it is uncertain if they will reply or even undo this action of theirs. I am seeking a freedom alternative to github. In the meantime, I can be emailed for proposed updates to this script and for the copy if needed. The initial version of this shell script can also be downloaded using these links below in the meantime while I find a git host I can use.


lnterm.sh: 
https://lightningnetwork.plus/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBMW45QVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--7ef38c52e0738a8b12bc1e9895cc17c665ca3f6a/ln-term.sh

signature.txt:
https://lightningnetwork.plus/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBMXI5QVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--b63c73c4a92ef3609bd229ed0a82acaebfa559cd/signature.txt
------------------------------------
Edit (timestamp: block 833443)
This repo is now unbanned by github after I submitted an appeal. One of githubs automated things did not like my account originally. I can only guess why, maybe because I signed up for github using tor. This article has the original script attached. Refer to the git repository for any future updates.
------------------------------------

5 Comments

nakoshi-satamoto

nakoshi-satamoto wrote 3 months ago

The reason for having all information for each peer on a single line is to accommodate nodes with high numbers of channels. The lightning ascii banner can also be omitted to save more vertical space. This script is easy to modify as needed, such as hiding the additional columns if the display needs to be more compact horizontally.  I might include command flag options in a future version to show a compact mode when given the -c flag.


nakoshi-satamoto

nakoshi-satamoto wrote 3 months ago

My github account and this github repository has been shadow banned, censored by github without informing me or giving any reason why. I did not even know my github account was censored until I tried accessing this repo without being logged in. What is worse than censorship, is censorship where the censored is not even aware they are being censored. I am seeking a freedom non-censorship alternative.
I released this in the intent of being helpful to Core Lightning operators and to have it improve by contributions from others. I am concerned that this stealth censorship by github is impacting people's initial perception of this post. I ask for understanding on this, as I seek an alternative to github.

Anyone can email me for a copy of the current version, it is tiny in terms of lines of code and very easy for anyone to audit before running it. I will post a comment here and update this article when I have it re-uploaded elsewhere. If anyone is interested in this, check back in a couple days after I had a chance to upload this script somewhere.


nakoshi-satamoto

nakoshi-satamoto wrote 3 months ago

Here is an uploaded copy of the shell script and the signature. I won't abuse lightningnetwork.plus for use as file hosting. I'll delete this file if requested to by the LN+ admin. I submitted an appeal to github support, we shall see if they ever reply and actually unban my github account. I am still searching for an alternative. In the meantime, I can be emailed for a copy, and the initial release can also be downloaded via this link here.

lnterm.sh: 
https://lightningnetwork.plus/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBMW45QVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--7ef38c52e0738a8b12bc1e9895cc17c665ca3f6a/ln-term.sh

signature.txt:
https://lightningnetwork.plus/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBMXI5QVE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--b63c73c4a92ef3609bd229ed0a82acaebfa559cd/signature.txt
ln-term.sh 9.3 KB
signature.txt 743 Bytes


nakoshi-satamoto

nakoshi-satamoto wrote 2 months ago

Github replied to my ban removal appeal and undid the ban. This github repo is now unblocked! I think I was banned initially for being a tor user if I had to guess.


nakoshi-satamoto

nakoshi-satamoto wrote 19 days ago

This software has undergone multiple updates and improvements since this original posting. Refer to the git repo for the latest version.

Please login to post comments.

Lightning Network Node
nakoshi-satamoto@posteo.net
Rank: 6 / Tungsten
Capacity: 27,139,927 SAT
Channels: 11