lightning-terminal icon indicating copy to clipboard operation
lightning-terminal copied to clipboard

Add lit CLI as a unified binary for lncli, loop, frcli, and pool

Open jamaljsr opened this issue 3 years ago • 0 comments

When using the CLI executables lncli, loop, frcli, and pool, we must always provide the config flags --rpcserver, --tlscertpath, and --macaroonpath. This requirement is documented in the remote and integrated docs, but it still appears to be a point of confusion for new users. In addition, these CLI binaries are not generated when compiling litd from source using make install. They are only included in the pre-compiled release archives.

I suggest that we should create a unified lit CLI binary similar to how litd unifies all of the servers. This executable should be generated by make install and also included in the pre-compiled release archives, instead of the existing CLI executables.

The lit executable should nest all of the existing lncli/loop/frcli/pool commands under subcommands.

For example:

$ lit lncli getinfo
$ lit loop terms
$ lit frcli audit
$ lit pool accounts list

lit should read the lit.conf file to check for custom values for config flags, such as httpslisten & remote.lnd.*. It can use these values to connect to the litd (and remote lnd) without needing to provide any config flags. If the lit.conf file doesn't exist, lit should assume the litd default values. Ex: for lit loop it should use the below flags by default:

--rpcserver=localhost:8443 --tlscertpath=~/.lit/tls.cert --macaroonpath=~/.loop/testnet/loop.macaroon

With this improvement, I think LiT would be much simpler to initially setup and interact with for new users.

jamaljsr avatar Nov 15 '20 05:11 jamaljsr