@5ive-tech/cli 1.0.5 → 1.0.7
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 +62 -84
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 5IVE CLI
|
|
2
2
|
|
|
3
3
|
CLI for building, testing, deploying, and executing 5ive DSL programs.
|
|
4
4
|
|
|
5
|
-
This README is for external users working with:
|
|
6
|
-
- `five-cli`
|
|
7
|
-
- `five-sdk`
|
|
8
|
-
- [5ive frontend](https://5ive.tech)
|
|
9
|
-
|
|
10
5
|
## Install
|
|
11
6
|
|
|
12
7
|
```bash
|
|
13
8
|
npm install -g @5ive-tech/cli
|
|
14
|
-
|
|
9
|
+
5ive --version
|
|
15
10
|
```
|
|
16
11
|
|
|
17
12
|
Or run without global install:
|
|
@@ -25,14 +20,14 @@ npx @5ive-tech/cli --help
|
|
|
25
20
|
### 1) Initialize a project
|
|
26
21
|
|
|
27
22
|
```bash
|
|
28
|
-
|
|
23
|
+
5ive init my-program
|
|
29
24
|
cd my-program
|
|
30
25
|
```
|
|
31
26
|
|
|
32
27
|
### 2) Compile to a `.five` artifact (recommended)
|
|
33
28
|
|
|
34
29
|
```bash
|
|
35
|
-
|
|
30
|
+
5ive compile src/main.v -o build/main.five
|
|
36
31
|
```
|
|
37
32
|
|
|
38
33
|
The `.five` artifact contains bytecode and ABI and is the best default for deployment and SDK integration.
|
|
@@ -40,29 +35,29 @@ The `.five` artifact contains bytecode and ABI and is the best default for deplo
|
|
|
40
35
|
### 3) Run locally
|
|
41
36
|
|
|
42
37
|
```bash
|
|
43
|
-
|
|
38
|
+
5ive execute build/main.five --local -f 0
|
|
44
39
|
```
|
|
45
40
|
|
|
46
41
|
### 4) Configure on-chain target
|
|
47
42
|
|
|
48
43
|
```bash
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
5ive config init
|
|
45
|
+
5ive config set --target devnet
|
|
46
|
+
5ive config set --keypair ~/.config/solana/id.json
|
|
47
|
+
5ive config set --program-id <FIVE_VM_PROGRAM_ID> --target devnet
|
|
53
48
|
```
|
|
54
49
|
|
|
55
50
|
### 5) Deploy and execute on-chain
|
|
56
51
|
|
|
57
52
|
```bash
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
5ive deploy build/main.five --target devnet
|
|
54
|
+
5ive execute build/main.five --target devnet -f 0
|
|
60
55
|
```
|
|
61
56
|
|
|
62
57
|
If you already have a deployed script account:
|
|
63
58
|
|
|
64
59
|
```bash
|
|
65
|
-
|
|
60
|
+
5ive execute --script-account <SCRIPT_ACCOUNT_PUBKEY> --target devnet -f 0
|
|
66
61
|
```
|
|
67
62
|
|
|
68
63
|
## Program ID Resolution
|
|
@@ -71,156 +66,139 @@ For on-chain commands (`deploy`, `execute`, `deploy-and-execute`, `namespace`),
|
|
|
71
66
|
|
|
72
67
|
1. `--program-id` flag
|
|
73
68
|
2. `five.toml` `[deploy].program_id`
|
|
74
|
-
3. `
|
|
69
|
+
3. `5ive config` stored value for current target
|
|
75
70
|
4. `FIVE_PROGRAM_ID` environment variable
|
|
76
71
|
|
|
77
72
|
If none are set, on-chain commands fail fast with a program ID setup error.
|
|
78
73
|
|
|
79
|
-
See: [PROGRAM_ID_SETUP.md](./PROGRAM_ID_SETUP.md)
|
|
80
|
-
|
|
81
74
|
## Standard Workflows
|
|
82
75
|
|
|
83
76
|
### Project build flow
|
|
84
77
|
|
|
85
78
|
```bash
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
79
|
+
5ive build
|
|
80
|
+
5ive deploy build/main.five --project .
|
|
81
|
+
5ive execute build/main.five --project . -f 0
|
|
89
82
|
```
|
|
90
83
|
|
|
91
|
-
`
|
|
84
|
+
`5ive build` / `--project` use `five.toml` and the generated manifest to resolve artifacts.
|
|
92
85
|
|
|
93
|
-
### One-command deploy+execute (
|
|
86
|
+
### One-command deploy+execute (smoke tests)
|
|
94
87
|
|
|
95
88
|
```bash
|
|
96
|
-
|
|
89
|
+
5ive deploy-and-execute build/main.five --target devnet -f 0
|
|
97
90
|
```
|
|
98
91
|
|
|
99
92
|
### Run tests
|
|
100
93
|
|
|
101
94
|
```bash
|
|
102
|
-
|
|
103
|
-
|
|
95
|
+
5ive test --sdk-runner
|
|
96
|
+
5ive test tests/ --on-chain --target devnet
|
|
104
97
|
```
|
|
105
98
|
|
|
106
99
|
### Namespace operations
|
|
107
100
|
|
|
108
101
|
```bash
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
102
|
+
5ive namespace register @your-domain
|
|
103
|
+
5ive namespace bind @your-domain/program --script <SCRIPT_ACCOUNT_PUBKEY>
|
|
104
|
+
5ive namespace resolve @your-domain/program
|
|
112
105
|
```
|
|
113
106
|
|
|
114
|
-
## Advanced
|
|
107
|
+
## Advanced Workflows (Optional)
|
|
115
108
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
### 1) Compile diagnostics and machine-readable metrics
|
|
109
|
+
### Compile diagnostics and machine-readable metrics
|
|
119
110
|
|
|
120
111
|
```bash
|
|
121
|
-
|
|
112
|
+
5ive compile src/main.v \
|
|
122
113
|
--analyze \
|
|
123
114
|
--metrics-output build/compile-metrics.json \
|
|
124
115
|
--metrics-format json \
|
|
125
116
|
--error-format json
|
|
126
117
|
```
|
|
127
118
|
|
|
128
|
-
###
|
|
119
|
+
### Project-aware execution from `five.toml` context
|
|
129
120
|
|
|
130
121
|
```bash
|
|
131
|
-
|
|
132
|
-
|
|
122
|
+
5ive execute --project . -f 0
|
|
123
|
+
5ive execute --project . -f 0 --params params.json --target devnet
|
|
133
124
|
```
|
|
134
125
|
|
|
135
|
-
###
|
|
126
|
+
### Deploy large artifacts with chunk/optimization controls
|
|
136
127
|
|
|
137
128
|
```bash
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
129
|
+
5ive deploy build/main.five --target devnet --optimized --progress
|
|
130
|
+
5ive deploy build/main.five --target devnet --force-chunked --chunk-size 900
|
|
131
|
+
5ive deploy build/main.five --target devnet --dry-run --format json
|
|
141
132
|
```
|
|
142
133
|
|
|
143
|
-
###
|
|
134
|
+
### Deploy-and-execute for fast integration checks
|
|
144
135
|
|
|
145
136
|
```bash
|
|
146
|
-
|
|
147
|
-
|
|
137
|
+
5ive deploy-and-execute build/main.five --target devnet -f 0 -p "[100]"
|
|
138
|
+
5ive deploy-and-execute src/main.v --target local --debug --cleanup
|
|
148
139
|
```
|
|
149
140
|
|
|
150
|
-
###
|
|
141
|
+
### Advanced test modes
|
|
151
142
|
|
|
152
143
|
```bash
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
144
|
+
5ive test --sdk-runner --format json
|
|
145
|
+
5ive test test-scripts/ --on-chain --target devnet --batch --analyze-costs
|
|
146
|
+
5ive test --watch --parallel 4
|
|
156
147
|
```
|
|
157
148
|
|
|
158
|
-
###
|
|
149
|
+
### Namespace manager and lockfile modes
|
|
159
150
|
|
|
160
151
|
```bash
|
|
161
152
|
# On-chain manager flow
|
|
162
|
-
|
|
163
|
-
|
|
153
|
+
5ive namespace register @acme --manager <MANAGER_SCRIPT_ACCOUNT>
|
|
154
|
+
5ive namespace bind @acme/payments --script <SCRIPT_ACCOUNT_PUBKEY> --manager <MANAGER_SCRIPT_ACCOUNT>
|
|
164
155
|
|
|
165
156
|
# Local lockfile-only flow (no manager RPC)
|
|
166
|
-
|
|
157
|
+
5ive namespace resolve @acme/payments --local
|
|
167
158
|
```
|
|
168
159
|
|
|
169
|
-
###
|
|
160
|
+
### Config layering and explicit RPC overrides
|
|
170
161
|
|
|
171
162
|
```bash
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
163
|
+
5ive config set --rpc-url https://api.devnet.solana.com --target devnet
|
|
164
|
+
5ive config set --show-config true
|
|
165
|
+
5ive deploy build/main.five --target devnet --network https://your-rpc.example.com
|
|
175
166
|
```
|
|
176
167
|
|
|
177
168
|
## Artifact and SDK Interop
|
|
178
169
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
- Compile with CLI to `.five`
|
|
182
|
-
- Load and interact in SDK via ABI-aware helpers
|
|
183
|
-
- Use the same artifact in frontend flows on [5ive.tech](https://5ive.tech)
|
|
184
|
-
|
|
185
|
-
You can still use `.bin` where needed, but `.five` is the preferred default.
|
|
170
|
+
`@5ive-tech/cli` and `@5ive-tech/sdk` work best with `.five` artifacts.
|
|
186
171
|
|
|
187
172
|
## Common Commands
|
|
188
173
|
|
|
189
174
|
```bash
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
175
|
+
5ive help <command>
|
|
176
|
+
5ive help compile
|
|
177
|
+
5ive help deploy
|
|
178
|
+
5ive help execute
|
|
179
|
+
5ive help config
|
|
195
180
|
```
|
|
196
181
|
|
|
197
182
|
## Troubleshooting
|
|
198
183
|
|
|
199
184
|
### `Program ID required` or `owner/program mismatch`
|
|
200
185
|
|
|
201
|
-
Set or override the VM program ID:
|
|
202
|
-
|
|
203
186
|
```bash
|
|
204
|
-
|
|
187
|
+
5ive config set --program-id <FIVE_VM_PROGRAM_ID> --target devnet
|
|
205
188
|
# or
|
|
206
|
-
|
|
189
|
+
5ive deploy build/main.five --program-id <FIVE_VM_PROGRAM_ID> --target devnet
|
|
207
190
|
```
|
|
208
191
|
|
|
209
192
|
### `Keypair file not found`
|
|
210
193
|
|
|
211
194
|
```bash
|
|
212
|
-
|
|
195
|
+
5ive config set --keypair ~/.config/solana/id.json
|
|
213
196
|
```
|
|
214
197
|
|
|
215
|
-
### Command-specific help
|
|
198
|
+
### Command-specific help
|
|
216
199
|
|
|
217
200
|
```bash
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
201
|
+
5ive compile --help
|
|
202
|
+
5ive execute --help
|
|
203
|
+
5ive config --help
|
|
221
204
|
```
|
|
222
|
-
|
|
223
|
-
## Links
|
|
224
|
-
|
|
225
|
-
- Program ID setup: [PROGRAM_ID_SETUP.md](./PROGRAM_ID_SETUP.md)
|
|
226
|
-
- 5ive frontend: [5ive.tech](https://5ive.tech)
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@5ive-tech/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "High-performance CLI for Five VM development with WebAssembly integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"
|
|
9
|
-
"five
|
|
8
|
+
"5ive": "dist/index.js",
|
|
9
|
+
"five": "dist/index.js"
|
|
10
10
|
},
|
|
11
11
|
"engines": {
|
|
12
12
|
"node": ">=18.0.0"
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"ora": "^8.0.1",
|
|
80
80
|
"semver": "^7.6.0",
|
|
81
81
|
"ws": "^8.16.0",
|
|
82
|
-
"@5ive-tech/sdk": "^1.1.
|
|
82
|
+
"@5ive-tech/sdk": "^1.1.4"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@types/fs-extra": "^11.0.4",
|