@conquest-eth/tools 0.0.4 → 0.0.6
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.md +38 -44
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Conquest.eth CLI
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A command-line tool for interacting with the Conquest.eth blockchain game. Execute game commands directly from your terminal to acquire planets, send fleets, resolve battles, and manage your empire.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **MCP Server Mode**: Integrate with AI assistants via the Model Context Protocol
|
|
8
7
|
- **CLI Mode**: Execute game commands directly from your terminal
|
|
9
|
-
- **Dynamic Command Generation**: CLI commands are auto-generated from tool definitions
|
|
10
8
|
- **Comprehensive Game Tools**: Acquire planets, send fleets, resolve fleets, manage exits, and more
|
|
9
|
+
- **Dynamic Command Generation**: CLI commands are auto-generated from tool definitions
|
|
10
|
+
- **MCP Server Mode**: the cli provide an mcp command if you prefers to integrate your agent via Model Context Protocol
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -17,15 +17,13 @@ npm i -g @conquest-eth/tools
|
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
19
19
|
|
|
20
|
-
### CLI Mode (Direct Command Execution)
|
|
21
|
-
|
|
22
20
|
Show help and available commands:
|
|
23
21
|
|
|
24
22
|
```bash
|
|
25
|
-
|
|
23
|
+
conquest --help
|
|
26
24
|
```
|
|
27
25
|
|
|
28
|
-
|
|
26
|
+
### Global Options
|
|
29
27
|
|
|
30
28
|
| Option | Environment Variable | Description | Default |
|
|
31
29
|
| --------------------------- | -------------------- | -------------------------------- | ---------- |
|
|
@@ -34,13 +32,7 @@ ecli --help
|
|
|
34
32
|
| `--storage <type>` | `STORAGE_TYPE` | Storage backend: json or sqlite | json |
|
|
35
33
|
| `--storage-path <path>` | `STORAGE_PATH` | Storage directory path | ./data |
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
| Option | Environment Variable | Description | Default |
|
|
40
|
-
| ------------ | -------------------- | ---------------------------- | ------- |
|
|
41
|
-
| `--ethereum` | `ETHEREUM_TOOLS` | Include tools-ethereum tools | false |
|
|
42
|
-
|
|
43
|
-
#### Using Environment Variables
|
|
35
|
+
### Using Environment Variables
|
|
44
36
|
|
|
45
37
|
Set up your environment:
|
|
46
38
|
|
|
@@ -53,10 +45,10 @@ export PRIVATE_KEY=0x...
|
|
|
53
45
|
Then run commands without repeating options:
|
|
54
46
|
|
|
55
47
|
```bash
|
|
56
|
-
|
|
48
|
+
conquest get_my_planets --radius 10
|
|
57
49
|
```
|
|
58
50
|
|
|
59
|
-
|
|
51
|
+
### Available Commands
|
|
60
52
|
|
|
61
53
|
| Command | Description |
|
|
62
54
|
| -------------------- | --------------------------------------- |
|
|
@@ -70,50 +62,30 @@ ecli get_my_planets --radius 10
|
|
|
70
62
|
| `get_pending_fleets` | Get pending fleets |
|
|
71
63
|
| `verify_exit_status` | Check a planet's exit status |
|
|
72
64
|
|
|
73
|
-
|
|
65
|
+
### Examples
|
|
74
66
|
|
|
75
67
|
```bash
|
|
76
68
|
# Get your planets
|
|
77
|
-
|
|
69
|
+
conquest get_my_planets --radius 10
|
|
78
70
|
|
|
79
71
|
# Find planets near a location
|
|
80
|
-
|
|
72
|
+
conquest get_planets_around --center-x 0 --center-y 0 --radius 20
|
|
81
73
|
|
|
82
74
|
# Acquire planets
|
|
83
|
-
|
|
75
|
+
conquest acquire_planets --planet-ids 1,2,3,4,5
|
|
84
76
|
|
|
85
77
|
# Send a fleet (coordinates use x,y format)
|
|
86
|
-
|
|
78
|
+
conquest send_fleet --from 10,20 --to 15,25 --quantity 100
|
|
87
79
|
|
|
88
80
|
# Resolve a fleet
|
|
89
|
-
|
|
81
|
+
conquest resolve_fleet --fleet-id "your-fleet-id"
|
|
90
82
|
|
|
91
83
|
# Exit planets
|
|
92
|
-
|
|
84
|
+
conquest exit_planets --planet-ids 1,2,3
|
|
93
85
|
```
|
|
94
86
|
|
|
95
87
|
See [`EXAMPLES.md`](./EXAMPLES.md) for more detailed usage examples.
|
|
96
88
|
|
|
97
|
-
### MCP Server Mode
|
|
98
|
-
|
|
99
|
-
Start the MCP server for AI assistant integration:
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
ecli mcp --rpc-url https://rpc.gnosischain.com --game-contract 0x322813fd9a801c5507c9de605d63cea4f2ce6c44
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Or use the MCP Inspector for testing:
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
pnpm mcp:inspector ecli --game-contract 0xD833d4dBBb0C19aF1EEf76540d66E2076a5e9D72 --rpc-url https://rpc.gnosis.gateway.fm
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
For Conquest 2025-1 edition, use:
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
pnpm mcp:inspector ecli --game-contract 0xD833d4dBBb0C19aF1EEf76540d66E2076a5e9D72 --rpc-url https://rpc.gnosis.gateway.fm
|
|
115
|
-
```
|
|
116
|
-
|
|
117
89
|
## Architecture
|
|
118
90
|
|
|
119
91
|
The CLI follows a dual-mode architecture:
|
|
@@ -213,6 +185,28 @@ pnpm format
|
|
|
213
185
|
pnpm start
|
|
214
186
|
```
|
|
215
187
|
|
|
188
|
+
## MCP Server Mode (Alternative)
|
|
189
|
+
|
|
190
|
+
As an alternative to direct CLI usage, `conquest` can also run as an MCP (Model Context Protocol) server for.
|
|
191
|
+
|
|
192
|
+
Start the MCP server:
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
conquest --rpc-url https://rpc.gnosischain.com --game-contract 0x322813fd9a801c5507c9de605d63cea4f2ce6c44 mcp
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
MCP-specific options:
|
|
199
|
+
|
|
200
|
+
| Option | Environment Variable | Description | Default |
|
|
201
|
+
| ------------ | -------------------- | ---------------------------- | ------- |
|
|
202
|
+
| `--ethereum` | `ETHEREUM_TOOLS` | Include tools-ethereum tools | false |
|
|
203
|
+
|
|
204
|
+
For testing with the MCP Inspector:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
pnpm mcp:inspector conquest --game-contract 0xD833d4dBBb0C19aF1EEf76540d66E2076a5e9D72 --rpc-url https://rpc.gnosis.gateway.fm mcp
|
|
208
|
+
```
|
|
209
|
+
|
|
216
210
|
## License
|
|
217
211
|
|
|
218
212
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conquest-eth/tools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Tools for Conquest.eth, including mcp server",
|
|
5
5
|
"author": "Ronan Sandford",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
],
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "git+https://github.com/wighawag/
|
|
16
|
+
"url": "git+https://github.com/wighawag/conquest-eth-for-lobsters",
|
|
17
|
+
"directory": "lobsters/tools"
|
|
17
18
|
},
|
|
18
|
-
"homepage": "https://github.com/wighawag/
|
|
19
|
+
"homepage": "https://github.com/wighawag/conquest-eth-for-lobsters/blob/main/lobsters/tools/README.md",
|
|
19
20
|
"bugs": {
|
|
20
|
-
"url": "https://github.com/wighawag/
|
|
21
|
+
"url": "https://github.com/wighawag/conquest-eth-for-lobsters/issues"
|
|
21
22
|
},
|
|
22
23
|
"publishConfig": {
|
|
23
24
|
"access": "public"
|