|
| 1 | +reckless - install and activate a CLN plugin by name |
| 2 | +==================================================== |
| 3 | + |
| 4 | +SYNOPSIS |
| 5 | +-------- |
| 6 | + |
| 7 | +**reckless** [*options*] **install/uninstall/enable/disable/source** *target* |
| 8 | + |
| 9 | +DESCRIPTION |
| 10 | +----------- |
| 11 | + |
| 12 | +Reckless is a plugin manager for Core-Lightning. Typical plugin |
| 13 | +installation involves: finding the source plugin, copying, |
| 14 | +installing dependencies, testing, activating, and updating the |
| 15 | +lightningd config file. Reckless does all of these by invoking: |
| 16 | + |
| 17 | +**reckless** **install**[@*commit/tag*] *plugin\_name* |
| 18 | + |
| 19 | +reckless will exit early in the event that: |
| 20 | + |
| 21 | +- the plugin is not found in any available source repositories |
| 22 | +- dependencies are not successfully installed |
| 23 | +- the plugin fails to execute |
| 24 | + |
| 25 | +Reckless-installed plugins reside in the 'reckless' subdirectory |
| 26 | +of the user's `.lightning` folder. By default, plugins are activated |
| 27 | +on the `bitcoin` network (and use lightningd's bitcoin network |
| 28 | +config), but regtest may also be used. |
| 29 | + |
| 30 | +Other commands include: |
| 31 | + |
| 32 | +**reckless** **uninstall** *plugin\_name* |
| 33 | + disables the plugin, removes the directory. |
| 34 | + |
| 35 | +**reckless** **search** *plugin\_name* |
| 36 | + looks through all available sources for a plugin matching |
| 37 | + this name. |
| 38 | + |
| 39 | +**reckless** **enable** *plugin\_name* |
| 40 | + dynamically enables the reckless-installed plugin and updates |
| 41 | + the config to match. |
| 42 | + |
| 43 | +**reckless** **disable** *plugin\_name* |
| 44 | + dynamically disables the reckless-installed plugin and updates |
| 45 | + the config to match. |
| 46 | + |
| 47 | +**reckless** **source** **list** |
| 48 | + list available plugin repositories. |
| 49 | + |
| 50 | +**reckless** **source** **add** *repo\_url* |
| 51 | + add another plugin repo for reckless to search. |
| 52 | + |
| 53 | +**reckless** **source** **rm** *repo\_url* |
| 54 | + remove a plugin repo for reckless to search. |
| 55 | + |
| 56 | +OPTIONS |
| 57 | +------- |
| 58 | + |
| 59 | +Available option flags: |
| 60 | + |
| 61 | +**-d**, **--reckless-dir** *reckless\_dir* |
| 62 | + specify an alternative data directory for reckless to use. |
| 63 | + Useful if your .lightning is protected from execution. |
| 64 | + |
| 65 | +**-l**, **--lightning** *lightning\_data\_dir* |
| 66 | + lightning data directory (defaults to $USER/.lightning) |
| 67 | + |
| 68 | +**-c**, **--conf** *lightning\_config* |
| 69 | + pass the config used by lightningd |
| 70 | + |
| 71 | +**-r**, **--regtest** |
| 72 | + use the regtest network and config instead of bitcoin mainnet |
| 73 | + |
| 74 | +**-v**, **--verbose** |
| 75 | + request additional debug output |
| 76 | + |
| 77 | +**--network**=*network* |
| 78 | + specify bitcoin, regtest, liquid, liquid-regtest, litecoin, signet, |
| 79 | + or testnet networks. (default: bitcoin) |
| 80 | + |
| 81 | +NOTES |
| 82 | +----- |
| 83 | + |
| 84 | +Reckless currently supports python and javascript plugins. |
| 85 | + |
| 86 | +Running the first time will prompt the user that their lightningd's |
| 87 | +bitcoin config will be appended (or created) to inherit the reckless |
| 88 | +config file (this config is specific to bitcoin by default.) |
| 89 | +Management of plugins will subsequently modify this file. |
| 90 | + |
| 91 | + |
| 92 | +Troubleshooting tips: |
| 93 | + |
| 94 | +Plugins must be executable. For python plugins, the shebang is |
| 95 | +invoked, so **python3** should be available in your environment. This |
| 96 | +can be verified with **which Python3**. The default reckless directory |
| 97 | +is $USER/.lightning/reckless and it should be possible for the |
| 98 | +lightningd user to execute files located here. If this is a problem, |
| 99 | +the option flag **reckless -d=<my\_alternate\_dir>** may be used to |
| 100 | +relocate the reckless directory from its default. Consider creating a |
| 101 | +permanent alias in this case. |
| 102 | + |
| 103 | +Python plugins are installed to their own virtual environments. The |
| 104 | +environment is activated by a wrapper (named the same as the plugin) |
| 105 | +which then imports and executes the actual plugin entrypoint. |
| 106 | + |
| 107 | +For Plugin Developers: |
| 108 | + |
| 109 | +To make your plugin compatible with reckless install: |
| 110 | + |
| 111 | +- Choose a unique plugin name. |
| 112 | +- The plugin entrypoint is inferred. Naming your plugin executable |
| 113 | + the same as your plugin name will allow reckless to identify it |
| 114 | + correctly (file extensions are okay.) |
| 115 | +- For python plugins, a requirements.txt is the preferred medium for |
| 116 | + python dependencies. A pyproject.toml will be used as a fallback, |
| 117 | + but test installation via `pip install -e .` - Poetry looks for |
| 118 | + additional files in the working directory, whereas with pip, any |
| 119 | + references to these will require something like |
| 120 | + `packages = [{ include = "*.py" }]` under the `[tool.poetry]` |
| 121 | + section. |
| 122 | +- Additional repository sources may be added with |
| 123 | + `reckless source add https://my.repo.url/here` however, |
| 124 | + https://github.com/lightningd/plugins is included by default. |
| 125 | + Consider adding your plugin lightningd/plugins to make |
| 126 | + installation simpler. |
| 127 | +- If your plugin is located in a subdirectory of your repo with a |
| 128 | + different name than your plugin, it will likely be overlooked. |
| 129 | + |
| 130 | +AUTHOR |
| 131 | +------ |
| 132 | + |
| 133 | +Antoine Poinsot wrote the original reckless plugin on which this is |
| 134 | +based. |
| 135 | + |
| 136 | +Rusty Russell wrote the outline for the reckless utility's function |
| 137 | + |
| 138 | +Alex Myers < <[email protected]>> is mostly responsible for the |
| 139 | +reckless code and this man page, with thanks to Christian Decker for |
| 140 | +extensive review. |
| 141 | + |
| 142 | +SEE ALSO |
| 143 | +-------- |
| 144 | + |
| 145 | +reckless(7), Core-Lightning plugins repo: <https://github.com/lightningd/plugins> |
| 146 | + |
| 147 | +RESOURCES |
| 148 | +--------- |
| 149 | + |
| 150 | +Main web site: <https://github.com/ElementsProject/lightning> |
0 commit comments