@xyo-network/xl1-cli 1.7.11 → 1.7.13

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.
package/README.body.md ADDED
@@ -0,0 +1,109 @@
1
+ ## Description
2
+
3
+ The XL1 Command-Line Interface (CLI) tool is a program you run in your terminal to create a local XL1 Node. Once installed, you can invoke it from any directory using its name, the command, and any desired options like:
4
+ ```
5
+ xl1 <command> [options]
6
+ ```
7
+ To see a list of all available commands and options run
8
+
9
+ ```
10
+ xl1 --help
11
+ ```
12
+
13
+ ## Installation
14
+
15
+ ### Prerequisites
16
+
17
+ This CLI tool is built with Node.js, which is required to run the application. Node.js provides the runtime environment for executing JavaScript outside the browser allowing this CLI to function as a standalone executable on your system.
18
+
19
+ #### Install Node.js
20
+
21
+ To get started, install the latest Long-Term Support (LTS) version of Node.js, which includes Node Package Manager (npm) from the [official site](https://nodejs.org/en/download). After installation, you can verify Node.js is working by running the following in your terminal:
22
+
23
+ ```
24
+ node -v
25
+ npm -v
26
+ ```
27
+
28
+ Once Node.js is installed, you can install the XL1 CLI tool globally using npm or yarn.
29
+
30
+ ### Install the XL1 CLI
31
+
32
+ Once Node.js is installed, you can install the XL1 CLI tool globally using npm:
33
+
34
+ ```
35
+ npm install -g @xyo-network/xl1-cli
36
+ ```
37
+
38
+ This makes the command `xl1` available anywhere in your terminal.
39
+
40
+ You can run the following command to verify the XL1 CLI was installed correctly
41
+
42
+ ```
43
+ xl1 --help
44
+ ```
45
+
46
+ ## Usage
47
+
48
+ After installing, you can run `xl1` from any terminal:
49
+
50
+ ```
51
+ xl1
52
+ ```
53
+
54
+ Runs a full XL1 Node, including both the API and Producer components. This is the default behavior when no subcommand is specified.
55
+
56
+ ```
57
+ xl1 api
58
+ ```
59
+
60
+ Starts only the API Node, which handles external requests and exposes HTTP endpoints.
61
+
62
+ ```
63
+ xl1 producer
64
+ ```
65
+
66
+ Starts only the Producer Node, which is responsible for block production.
67
+
68
+ Use `xl1 --help` for available options and configuration flags.
69
+
70
+ ### Configuration
71
+
72
+ Certainly! Here’s a brief and well-organized section describing the three ways to configure your xl1 CLI tool:
73
+
74
+
75
+
76
+ Configuration
77
+
78
+ You can configure xl1 using CLI flags, environment variables, or a configuration file. All methods are optional and can be combined—CLI flags override environment variables, which override config file values.
79
+
80
+ #### CLI Flags
81
+
82
+ Pass options directly when running a command. For example:
83
+
84
+ ```
85
+ xl1 --logLevel=info --api.port=8080
86
+ ```
87
+
88
+ #### Environment Variables
89
+
90
+ Set configuration via environment variables before running the command:
91
+
92
+ ```
93
+ export XL1_LOG_LEVEL=info
94
+ export XL1_API__PORT=8080
95
+ xl1
96
+ ```
97
+
98
+ #### Config File
99
+
100
+ Create a `xyo.config.json` (or .js, .yaml) file in the working directory to define default settings:
101
+
102
+ ```
103
+ {
104
+ "logLevel": "info"
105
+ "api": {
106
+ "port": 8080,
107
+ }
108
+ }
109
+ ```
package/README.md CHANGED
@@ -10,13 +10,115 @@
10
10
 
11
11
  XYO Layer One CLI
12
12
 
13
- ## Documentation
13
+ ## Description
14
14
 
15
- ## Reference
15
+ The XL1 Command-Line Interface (CLI) tool is a program you run in your terminal to create a local XL1 Node. Once installed, you can invoke it from any directory using its name, the command, and any desired options like:
16
+ ```
17
+ xl1 <command> [options]
18
+ ```
19
+ To see a list of all available commands and options run
16
20
 
17
- **@xyo-network/xl1-cli**
21
+ ```
22
+ xl1 --help
23
+ ```
18
24
 
19
- ***
25
+ ## Installation
26
+
27
+ ### Prerequisites
28
+
29
+ This CLI tool is built with Node.js, which is required to run the application. Node.js provides the runtime environment for executing JavaScript outside the browser allowing this CLI to function as a standalone executable on your system.
30
+
31
+ #### Install Node.js
32
+
33
+ To get started, install the latest Long-Term Support (LTS) version of Node.js, which includes Node Package Manager (npm) from the [official site](https://nodejs.org/en/download). After installation, you can verify Node.js is working by running the following in your terminal:
34
+
35
+ ```
36
+ node -v
37
+ npm -v
38
+ ```
39
+
40
+ Once Node.js is installed, you can install the XL1 CLI tool globally using npm or yarn.
41
+
42
+ ### Install the XL1 CLI
43
+
44
+ Once Node.js is installed, you can install the XL1 CLI tool globally using npm:
45
+
46
+ ```
47
+ npm install -g @xyo-network/xl1-cli
48
+ ```
49
+
50
+ This makes the command `xl1` available anywhere in your terminal.
51
+
52
+ You can run the following command to verify the XL1 CLI was installed correctly
53
+
54
+ ```
55
+ xl1 --help
56
+ ```
57
+
58
+ ## Usage
59
+
60
+ After installing, you can run `xl1` from any terminal:
61
+
62
+ ```
63
+ xl1
64
+ ```
65
+
66
+ Runs a full XL1 Node, including both the API and Producer components. This is the default behavior when no subcommand is specified.
67
+
68
+ ```
69
+ xl1 api
70
+ ```
71
+
72
+ Starts only the API Node, which handles external requests and exposes HTTP endpoints.
73
+
74
+ ```
75
+ xl1 producer
76
+ ```
77
+
78
+ Starts only the Producer Node, which is responsible for block production.
79
+
80
+ Use `xl1 --help` for available options and configuration flags.
81
+
82
+ ### Configuration
83
+
84
+ Certainly! Here’s a brief and well-organized section describing the three ways to configure your xl1 CLI tool:
85
+
86
+
87
+
88
+ Configuration
89
+
90
+ You can configure xl1 using CLI flags, environment variables, or a configuration file. All methods are optional and can be combined—CLI flags override environment variables, which override config file values.
91
+
92
+ #### CLI Flags
93
+
94
+ Pass options directly when running a command. For example:
95
+
96
+ ```
97
+ xl1 --logLevel=info --api.port=8080
98
+ ```
99
+
100
+ #### Environment Variables
101
+
102
+ Set configuration via environment variables before running the command:
103
+
104
+ ```
105
+ export XL1_LOG_LEVEL=info
106
+ export XL1_API__PORT=8080
107
+ xl1
108
+ ```
109
+
110
+ #### Config File
111
+
112
+ Create a `xyo.config.json` (or .js, .yaml) file in the working directory to define default settings:
113
+
114
+ ```
115
+ {
116
+ "logLevel": "info"
117
+ "api": {
118
+ "port": 8080,
119
+ }
120
+ }
121
+ ```
20
122
 
21
123
 
22
124
 
File without changes