mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
41290a436f
This can be suppressed with -N. Note that we wull get an error with older lightningd, but we ignore it anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Added: cli: print notifications and progress bars if commands provide them.
128 lines
3.4 KiB
Groff
128 lines
3.4 KiB
Groff
.TH "LIGHTNING-CLI" "1" "" "" "lightning-cli"
|
||
.SH NAME
|
||
lightning-cli - Control lightning daemon
|
||
.SH SYNOPSIS
|
||
|
||
\fBlightning-cli\fR [\fIOPTIONS\fR] \fIcommand\fR…
|
||
|
||
.SH DESCRIPTION
|
||
|
||
\fBlightning-cli\fR sends commands to the lightning daemon\.
|
||
|
||
.SH OPTIONS
|
||
|
||
\fB--lightning-dir\fR=\fIDIR\fR
|
||
Set the directory for the lightning daemon we’re talking to; defaults to
|
||
\fI$HOME/\.lightning\fR\.
|
||
|
||
|
||
\fB--conf\fR=\fIPATH\fR
|
||
Sets configuration file (default: \fBlightning-dir\fR/\fIconfig\fR )\.
|
||
|
||
|
||
\fB--network\fR=\fInetwork\fR
|
||
\fB--mainnet\fR
|
||
\fB--testnet\fR
|
||
\fB--signet\fR
|
||
Sets network explicitly\.
|
||
|
||
|
||
\fB--rpc-file\fR=\fIFILE\fR
|
||
Named pipe to use to talk to lightning daemon: default is
|
||
\fIlightning-rpc\fR in the lightning directory\.
|
||
|
||
|
||
\fB--keywords\fR/\fB-k\fR
|
||
Use format \fIkey\fR=\fIvalue\fR for parameters in any order
|
||
|
||
|
||
\fB--order\fR/\fB-o\fR
|
||
Follow strictly the order of parameters for the command
|
||
|
||
|
||
\fB--json\fR/\fB-J\fR
|
||
Return result in JSON format (default unless \fIhelp\fR command,
|
||
or result contains a \fBformat-hint\fR field)\.
|
||
|
||
|
||
\fB--raw\fR/\fB-R\fR
|
||
Return raw JSON directly as lightningd replies; this can be faster for
|
||
large requests\.
|
||
|
||
|
||
\fB--human-readable\fR/\fB-H\fR
|
||
Return result in human-readable output\.
|
||
|
||
|
||
\fB--flat\fR/\fB-F\fR
|
||
Return JSON result in flattened one-per-line output, e\.g\. \fB{ "help":
|
||
[ { "command": "check" } ] }\fR would become \fBhelp[0].command=check\fR\.
|
||
This is useful for simple scripts which want to find a specific output
|
||
field without parsing JSON\.
|
||
|
||
|
||
\fB--notifications\fR/\fB-N\fR=\fILEVEL\fR
|
||
If \fILEVEL\fR is 'none', then never print out notifications\. Otherwise,
|
||
print out notifications of \fILEVEL\fR or above (one of \fBio\fR, \fBdebug\fR,
|
||
\fBinfo\fR (the default), \fBunusual\fR or \fBbroken\fR: they are prefixed with \fB#\fR\.
|
||
|
||
|
||
\fB--help\fR/\fB-h\fR
|
||
Pretty-print summary of options to standard output and exit\. The format can
|
||
be changed using -F, -R, -J, -H etc\.
|
||
|
||
|
||
\fB--version\fR/\fB-V\fR
|
||
Print version number to standard output and exit\.
|
||
|
||
|
||
\fBallow-deprecated-apis\fR=\fIBOOL\fR
|
||
Enable deprecated options\. It defaults to \fItrue\fR, but you should set
|
||
it to \fIfalse\fR when testing to ensure that an upgrade won’t break your
|
||
configuration\.
|
||
|
||
.SH COMMANDS
|
||
|
||
\fIlightning-cli\fR simply uses the JSON RPC interface to talk to
|
||
\fIlightningd\fR, and prints the results\. Thus the commands available depend
|
||
entirely on the lightning daemon itself\.
|
||
|
||
.SH ARGUMENTS
|
||
|
||
Arguments may be provided positionally or using \fIkey\fR=\fIvalue\fR after the
|
||
command name, based on either \fB-o\fR or \fB-k\fR option\. Arguments may be
|
||
integer numbers (composed entirely of digits), floating-point numbers
|
||
(has a radix point but otherwise composed of digits), \fItrue\fR, \fIfalse\fR,
|
||
or \fInull\fR\. Other arguments are treated as strings\.
|
||
|
||
|
||
Some commands have optional arguments\. You may use \fInull\fR to skip
|
||
optional arguments to provide later arguments\.
|
||
|
||
.SH EXAMPLES
|
||
|
||
Example 1\. List commands
|
||
|
||
|
||
lightning-cli help
|
||
|
||
.SH BUGS
|
||
|
||
This manpage documents how it should work, not how it does work\. The
|
||
pretty printing of results isn’t pretty\.
|
||
|
||
.SH AUTHOR
|
||
|
||
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly to blame\.
|
||
|
||
.SH RESOURCES
|
||
|
||
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
|
||
|
||
.SH COPYING
|
||
|
||
Note: the modules in the ccan/ directory have their own licenses, but
|
||
the rest of the code is covered by the BSD-style MIT license\.
|
||
|
||
\" SHA256STAMP:b626a2499bd231acc33bf1c279c62de2a7ad2046c6c63965b97f74ec4e861365
|