1lightning-cli -- Control lightning daemon 2========================================= 3 4SYNOPSIS 5-------- 6 7**lightning-cli** \[*OPTIONS*\] *command* 8 9DESCRIPTION 10----------- 11 12**lightning-cli** sends commands to the lightning daemon. 13 14OPTIONS 15------- 16 17 **--lightning-dir**=*DIR* 18Set the directory for the lightning daemon we're talking to; defaults to 19*$HOME/.lightning*. 20 21 **--conf**=*PATH* 22Sets configuration file (default: **lightning-dir**/*config* ). 23 24 **--network**=*network* 25 **--mainnet** 26 **--testnet** 27 **--signet** 28Sets network explicitly. 29 30 **--rpc-file**=*FILE* 31Named pipe to use to talk to lightning daemon: default is 32*lightning-rpc* in the lightning directory. 33 34 **--keywords**/**-k** 35Use format *key*=*value* for parameters in any order 36 37 **--order**/**-o** 38Follow strictly the order of parameters for the command 39 40 **--json**/**-J** 41Return result in JSON format (default unless *help* command, 42or result contains a `format-hint` field). 43 44 **--raw**/**-R** 45Return raw JSON directly as lightningd replies; this can be faster for 46large requests. 47 48 **--human-readable**/**-H** 49Return result in human-readable output. 50 51 **--flat**/**-F** 52Return JSON result in flattened one-per-line output, e.g. `{ "help": 53[ { "command": "check" } ] }` would become `help[0].command=check`. 54This is useful for simple scripts which want to find a specific output 55field without parsing JSON. 56 57 **--notifications**/**-N**=*LEVEL* 58If *LEVEL* is 'none', then never print out notifications. Otherwise, 59print out notifications of *LEVEL* or above (one of `io`, `debug`, 60`info` (the default), `unusual` or `broken`: they are prefixed with `# 61`. 62 63 **--help**/**-h** 64Pretty-print summary of options to standard output and exit. The format can 65be changed using -F, -R, -J, -H etc. 66 67 **--version**/**-V** 68Print version number to standard output and exit. 69 70 **allow-deprecated-apis**=*BOOL* 71Enable deprecated options. It defaults to *true*, but you should set 72it to *false* when testing to ensure that an upgrade won't break your 73configuration. 74 75COMMANDS 76-------- 77 78*lightning-cli* simply uses the JSON RPC interface to talk to 79*lightningd*, and prints the results. Thus the commands available depend 80entirely on the lightning daemon itself. 81 82ARGUMENTS 83--------- 84 85Arguments may be provided positionally or using *key*=*value* after the 86command name, based on either **-o** or **-k** option. When using **-k** 87consider prefixing all arguments of the command with their respective keyword, 88this is to avoid having lightningd intrepret the position of an arguement. 89 90Arguments may be integer numbers (composed entirely of digits), floating-point 91numbers (has a radix point but otherwise composed of digits), *true*, *false*, 92or *null*. Other arguments are treated as strings. 93 94Some commands have optional arguments. You may use *null* to skip 95optional arguments to provide later arguments, although this is not encouraged. 96 97EXAMPLES 98-------- 99 1001. List commands 101 102lightning-cli help 103 1042. Fund a 10k sat channel using uncomfirmed outputs 105 106lightning-cli --keywords fundchannel id=028f...ae7d amount=10000sat minconf=0 107 108BUGS 109---- 110 111This manpage documents how it should work, not how it does work. The 112pretty printing of results isn't pretty. 113 114AUTHOR 115------ 116 117Rusty Russell <<rusty@rustcorp.com.au>> is mainly to blame. 118 119RESOURCES 120--------- 121 122Main web site: <https://github.com/ElementsProject/lightning> 123 124COPYING 125------- 126 127Note: the modules in the ccan/ directory have their own licenses, but 128the rest of the code is covered by the BSD-style MIT license. 129 130