@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.
Files changed (2) hide show
  1. package/README.md +62 -84
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,17 +1,12 @@
1
- # Five CLI
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
- five --version
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
- five init my-program
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
- five compile src/main.v -o build/main.five
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
- five execute build/main.five --local -f 0
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
- five config init
50
- five config set --target devnet
51
- five config set --keypair ~/.config/solana/id.json
52
- five config set --program-id <FIVE_VM_PROGRAM_ID> --target devnet
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
- five deploy build/main.five --target devnet
59
- five execute build/main.five --target devnet -f 0
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
- five execute --script-account <SCRIPT_ACCOUNT_PUBKEY> --target devnet -f 0
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. `five config` stored value for current target
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
- five build
87
- five deploy build/main.five --project .
88
- five execute build/main.five --project . -f 0
79
+ 5ive build
80
+ 5ive deploy build/main.five --project .
81
+ 5ive execute build/main.five --project . -f 0
89
82
  ```
90
83
 
91
- `five build` / `--project` use `five.toml` and the generated manifest to resolve artifacts.
84
+ `5ive build` / `--project` use `five.toml` and the generated manifest to resolve artifacts.
92
85
 
93
- ### One-command deploy+execute (great for smoke tests)
86
+ ### One-command deploy+execute (smoke tests)
94
87
 
95
88
  ```bash
96
- five deploy-and-execute build/main.five --target devnet -f 0
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
- five test --sdk-runner
103
- five test tests/ --on-chain --target devnet
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
- five namespace register @your-domain
110
- five namespace bind @your-domain/program --script <SCRIPT_ACCOUNT_PUBKEY>
111
- five namespace resolve @your-domain/program
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 CLI Workflows (Optional)
107
+ ## Advanced Workflows (Optional)
115
108
 
116
- Most teams can stay on the quick-start path. Use these features when you need deeper control.
117
-
118
- ### 1) Compile diagnostics and machine-readable metrics
109
+ ### Compile diagnostics and machine-readable metrics
119
110
 
120
111
  ```bash
121
- five compile src/main.v \
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
- ### 2) Project-aware execution from `five.toml` context
119
+ ### Project-aware execution from `five.toml` context
129
120
 
130
121
  ```bash
131
- five execute --project . -f 0
132
- five execute --project . -f 0 --params params.json --target devnet
122
+ 5ive execute --project . -f 0
123
+ 5ive execute --project . -f 0 --params params.json --target devnet
133
124
  ```
134
125
 
135
- ### 3) Deploy large artifacts with chunk/optimization controls
126
+ ### Deploy large artifacts with chunk/optimization controls
136
127
 
137
128
  ```bash
138
- five deploy build/main.five --target devnet --optimized --progress
139
- five deploy build/main.five --target devnet --force-chunked --chunk-size 900
140
- five deploy build/main.five --target devnet --dry-run --format json
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
- ### 4) Deploy-and-execute for fast integration checks
134
+ ### Deploy-and-execute for fast integration checks
144
135
 
145
136
  ```bash
146
- five deploy-and-execute build/main.five --target devnet -f 0 -p "[100]"
147
- five deploy-and-execute src/main.v --target local --debug --cleanup
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
- ### 5) Advanced test modes
141
+ ### Advanced test modes
151
142
 
152
143
  ```bash
153
- five test --sdk-runner --format json
154
- five test test-scripts/ --on-chain --target devnet --batch --analyze-costs
155
- five test --watch --parallel 4
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
- ### 6) Namespace manager and lockfile modes
149
+ ### Namespace manager and lockfile modes
159
150
 
160
151
  ```bash
161
152
  # On-chain manager flow
162
- five namespace register @acme --manager <MANAGER_SCRIPT_ACCOUNT>
163
- five namespace bind @acme/payments --script <SCRIPT_ACCOUNT_PUBKEY> --manager <MANAGER_SCRIPT_ACCOUNT>
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
- five namespace resolve @acme/payments --local
157
+ 5ive namespace resolve @acme/payments --local
167
158
  ```
168
159
 
169
- ### 7) Config layering and explicit RPC overrides
160
+ ### Config layering and explicit RPC overrides
170
161
 
171
162
  ```bash
172
- five config set --rpc-url https://api.devnet.solana.com --target devnet
173
- five config set --show-config true
174
- five deploy build/main.five --target devnet --network https://your-rpc.example.com
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
- `five-cli` and `five-sdk` work best with `.five` artifacts:
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
- five help <command>
191
- five help compile
192
- five help deploy
193
- five help execute
194
- five help config
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
- five config set --program-id <FIVE_VM_PROGRAM_ID> --target devnet
187
+ 5ive config set --program-id <FIVE_VM_PROGRAM_ID> --target devnet
205
188
  # or
206
- five deploy build/main.five --program-id <FIVE_VM_PROGRAM_ID> --target devnet
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
- five config set --keypair ~/.config/solana/id.json
195
+ 5ive config set --keypair ~/.config/solana/id.json
213
196
  ```
214
197
 
215
- ### Command-specific help from global help flow
198
+ ### Command-specific help
216
199
 
217
200
  ```bash
218
- five compile --help
219
- five execute --help
220
- five config --help
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.5",
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
- "five": "dist/index.js",
9
- "five-cli": "dist/index.js"
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.2"
82
+ "@5ive-tech/sdk": "^1.1.4"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@types/fs-extra": "^11.0.4",