kaleido-cli 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. kaleido_cli-0.1.2/.github/workflows/ci.yml +26 -0
  2. kaleido_cli-0.1.2/.github/workflows/publish.yml +56 -0
  3. kaleido_cli-0.1.2/.gitignore +48 -0
  4. kaleido_cli-0.1.2/LICENSE +21 -0
  5. kaleido_cli-0.1.2/Makefile +35 -0
  6. kaleido_cli-0.1.2/PKG-INFO +416 -0
  7. kaleido_cli-0.1.2/README.md +394 -0
  8. kaleido_cli-0.1.2/install.py +184 -0
  9. kaleido_cli-0.1.2/install.sh +85 -0
  10. kaleido_cli-0.1.2/kaleido_cli/__init__.py +3 -0
  11. kaleido_cli-0.1.2/kaleido_cli/__main__.py +6 -0
  12. kaleido_cli-0.1.2/kaleido_cli/app.py +204 -0
  13. kaleido_cli-0.1.2/kaleido_cli/commands/__init__.py +1 -0
  14. kaleido_cli-0.1.2/kaleido_cli/commands/asset.py +850 -0
  15. kaleido_cli-0.1.2/kaleido_cli/commands/channel.py +855 -0
  16. kaleido_cli-0.1.2/kaleido_cli/commands/config_cmd.py +113 -0
  17. kaleido_cli-0.1.2/kaleido_cli/commands/market.py +241 -0
  18. kaleido_cli-0.1.2/kaleido_cli/commands/node.py +874 -0
  19. kaleido_cli-0.1.2/kaleido_cli/commands/node_swap.py +274 -0
  20. kaleido_cli-0.1.2/kaleido_cli/commands/payment.py +364 -0
  21. kaleido_cli-0.1.2/kaleido_cli/commands/peer.py +108 -0
  22. kaleido_cli-0.1.2/kaleido_cli/commands/swap.py +460 -0
  23. kaleido_cli-0.1.2/kaleido_cli/commands/wallet.py +487 -0
  24. kaleido_cli-0.1.2/kaleido_cli/config.py +88 -0
  25. kaleido_cli-0.1.2/kaleido_cli/context.py +41 -0
  26. kaleido_cli-0.1.2/kaleido_cli/docker_manager.py +463 -0
  27. kaleido_cli-0.1.2/kaleido_cli/onboarding.py +275 -0
  28. kaleido_cli-0.1.2/kaleido_cli/output.py +123 -0
  29. kaleido_cli-0.1.2/kaleido_cli/utils/__init__.py +1 -0
  30. kaleido_cli-0.1.2/kaleido_cli/utils/assets.py +40 -0
  31. kaleido_cli-0.1.2/kaleido_cli/utils/channel_orders.py +822 -0
  32. kaleido_cli-0.1.2/kaleido_cli/utils/errors.py +17 -0
  33. kaleido_cli-0.1.2/kaleido_cli/utils/pairs.py +133 -0
  34. kaleido_cli-0.1.2/kaleido_cli/utils/prompts.py +102 -0
  35. kaleido_cli-0.1.2/kaleido_cli/utils/quotes.py +163 -0
  36. kaleido_cli-0.1.2/kaleido_cli/utils/swaps.py +142 -0
  37. kaleido_cli-0.1.2/pyproject.toml +58 -0
  38. kaleido_cli-0.1.2/tests/__init__.py +0 -0
  39. kaleido_cli-0.1.2/tests/conftest.py +126 -0
  40. kaleido_cli-0.1.2/tests/test_cmd_asset_payment.py +62 -0
  41. kaleido_cli-0.1.2/tests/test_cmd_config.py +89 -0
  42. kaleido_cli-0.1.2/tests/test_cmd_market.py +175 -0
  43. kaleido_cli-0.1.2/tests/test_cmd_node.py +131 -0
  44. kaleido_cli-0.1.2/tests/test_cmd_swap.py +320 -0
  45. kaleido_cli-0.1.2/tests/test_cmd_wallet.py +177 -0
  46. kaleido_cli-0.1.2/tests/test_config.py +126 -0
  47. kaleido_cli-0.1.2/tests/test_docker_manager.py +92 -0
  48. kaleido_cli-0.1.2/tests/test_output.py +85 -0
  49. kaleido_cli-0.1.2/tests/test_utils_assets.py +19 -0
  50. kaleido_cli-0.1.2/tests/test_utils_errors.py +24 -0
  51. kaleido_cli-0.1.2/tests/test_utils_prompts.py +39 -0
  52. kaleido_cli-0.1.2/tests/test_utils_swaps.py +29 -0
  53. kaleido_cli-0.1.2/uv.lock +579 -0
@@ -0,0 +1,26 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["master", "dev"]
6
+ pull_request:
7
+ branches: ["master"]
8
+
9
+ env:
10
+ PYTHON_VERSION: "3.11"
11
+
12
+ jobs:
13
+ check-cli:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v5
17
+ - uses: astral-sh/setup-uv@v7.5.0
18
+ with:
19
+ enable-cache: true
20
+ python-version: ${{ env.PYTHON_VERSION }}
21
+ - name: Format check
22
+ run: uvx ruff format --check .
23
+ - name: Lint
24
+ run: uvx ruff check .
25
+ - name: Type check
26
+ run: uvx --with ".[dev]" pyright .
@@ -0,0 +1,56 @@
1
+ name: Publish to PyPI
2
+
3
+ # Pushing a tag vX.Y.Z publishes kaleido-cli X.Y.Z via PyPI trusted publishing (OIDC).
4
+ # Requires a trusted publisher on PyPI for this repo, workflow `publish.yml`, environment `pypi`.
5
+
6
+ on:
7
+ push:
8
+ tags: ["v*"]
9
+
10
+ env:
11
+ PYTHON_VERSION: "3.11"
12
+
13
+ jobs:
14
+ build:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v5
18
+ - uses: astral-sh/setup-uv@v7.5.0
19
+ with:
20
+ enable-cache: true
21
+ python-version: ${{ env.PYTHON_VERSION }}
22
+ - name: Check tag matches package version
23
+ run: |
24
+ set -euo pipefail
25
+ TAG="${GITHUB_REF_NAME#v}"
26
+ PYPROJECT="$(uv run --no-project python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
27
+ INIT="$(sed -n 's/^__version__ = "\(.*\)"$/\1/p' kaleido_cli/__init__.py)"
28
+ [ "$TAG" = "$PYPROJECT" ] || { echo "tag $TAG != pyproject $PYPROJECT" >&2; exit 1; }
29
+ [ "$TAG" = "$INIT" ] || { echo "tag $TAG != __version__ $INIT" >&2; exit 1; }
30
+ - name: Lint
31
+ run: |
32
+ uvx ruff format --check .
33
+ uvx ruff check .
34
+ - name: Test
35
+ run: uv run --frozen pytest -q
36
+ - name: Build
37
+ run: uv build
38
+ - uses: actions/upload-artifact@v4
39
+ with:
40
+ name: dist
41
+ path: dist/
42
+
43
+ publish:
44
+ runs-on: ubuntu-latest
45
+ needs: build
46
+ environment:
47
+ name: pypi
48
+ url: https://pypi.org/project/kaleido-cli/
49
+ permissions:
50
+ id-token: write
51
+ steps:
52
+ - uses: actions/download-artifact@v4
53
+ with:
54
+ name: dist
55
+ path: dist/
56
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,48 @@
1
+ # Virtual environment (managed by uv)
2
+ .venv/
3
+
4
+ # Python bytecode
5
+ __pycache__/
6
+ *.py[cod]
7
+ *.pyo
8
+
9
+ # Build & distribution
10
+ dist/
11
+ build/
12
+ *.egg-info/
13
+ *.egg
14
+
15
+ # Installer / pip
16
+ pip-wheel-metadata/
17
+ .pip-caches/
18
+
19
+ # uv tool installs (editable install artifacts)
20
+ *.dist-info/
21
+
22
+ # Testing
23
+ .pytest_cache/
24
+ .coverage
25
+ .coverage.*
26
+ htmlcov/
27
+ coverage.xml
28
+
29
+ # Linters / type checkers
30
+ .ruff_cache/
31
+ .mypy_cache/
32
+
33
+ # Environment files
34
+ .env
35
+ .env.*
36
+ !.env.example
37
+
38
+ # macOS
39
+ .DS_Store
40
+
41
+ # IDEs
42
+ .idea/
43
+ .vscode/
44
+ *.swp
45
+ *.swo
46
+
47
+ # Logs
48
+ *.log
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kaleidoswap
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,35 @@
1
+ .PHONY: \
2
+ install uninstall reinstall \
3
+ check check-format check-lint typecheck \
4
+ fix \
5
+ lint format \
6
+ pre-commit
7
+
8
+ install:
9
+ uv tool install --editable .
10
+
11
+ uninstall:
12
+ uv tool uninstall kaleido-cli
13
+
14
+ reinstall: uninstall install
15
+
16
+ check-format:
17
+ uvx ruff format --check .
18
+
19
+ check-lint:
20
+ uvx ruff check .
21
+
22
+ check: check-format check-lint typecheck
23
+
24
+ lint:
25
+ uvx ruff check --fix .
26
+
27
+ format:
28
+ uvx ruff format .
29
+
30
+ typecheck:
31
+ uvx --with '.[dev]' pyright .
32
+
33
+ fix: format lint
34
+
35
+ pre-commit: check
@@ -0,0 +1,416 @@
1
+ Metadata-Version: 2.5
2
+ Name: kaleido-cli
3
+ Version: 0.1.2
4
+ Summary: CLI for managing RGB Lightning Nodes and interacting with Kaleidoswap
5
+ Project-URL: Homepage, https://kaleidoswap.com
6
+ Project-URL: Repository, https://github.com/kaleidoswap/kaleido-cli
7
+ Author-email: Kaleidoswap <dev@kaleidoswap.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: bitcoin,cli,kaleidoswap,lightning,rgb
11
+ Requires-Python: >=3.11
12
+ Requires-Dist: kaleido-sdk<0.2,>=0.1.23
13
+ Requires-Dist: pyyaml>=6.0.0
14
+ Requires-Dist: rich>=13.0.0
15
+ Requires-Dist: shellingham>=1.5
16
+ Requires-Dist: typer>=0.12.0
17
+ Provides-Extra: dev
18
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
19
+ Requires-Dist: pytest-mock>=3.15.1; extra == 'dev'
20
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
21
+ Description-Content-Type: text/markdown
22
+
23
+ # Kaleido CLI
24
+
25
+ [![CI](https://github.com/kaleidoswap/kaleido-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/kaleidoswap/kaleido-cli/actions/workflows/ci.yml)
26
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/)
27
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
28
+
29
+ Manage RGB Lightning Nodes and trade on [Kaleidoswap](https://kaleidoswap.com) — all from your terminal.
30
+
31
+ > **Beta Software — Use at Your Own Risk**
32
+ >
33
+ > This CLI is under active development and currently intended for **testnet/signet use only**. It is **not considered safe for mainnet** or production environments. The authors assume no responsibility for any loss of funds or damages arising from the use of this software.
34
+
35
+ ## Overview
36
+
37
+ `kaleido` covers two main areas:
38
+
39
+ - **RGB Lightning Node (RLN)** — spin up Docker-based node environments, manage your BTC wallet, RGB assets, Lightning channels, peers, and payments.
40
+ - **Kaleidoswap API** — query market data, create maker swap orders, run maker atomic swaps, and coordinate low-level local swap steps.
41
+
42
+ ---
43
+
44
+ ## Requirements
45
+
46
+ - Python 3.11+
47
+ - `curl` or `wget` only for the one-line shell bootstrap command
48
+ - Docker & Docker Compose for `kaleido setup` (local node) and the Docker-based `node` commands
49
+
50
+ ---
51
+
52
+ ## Installation
53
+
54
+ ### One command for macOS, Linux, and WSL
55
+
56
+ With Python only:
57
+
58
+ ```bash
59
+ python3 -c "import urllib.request; exec(urllib.request.urlopen('https://raw.githubusercontent.com/kaleidoswap/kaleido-cli/master/install.py').read())"
60
+ ```
61
+
62
+ Or with the shell bootstrap:
63
+
64
+ ```bash
65
+ curl -fsSL https://raw.githubusercontent.com/kaleidoswap/kaleido-cli/master/install.sh | sh
66
+ ```
67
+
68
+ Or with `wget`:
69
+
70
+ ```bash
71
+ wget -qO- https://raw.githubusercontent.com/kaleidoswap/kaleido-cli/master/install.sh | sh
72
+ ```
73
+
74
+ The bootstrap script downloads the latest `master` branch, prefers `uv tool install` when available, and otherwise installs into an isolated Kaleido virtual environment using Python's standard library. It does not install packages into the system Python environment.
75
+
76
+ `kaleido-cli` is not on PyPI yet. Once it is published, `pip install kaleido-cli` or `uv tool install kaleido-cli` will also work.
77
+
78
+ Then run:
79
+
80
+ ```bash
81
+ kaleido setup
82
+ ```
83
+
84
+ `kaleido setup` creates and starts one mutinynet node with defaults. You can also run:
85
+
86
+ ```bash
87
+ kaleido setup signetcustom
88
+ ```
89
+
90
+ Use `kaleido setup --mode market --defaults` for a market-only setup that works without Docker.
91
+
92
+ ### Alternative installers
93
+
94
+ Install directly from a local checkout for development:
95
+
96
+ ```bash
97
+ git clone https://github.com/kaleidoswap/kaleido-cli
98
+ cd kaleido-cli
99
+ ./install.sh
100
+ ```
101
+
102
+ Install without the shell bootstrap:
103
+
104
+ ```bash
105
+ uv tool install git+https://github.com/kaleidoswap/kaleido-cli.git
106
+ ```
107
+
108
+ For Windows or a cross-platform Python-based installer:
109
+
110
+ ```bash
111
+ python install.py
112
+ ```
113
+
114
+ The Python installer has the same minimal requirement: Python 3.11+. `install.sh` uses the first `python3`, `python3.1x` or `python` on your `PATH` that meets it; set `KALEIDO_PYTHON=/path/to/python` to choose one explicitly. When `uv` is unavailable, it creates a dedicated app virtual environment and writes a `kaleido` launcher into your user script directory.
115
+
116
+ For a local editable install with the existing Makefile helper:
117
+
118
+ ```bash
119
+ make install
120
+ ```
121
+
122
+ ### Makefile targets
123
+
124
+ | Command | Description |
125
+ |------------------|-------------------------------------------|
126
+ | `make install` | Install the current checkout via `uv tool` |
127
+ | `make uninstall` | Remove the global installation |
128
+ | `make reinstall` | Uninstall then reinstall |
129
+
130
+ ---
131
+
132
+ ## Initial Configuration
133
+
134
+ Configuration is stored in `~/.kaleido/config.json`.
135
+
136
+ For first-time use, prefer:
137
+
138
+ ```bash
139
+ kaleido setup
140
+ ```
141
+
142
+ If you want to configure manually, use:
143
+
144
+ ```bash
145
+ kaleido config show # view current config
146
+ kaleido config set api-url https://api.signet.kaleidoswap.com/
147
+ kaleido config set network mutinynet
148
+ kaleido config reset # reset to defaults
149
+ ```
150
+
151
+ Override per-command with flags or environment variables:
152
+
153
+ ```bash
154
+ kaleido --node-url http://localhost:3001 wallet balance
155
+ kaleido --api-url https://api.signet.kaleidoswap.com/ market pairs
156
+
157
+ export KALEIDO_NODE_URL=http://localhost:3001
158
+ export KALEIDO_API_URL=https://api.signet.kaleidoswap.com/
159
+ ```
160
+
161
+ Valid config keys: `api-url`, `node-url`, `network`, `spawn-dir`
162
+
163
+ ---
164
+
165
+ ## Node Environments
166
+
167
+ The CLI uses a **named environment** model. Each environment is an isolated Docker Compose setup with its own compose file and data volumes stored under `~/.kaleido/` by default.
168
+
169
+ ```
170
+ ~/.kaleido/
171
+ ├── config.json
172
+ ├── mainenv/
173
+ │ ├── docker-compose.yml
174
+ │ └── volumes/
175
+ │ └── dataldk0/
176
+ └── testenv/
177
+ ├── docker-compose.yml
178
+ └── volumes/
179
+ ├── dataldk0/
180
+ └── dataldk1/
181
+ ```
182
+
183
+ ### Creating an environment
184
+
185
+ ```bash
186
+ kaleido setup # create/start one mutinynet node with defaults
187
+ kaleido setup signetcustom # create/start one node on an explicit network
188
+ kaleido node create
189
+ # or give it a name directly:
190
+ kaleido node create testenv
191
+ ```
192
+
193
+ `mutinynet`, `signetcustom`, and `customsignet` are accepted as aliases for the Kaleidoswap custom signet RLN network.
194
+
195
+ The wizard prompts for:
196
+
197
+ 1. **Base directory** — where all environments are stored (default: `~/.kaleido`, saved to config as `spawn-dir`)
198
+ 2. **Environment name** — becomes a subdirectory under the base dir
199
+ 3. **Node count** — number of RGB Lightning Nodes to spin up
200
+ 4. **Network** — `mutinynet` (default), `signetcustom`/`customsignet`, `signet`, `regtest`, or `mainnet`
201
+ 5. **Node ports** — base daemon API port (3001+) and LDK peer port (9735+)
202
+ 6. **Start now** — whether to bring containers up immediately
203
+
204
+ ### Managing environments
205
+
206
+ ```bash
207
+ kaleido node list # list all environments with their node URLs
208
+ kaleido node up <name> # start containers (docker compose up -d)
209
+ kaleido node stop <name> # stop containers (data preserved)
210
+ kaleido node upgrade <name> # move to the node image this CLI targets (data kept)
211
+ kaleido node down <name> # stop and remove containers
212
+ kaleido node ps <name> # show container status
213
+ kaleido node logs <name> # stream all logs
214
+ kaleido node logs <name> --service bitcoind # filter by service
215
+ kaleido node clean <name> # delete all data volumes (irreversible)
216
+ ```
217
+
218
+ `<name>` can be omitted when only one environment exists — it is auto-detected.
219
+
220
+ ### Switching between nodes
221
+
222
+ Use `kaleido node use` to point the active `node-url` at any node in any environment:
223
+
224
+ ```bash
225
+ kaleido node use testenv # use node 1 of 'testenv' (port 3001)
226
+ kaleido node use testenv --node 2 # use node 2 of 'testenv' (port 3002)
227
+ ```
228
+
229
+ `kaleido node list` marks the currently active node with `●`:
230
+
231
+ ```
232
+ Environments in ~/.kaleido:
233
+
234
+ testenv → ~/.kaleido/testenv
235
+ ● node 1: http://localhost:3001
236
+ ○ node 2: http://localhost:3002
237
+ ```
238
+
239
+ ### First-time node setup
240
+
241
+ After creating and starting an environment:
242
+
243
+ ```bash
244
+ kaleido node use testenv # set the active node URL
245
+ kaleido node init # initialise the wallet (once per node)
246
+ kaleido node unlock # unlock the wallet (after every restart)
247
+ kaleido node info # confirm the node is reachable
248
+ ```
249
+
250
+ ---
251
+
252
+ ## Command Reference
253
+
254
+ All commands accept `--json` for machine-readable output:
255
+
256
+ ```bash
257
+ kaleido --json market pairs
258
+ ```
259
+
260
+ ### `node` — Node lifecycle
261
+
262
+ | Command | Description |
263
+ |-------------------------------------------|-----------------------------------------------------|
264
+ | `kaleido setup [network]` | Create/start one node, mutinynet by default |
265
+ | `kaleido node create [name]` | Wizard: configure and generate a named environment |
266
+ | `kaleido node list` | List all environments with node URLs |
267
+ | `kaleido node use <name> [--node N]` | Set node-url to node N in an environment |
268
+ | `kaleido node up <name>` | Start containers (docker compose up -d) |
269
+ | `kaleido node stop <name>` | Stop containers (data preserved) |
270
+ | `kaleido node down <name>` | Stop and remove containers + networks |
271
+ | `kaleido node upgrade <name>` | Move to the node image this CLI targets |
272
+ | `kaleido node ps <name>` | Show container status |
273
+ | `kaleido node logs <name> [--service S]` | Stream logs (optionally filtered by service) |
274
+ | `kaleido node clean <name>` | Delete all data volumes (irreversible) |
275
+ | `kaleido node init` | Initialise node wallet (once after first start) |
276
+ | `kaleido node unlock` | Unlock wallet (after every restart) |
277
+ | `kaleido node lock` | Lock the wallet |
278
+ | `kaleido node info` | Show node info from `/nodeinfo` |
279
+ | `kaleido node network` | Show network info from `/networkinfo` |
280
+
281
+ ### `wallet` — BTC wallet
282
+
283
+ | Command | Description |
284
+ |------------------------------------------|------------------------------------|
285
+ | `kaleido wallet address` | Get a new on-chain deposit address |
286
+ | `kaleido wallet balance` | Show BTC balance |
287
+ | `kaleido wallet send <amount> <address>` | Send on-chain BTC (sats) |
288
+
289
+ ### `asset` — RGB assets
290
+
291
+ | Command | Description |
292
+ |--------------------------------------|----------------------------------------|
293
+ | `kaleido asset list` | List all RGB assets held by the node |
294
+ | `kaleido asset balance <asset-id>` | Show balance for a specific RGB asset |
295
+ | `kaleido asset metadata <asset-id>` | Show metadata for a specific RGB asset |
296
+ | `kaleido asset transfers [asset-id]` | List transfers (`--no-asset`, `--txid`) |
297
+
298
+ ### `channel` — Lightning channels
299
+
300
+ | Command | Description |
301
+ |---------------------------------------|----------------------------------|
302
+ | `kaleido channel list` | List all Lightning channels |
303
+ | `kaleido channel open <peer>` | Open a new channel |
304
+ | `kaleido channel close <channel-id>` | Close a channel |
305
+
306
+ ### `peer` — Peer connections
307
+
308
+ | Command | Description |
309
+ |------------------------------------|---------------------------|
310
+ | `kaleido peer list` | List connected peers |
311
+ | `kaleido peer connect <peer>` | Connect to a peer |
312
+ | `kaleido peer disconnect <pubkey>` | Disconnect from a peer |
313
+
314
+ ### `payment` — Lightning payments
315
+
316
+ | Command | Description |
317
+ |----------------------------------|-----------------------------------------|
318
+ | `kaleido payment invoice` | Create a BOLT11 invoice (BTC or RGB+LN, `--description`) |
319
+ | `kaleido payment send <invoice>` | Pay a BOLT11 invoice |
320
+ | `kaleido payment list` | List payment history |
321
+
322
+ ### `market` — Kaleidoswap market data
323
+
324
+ | Command | Description |
325
+ |-----------------------------------|---------------------------------------|
326
+ | `kaleido market assets` | List all tradeable assets |
327
+ | `kaleido market pairs` | List all available trading pairs |
328
+ | `kaleido market quote <pair>` | Get a swap quote for a trading pair |
329
+
330
+ ```bash
331
+ # Send BTC via Lightning, receive USDT via RGB Lightning
332
+ kaleido market quote BTC/USDT --from-amount 100000 --from-layer BTC_LN --to-layer RGB_LN
333
+ ```
334
+
335
+ ### `swap` — Grouped swap flows
336
+
337
+ `swap` is split by scope:
338
+
339
+ - `kaleido swap order ...` for maker swap-order flows on the Kaleidoswap server
340
+ - `kaleido swap atomic ...` for atomic swaps against the Kaleidoswap maker server
341
+ - `kaleido node swap ...` for low-level local RLN node swap flows
342
+
343
+ | Command | Description |
344
+ |-------------------------------------|----------------------------------------------------------|
345
+ | `kaleido market quote <pair>` | Get a maker quote for a trading pair |
346
+ | `kaleido swap order create <pair>` | Create a maker swap order from a live quote |
347
+ | `kaleido swap order status <id>` | Check the status of a maker swap order |
348
+ | `kaleido swap order history` | List maker swap-order history |
349
+ | `kaleido swap atomic run <pair>` | Run atomic init -> whitelist -> execute in one command |
350
+ | `kaleido swap atomic init <pair>` | Initialize an atomic swap against the maker server |
351
+ | `kaleido swap atomic execute` | Execute an atomic swap against the maker server |
352
+ | `kaleido swap atomic status <hash>` | Check atomic swap status against the maker server |
353
+ | `kaleido node swap pubkey` | Show the local node's taker public key |
354
+ | `kaleido node swap init` | Initialize a low-level local node swap |
355
+ | `kaleido node swap whitelist` | Whitelist a swap on the local taker node |
356
+ | `kaleido node swap execute` | Execute a low-level local node swap |
357
+ | `kaleido node swap status <hash>` | Check local node swap status by payment hash |
358
+ | `kaleido node swap list` | List swaps known to the local RLN node |
359
+
360
+ ### `config` — CLI configuration
361
+
362
+ | Command | Description |
363
+ |------------------------------------|---------------------------------|
364
+ | `kaleido config show` | Display current configuration |
365
+ | `kaleido config set <key> <value>` | Set a configuration value |
366
+ | `kaleido config reset` | Reset configuration to defaults |
367
+ | `kaleido config path` | Print the config file path |
368
+
369
+ ---
370
+
371
+ ## Quick Start
372
+
373
+ ```bash
374
+ # 1. Install
375
+ curl -fsSL https://raw.githubusercontent.com/kaleidoswap/kaleido-cli/master/install.sh | sh
376
+
377
+ # 2. Create/start one mutinynet node
378
+ kaleido setup
379
+
380
+ # 3. Initialise and unlock the wallet
381
+ kaleido node init
382
+ kaleido node unlock
383
+
384
+ # 4. Confirm the node is healthy
385
+ kaleido node info
386
+
387
+ # 5. Get a funding address
388
+ kaleido wallet address
389
+
390
+ # 6. Browse available trading pairs
391
+ kaleido market pairs
392
+
393
+ # 7. Get a swap quote
394
+ kaleido market quote BTC/USDT --from-amount 100000
395
+ ```
396
+
397
+ For a non-interactive local setup with mutinynet defaults:
398
+
399
+ ```bash
400
+ kaleido setup
401
+ ```
402
+
403
+ ### Working with multiple nodes
404
+
405
+ ```bash
406
+ # Create a second environment on different ports
407
+ kaleido node create stagingenv
408
+
409
+ # See all environments and which node is active
410
+ kaleido node list
411
+
412
+ # Switch to node 2 in the staging environment
413
+ kaleido node use stagingenv --node 2
414
+ kaleido node unlock
415
+ kaleido wallet balance
416
+ ```