Skip to content

Commit d9cd10f

Browse files
authored
Merge pull request 0xPolygon#2445 from 0xPolygon/cdk/cli-fix
CLI: Add missing CLI doc back
2 parents c333ca7 + e07fd89 commit d9cd10f

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
To simplify the process of running and configuring CDK components, Polygon provides a Rust-based CLI tool which is an interface that chain administrators can use to interact with the components.
2+
3+
This CLI tool is an entry point for chain administrators to access the CDK system.
4+
5+
## Installation
6+
7+
As the chain admin, you simply need to download the precompiled [CDK package binaries](https://github.com/0xPolygon/cdk/releases/).
8+
9+
## Running the CLI tool
10+
11+
!!! info
12+
13+
Requirements:
14+
15+
Get the binaries, packages and docker images published with each release, [here](https://github.com/0xPolygon/cdk/releases/).
16+
17+
## Commands
18+
19+
### CDK
20+
21+
Here, you need to provide the CDK node configuration file and the genesis file for your desired chain.
22+
23+
Usage: `cdk <COMMAND>`
24+
25+
Commands:
26+
* `node` - Run the cdk-node with the provided configuration
27+
* `erigon` - Run cdk-erigon node with the provided default configuration
28+
* `versions` - Output the corresponding versions of the components
29+
* `help` Print this message or the help of the given subcommand(s)
30+
31+
Options:
32+
* `-h, --help` - Print help
33+
34+
### `cdk node`
35+
36+
To run cdk-node use the `node` subcommand with one of the options mentioned below.
37+
38+
Usage: `cdk node [OPTIONS]`
39+
40+
Options:
41+
* `-C, --config <CONFIG>` - The path to the configuration file [env: `CDK_CONFIG_PATH=`]
42+
* `-c, --components <COMPONENTS>` - Components to run [env: `CDK_COMPONENTS=`]
43+
* `-h, --help` - Print help
44+
45+
Example:
46+
47+
```
48+
cdk node --config /etc/cdk/cdk-node-config.toml --components sequence-sender,aggregator
49+
```
50+
51+
### `cdk erigon`
52+
53+
You can run a cdk-erigon RPC node that syncs to an existing chain using the default parameters.
54+
55+
This subcommand is intended for quickly spinning up an RPC node or testing existing chains with default configuration values. In order to fine-tune settings and access all available configuration options, refer to the [full cdk-erigon documentation](../../cdk/getting-started/cdk-erigon/index.md) on Erigon configuration.
56+
57+
Usage: `cdk erigon [OPTIONS]`
58+
59+
Options:
60+
* `-C, --config <CONFIG>` - The path to the configuration file [env: `CDK_CONFIG_PATH=`]
61+
* `-g, --chain <CHAIN>` - The path to a chain specification file [env: `CDK_GENESIS_PATH=`]
62+
* `-h, --help` - Print help
63+
64+
### `cdk versions`
65+
66+
The above command generates all the required configuration files for cdk-erigon on the fly and runs the node.
67+
68+
To print the corresponding versions of the components, run the following command:
69+
70+
Usage: `cdk versions`
71+
72+
Options:
73+
* `-h, --help` - Print help
74+
75+
Example:
76+
77+
```
78+
cdk erigon --config /etc/cdk/cdk-node-config.toml --chain genesis.json
79+
```

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ nav:
5757
- Full execution proofs (FEP): cdk/releases/stack-components.md
5858
- Get started:
5959
- Local deployment guide: cdk/getting-started/local-deployment.md
60+
- CLI tool: cdk/getting-started/cli-tool.md
6061
- Concepts:
6162
- Layer 2s: cdk/concepts/layer2s.md
6263
- L2 architecture overview: cdk/concepts/architecture.md

0 commit comments

Comments
 (0)