<p>This is actually the first thing I got confused with after I installed my a lightning node for the very first time back in 2018. c-lightning ships with two (actually more) programs</p>
<ol>
<li><code>lightningd</code></li>
<li><code>lighthning-cli</code></li>
</ol>
<p><code>lightning-cli</code> is a command line tool that sends commands via JSON RPC over a unix domain socket to <code>lightningd</code> so if you type: <code>lightning-cli help</code> what actually happens is that you send the <code>help</code> command to <code>lightningd</code> this will give you a list of all commands that <code>lightningd</code> can accept.</p>
<p>This is different to the command line arguments that can be given to <code>lightning-cli</code> which you are asking about. You can get the command line arguments by typing in <code>lightning-cli --help</code>. My output looks like this:</p>
<pre><code>lightning-cli --help
Usage: lightning-cli &lt;command&gt; [&lt;params&gt;...]
--conf=&lt;file&gt;             Specify configuration file
--lightning-dir=&lt;dir&gt;     Set base directory: network-specific subdirectory is
                          under here (default: &quot;/home/user/.lightning&quot;)
--network &lt;arg&gt;           Select the network parameters (bitcoin, testnet,
                          signet, regtest, litecoin or litecoin-testnet)
                           (default: bitcoin)
--mainnet                 Alias for --network=bitcoin
--testnet                 Alias for --network=testnet
--signet                  Alias for --network=signet
--allow-deprecated-apis &lt;arg&gt;
                          Enable deprecated options, JSONRPC commands, fields,
                          etc. (default: true)
--rpc-file &lt;arg&gt;          Set JSON-RPC socket (or /dev/tty)
                           (default: &quot;lightning-rpc&quot;)
--help|-h                 Show this message. Use the command help (without
                          hyphens -- &quot;lightning-cli help&quot;) to get a list of all
                          RPC commands
-H|--human-readable       Human-readable output
-F|--flat                 Flatten output ('x.y.x=' format)
-J|--json                 JSON output (default unless 'help')
-R|--raw                  Raw, unformatted JSON output
-k|--keywords             Use format key=value for &lt;params&gt;
-o|--order                Use params in order for &lt;params&gt;
-N|--notifications &lt;arg&gt;  Set notification level, or none (default: info)
--version|-V              Print version and exit
</code></pre>
<p>From there you can see that the <code>-k</code> argument stands for <code>keywords</code></p>
<blockquote>
<p><code>-k|--keywords             Use format key=value for &lt;params&gt;</code></p>
</blockquote>
<p>For completeness there is even the possibility to get the command line arguments for <code>lightningd</code> by typing <code>lightningd --help</code> which gives you basically all config arguments and additionally the plugin system can append command line options.</p>

CC BY-SA 4.0
2021-12-26T14:08:10.077Z
2021-12-27T23:16:22.547Z
2021-12-27T23:16:22.547Z
Rene Pickhardt
<p>I find it very convenient, one does not have to worry about the order of arguments, e.g.</p>
<pre><code>lightning-cli -k invoice msatoshi=0.001btc label=label1 description=&quot;This is a description&quot; expiry=45m
</code></pre>
<p>I would like to know the source of this acronym, what does <strong>k</strong> in <code>-k</code> stand for? Where can I read about it? I haven't found anything about it in <code>lightning-cli help</code>.</p>

<core-lightning><invoices>
What does `-k` stand for in `lightning-cli`?
John Smith
# What does `-k` stand for in `lightning-cli`?

(Asked by: username_0 on 2021-12-26)

I find it very convenient, one does not have to worry about the order of arguments, e.g.

```
lightning-cli -k invoice msatoshi=0.001btc label=label1 description="This is a description" expiry=45m

```

I would like to know the source of this acronym, what does **k** in `-k` stand for? Where can I read about it? I haven't found anything about it in `lightning-cli help`.

**Tags:** core-lightning, invoices


---

## 1 answers

### Answer by username_1 on 2021-12-26. Score: 5 | Accepted answer

This is actually the first thing I got confused with after I installed my a lightning node for the very first time back in 2018. c-lightning ships with two (actually more) programs

1. `lightningd`
2. `lighthning-cli`

`lightning-cli` is a command line tool that sends commands via JSON RPC over a unix domain socket to `lightningd` so if you type: `lightning-cli help` what actually happens is that you send the `help` command to `lightningd` this will give you a list of all commands that `lightningd` can accept.

This is different to the command line arguments that can be given to `lightning-cli` which you are asking about. You can get the command line arguments by typing in `lightning-cli --help`. My output looks like this:

```
lightning-cli --help
Usage: lightning-cli <command> [<params>...]
--conf=<file>             Specify configuration file
--lightning-dir=<dir>     Set base directory: network-specific subdirectory is
                          under here (default: "/home/user/.lightning")
--network <arg>           Select the network parameters (bitcoin, testnet,
                          signet, regtest, litecoin or litecoin-testnet)
                           (default: bitcoin)
--mainnet                 Alias for --network=bitcoin
--testnet                 Alias for --network=testnet
--signet                  Alias for --network=signet
--allow-deprecated-apis <arg>
                          Enable deprecated options, JSONRPC commands, fields,
                          etc. (default: true)
--rpc-file <arg>          Set JSON-RPC socket (or /dev/tty)
                           (default: "lightning-rpc")
--help|-h                 Show this message. Use the command help (without
                          hyphens -- "lightning-cli help") to get a list of all
                          RPC commands
-H|--human-readable       Human-readable output
-F|--flat                 Flatten output ('x.y.x=' format)
-J|--json                 JSON output (default unless 'help')
-R|--raw                  Raw, unformatted JSON output
-k|--keywords             Use format key=value for <params>
-o|--order                Use params in order for <params>
-N|--notifications <arg>  Set notification level, or none (default: info)
--version|-V              Print version and exit

```

From there you can see that the `-k` argument stands for `keywords`

> `-k|--keywords Use format key=value for <params>`

For completeness there is even the possibility to get the command line arguments for `lightningd` by typing `lightningd --help` which gives you basically all config arguments and additionally the plugin system can append command line options.


---

