Skip to content

Separate reckless utility (1) and reckless rpc (7) documentation #8261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/sync-rpc-cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def extract_rpc_commands(rst_content):
commands = re.findall(
r"\b([a-zA-Z0-9_-]+)" r"\s+<([^>]+)>\n", manpages_block.group(1)
)
return [(re.sub(r"\blightning-", "", rpc_name), file_name) for rpc_name, file_name in commands]
return commands
return []


Expand Down
42 changes: 2 additions & 40 deletions contrib/msggen/msggen/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -29637,51 +29637,13 @@
}
}
},
"notes": [
"Reckless currently supports python and javascript plugins.",
"Running the first time will prompt the user that their lightningd's bitcoin config will be appended (or created) to inherit the reckless config file (this config is specific to bitcoin by default.). Management of plugins will subsequently modify this file.",
"",
"Available option flags:",
"**-d**, **--reckless-dir** *reckless_dir*: specify an alternative data directory for reckless to use. Useful if your .lightning is protected from execution.",
"",
"**-l**, **--lightning** *lightning\\_data\\_dir*: lightning data directory (defaults to $USER/.lightning)",
"",
"**-c**, **--conf** *lightning\\_config*: pass the config used by lightningd",
"",
"**-r**, **--regtest**: use the regtest network and config instead of bitcoin mainnet",
"",
"**-v**, **--verbose**: request additional debug output",
"",
"**--network**=*network*: specify bitcoin, regtest, liquid, liquid-regtest, litecoin, signet, or testnet networks. (default: bitcoin)",
"",
"**--version**: print the version of reckless and exit",
"",
"",
"Troubleshooting tips:",
"",
"Plugins must be executable. For python plugins, the shebang is invoked, so **python3** should be available in your environment. This can be verified with **which Python3**. The default reckless directory is $USER/.lightning/reckless and it should be possible for the lightningd user to execute files located here. If this is a problem, the option flag **reckless -d=<my_alternate_dir>** may be used to relocate the reckless directory from its default. Consider creating a permanent alias in this case.",
"Python plugins are installed to their own virtual environments. The environment is activated by a wrapper (named the same as the plugin) which then imports and executes the actual plugin entrypoint.",
"",
"For Plugin Developers:",
"",
"To make your plugin compatible with reckless install:",
"- Choose a unique plugin name: The plugin entrypoint is inferred. Naming your plugin executable the same as your plugin name will allow reckless to identify it correctly (file extensions are okay.)",
"- For python plugins, a requirements.txt is the preferred medium for python dependencies. A pyproject.toml will be used as a fallback, but test installation via `pip install -e .` - Poetry looks for additional files in the working directory, whereas with pip, any references to these will require something like `packages = [{ include = \"*.py\" }]` under the `[tool.poetry]` section.",
"- Additional repository sources may be added with `reckless source add https://my.repo.url/here` however, https://github.com/lightningd/plugins is included by default. Consider adding your plugin lightningd/plugins to make installation simpler.",
"- If your plugin is located in a subdirectory of your repo with a different name than your plugin, it will likely be overlooked."
],
"author": [
"Antoine Poinsot wrote the original reckless plugin on which this is based.",
"",
"Rusty Russell wrote the outline for the reckless utility's function",
"",
"Alex Myers <<[email protected]>> is mainly responsible for the reckless code and this man page, with thanks to Christian Decker for extensive review."
"Alex Myers <<[email protected]>> is mainly responsible."
],
"see_also": [
"reckless(7)"
"reckless(1)"
],
"resources": [
"Core-Lightning plugins repo: <https://github.com/lightningd/plugins>",
"Main web site: <https://github.com/ElementsProject/lightning>"
],
"examples": [
Expand Down
3 changes: 2 additions & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ NON_PREFIXED_MANPAGES := doc/lightning-cli.1 \
doc/lightningd.8 \
doc/lightningd-config.5 \
doc/lightningd-rpc.7 \
doc/lightning-hsmtool.8
doc/lightning-hsmtool.8 \
doc/lightning-reckless.1

MANPAGES := $(PREFIXED_MANPAGES) $(NON_PREFIXED_MANPAGES)

Expand Down
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Core Lightning Documentation
keysend <keysend.7.md>
lightning-cli <lightning-cli.1.md>
lightning-hsmtool <lightning-hsmtool.8.md>
lightning-reckless <lightning-reckless.1.md>
lightningd <lightningd.8.md>
lightningd-config <lightningd-config.5.md>
lightningd-rpc <lightningd-rpc.7.md>
Expand Down
150 changes: 150 additions & 0 deletions doc/lightning-reckless.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
reckless - install and activate a CLN plugin by name
====================================================

SYNOPSIS
--------

**reckless** [*options*] **install/uninstall/enable/disable/source** *target*

DESCRIPTION
-----------

Reckless is a plugin manager for Core-Lightning. Typical plugin
installation involves: finding the source plugin, copying,
installing dependencies, testing, activating, and updating the
lightningd config file. Reckless does all of these by invoking:

**reckless** **install**[@*commit/tag*] *plugin\_name*

reckless will exit early in the event that:

- the plugin is not found in any available source repositories
- dependencies are not successfully installed
- the plugin fails to execute

Reckless-installed plugins reside in the 'reckless' subdirectory
of the user's `.lightning` folder. By default, plugins are activated
on the `bitcoin` network (and use lightningd's bitcoin network
config), but regtest may also be used.

Other commands include:

**reckless** **uninstall** *plugin\_name*
disables the plugin, removes the directory.

**reckless** **search** *plugin\_name*
looks through all available sources for a plugin matching
this name.

**reckless** **enable** *plugin\_name*
dynamically enables the reckless-installed plugin and updates
the config to match.

**reckless** **disable** *plugin\_name*
dynamically disables the reckless-installed plugin and updates
the config to match.

**reckless** **source** **list**
list available plugin repositories.

**reckless** **source** **add** *repo\_url*
add another plugin repo for reckless to search.

**reckless** **source** **rm** *repo\_url*
remove a plugin repo for reckless to search.

OPTIONS
-------

Available option flags:

**-d**, **--reckless-dir** *reckless\_dir*
specify an alternative data directory for reckless to use.
Useful if your .lightning is protected from execution.

**-l**, **--lightning** *lightning\_data\_dir*
lightning data directory (defaults to $USER/.lightning)

**-c**, **--conf** *lightning\_config*
pass the config used by lightningd

**-r**, **--regtest**
use the regtest network and config instead of bitcoin mainnet

**-v**, **--verbose**
request additional debug output

**--network**=*network*
specify bitcoin, regtest, liquid, liquid-regtest, litecoin, signet,
or testnet networks. (default: bitcoin)

NOTES
-----

Reckless currently supports python and javascript plugins.

Running the first time will prompt the user that their lightningd's
bitcoin config will be appended (or created) to inherit the reckless
config file (this config is specific to bitcoin by default.)
Management of plugins will subsequently modify this file.


Troubleshooting tips:

Plugins must be executable. For python plugins, the shebang is
invoked, so **python3** should be available in your environment. This
can be verified with **which Python3**. The default reckless directory
is $USER/.lightning/reckless and it should be possible for the
lightningd user to execute files located here. If this is a problem,
the option flag **reckless -d=<my\_alternate\_dir>** may be used to
relocate the reckless directory from its default. Consider creating a
permanent alias in this case.

Python plugins are installed to their own virtual environments. The
environment is activated by a wrapper (named the same as the plugin)
which then imports and executes the actual plugin entrypoint.

For Plugin Developers:

To make your plugin compatible with reckless install:

- Choose a unique plugin name.
- The plugin entrypoint is inferred. Naming your plugin executable
the same as your plugin name will allow reckless to identify it
correctly (file extensions are okay.)
- For python plugins, a requirements.txt is the preferred medium for
python dependencies. A pyproject.toml will be used as a fallback,
but test installation via `pip install -e .` - Poetry looks for
additional files in the working directory, whereas with pip, any
references to these will require something like
`packages = [{ include = "*.py" }]` under the `[tool.poetry]`
section.
- Additional repository sources may be added with
`reckless source add https://my.repo.url/here` however,
https://github.com/lightningd/plugins is included by default.
Consider adding your plugin lightningd/plugins to make
installation simpler.
- If your plugin is located in a subdirectory of your repo with a
different name than your plugin, it will likely be overlooked.

AUTHOR
------

Antoine Poinsot wrote the original reckless plugin on which this is
based.

Rusty Russell wrote the outline for the reckless utility's function

Alex Myers <<[email protected]>> is mostly responsible for the
reckless code and this man page, with thanks to Christian Decker for
extensive review.

SEE ALSO
--------

reckless(7), Core-Lightning plugins repo: <https://github.com/lightningd/plugins>

RESOURCES
---------

Main web site: <https://github.com/ElementsProject/lightning>
44 changes: 2 additions & 42 deletions doc/reckless.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,41 +23,6 @@ The **reckless** RPC starts a reckless process with the *command* and *target* p
- (string)
- (array)

NOTES
-----

Reckless currently supports python and javascript plugins.
Running the first time will prompt the user that their lightningd's bitcoin config will be appended (or created) to inherit the reckless config file (this config is specific to bitcoin by default.). Management of plugins will subsequently modify this file.

Available option flags:
**-d**, **--reckless-dir** *reckless\_dir*: specify an alternative data directory for reckless to use. Useful if your .lightning is protected from execution.

**-l**, **--lightning** *lightning\_data\_dir*: lightning data directory (defaults to $USER/.lightning)

**-c**, **--conf** *lightning\_config*: pass the config used by lightningd

**-r**, **--regtest**: use the regtest network and config instead of bitcoin mainnet

**-v**, **--verbose**: request additional debug output

**--network**=*network*: specify bitcoin, regtest, liquid, liquid-regtest, litecoin, signet, or testnet networks. (default: bitcoin)

**--version**: print the version of reckless and exit


Troubleshooting tips:

Plugins must be executable. For python plugins, the shebang is invoked, so **python3** should be available in your environment. This can be verified with **which Python3**. The default reckless directory is $USER/.lightning/reckless and it should be possible for the lightningd user to execute files located here. If this is a problem, the option flag **reckless -d=<my\_alternate\_dir>** may be used to relocate the reckless directory from its default. Consider creating a permanent alias in this case.
Python plugins are installed to their own virtual environments. The environment is activated by a wrapper (named the same as the plugin) which then imports and executes the actual plugin entrypoint.

For Plugin Developers:

To make your plugin compatible with reckless install:
- Choose a unique plugin name: The plugin entrypoint is inferred. Naming your plugin executable the same as your plugin name will allow reckless to identify it correctly (file extensions are okay.)
- For python plugins, a requirements.txt is the preferred medium for python dependencies. A pyproject.toml will be used as a fallback, but test installation via `pip install -e .` - Poetry looks for additional files in the working directory, whereas with pip, any references to these will require something like `packages = [{ include = "*.py" }]` under the `[tool.poetry]` section.
- Additional repository sources may be added with `reckless source add https://my.repo.url/here` however, https://github.com/lightningd/plugins is included by default. Consider adding your plugin lightningd/plugins to make installation simpler.
- If your plugin is located in a subdirectory of your repo with a different name than your plugin, it will likely be overlooked.

RETURN VALUE
------------

Expand All @@ -71,21 +36,16 @@ On success, an object is returned, containing:
AUTHOR
------

Antoine Poinsot wrote the original reckless plugin on which this is based.

Rusty Russell wrote the outline for the reckless utility's function

Alex Myers <<[email protected]>> is mainly responsible for the reckless code and this man page, with thanks to Christian Decker for extensive review.
Alex Myers <<[email protected]>> is mainly responsible.

SEE ALSO
--------

reckless(7)
reckless(1)

RESOURCES
---------

Core-Lightning plugins repo: <https://github.com/lightningd/plugins>
Main web site: <https://github.com/ElementsProject/lightning>

EXAMPLES
Expand Down
42 changes: 2 additions & 40 deletions doc/schemas/reckless.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,51 +86,13 @@
}
}
},
"notes": [
"Reckless currently supports python and javascript plugins.",
"Running the first time will prompt the user that their lightningd's bitcoin config will be appended (or created) to inherit the reckless config file (this config is specific to bitcoin by default.). Management of plugins will subsequently modify this file.",
"",
"Available option flags:",
"**-d**, **--reckless-dir** *reckless_dir*: specify an alternative data directory for reckless to use. Useful if your .lightning is protected from execution.",
"",
"**-l**, **--lightning** *lightning\\_data\\_dir*: lightning data directory (defaults to $USER/.lightning)",
"",
"**-c**, **--conf** *lightning\\_config*: pass the config used by lightningd",
"",
"**-r**, **--regtest**: use the regtest network and config instead of bitcoin mainnet",
"",
"**-v**, **--verbose**: request additional debug output",
"",
"**--network**=*network*: specify bitcoin, regtest, liquid, liquid-regtest, litecoin, signet, or testnet networks. (default: bitcoin)",
"",
"**--version**: print the version of reckless and exit",
"",
"",
"Troubleshooting tips:",
"",
"Plugins must be executable. For python plugins, the shebang is invoked, so **python3** should be available in your environment. This can be verified with **which Python3**. The default reckless directory is $USER/.lightning/reckless and it should be possible for the lightningd user to execute files located here. If this is a problem, the option flag **reckless -d=<my_alternate_dir>** may be used to relocate the reckless directory from its default. Consider creating a permanent alias in this case.",
"Python plugins are installed to their own virtual environments. The environment is activated by a wrapper (named the same as the plugin) which then imports and executes the actual plugin entrypoint.",
"",
"For Plugin Developers:",
"",
"To make your plugin compatible with reckless install:",
"- Choose a unique plugin name: The plugin entrypoint is inferred. Naming your plugin executable the same as your plugin name will allow reckless to identify it correctly (file extensions are okay.)",
"- For python plugins, a requirements.txt is the preferred medium for python dependencies. A pyproject.toml will be used as a fallback, but test installation via `pip install -e .` - Poetry looks for additional files in the working directory, whereas with pip, any references to these will require something like `packages = [{ include = \"*.py\" }]` under the `[tool.poetry]` section.",
"- Additional repository sources may be added with `reckless source add https://my.repo.url/here` however, https://github.com/lightningd/plugins is included by default. Consider adding your plugin lightningd/plugins to make installation simpler.",
"- If your plugin is located in a subdirectory of your repo with a different name than your plugin, it will likely be overlooked."
],
"author": [
"Antoine Poinsot wrote the original reckless plugin on which this is based.",
"",
"Rusty Russell wrote the outline for the reckless utility's function",
"",
"Alex Myers <<[email protected]>> is mainly responsible for the reckless code and this man page, with thanks to Christian Decker for extensive review."
"Alex Myers <<[email protected]>> is mainly responsible."
],
"see_also": [
"reckless(7)"
"reckless(1)"
],
"resources": [
"Core-Lightning plugins repo: <https://github.com/lightningd/plugins>",
"Main web site: <https://github.com/ElementsProject/lightning>"
],
"examples": [
Expand Down
Loading