@aomi-labs/client 0.1.1 → 0.1.2
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 +53 -26
- package/dist/cli.js +1186 -427
- package/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -8
- package/skills/aomi-transact/SKILL.md +1 -8
package/README.md
CHANGED
|
@@ -115,16 +115,21 @@ unsub(); // stop listening
|
|
|
115
115
|
## CLI
|
|
116
116
|
|
|
117
117
|
The package includes an `aomi` CLI for scripting and Claude Code skills.
|
|
118
|
+
When installed globally or in a project, the executable name is `aomi`.
|
|
119
|
+
For one-off usage, run commands via `npx @aomi-labs/client ...`.
|
|
118
120
|
|
|
119
121
|
```bash
|
|
120
|
-
npx aomi chat "swap 1 ETH for USDC" # talk to the agent
|
|
121
|
-
npx aomi chat "swap 1 ETH" --
|
|
122
|
-
npx aomi
|
|
123
|
-
npx aomi
|
|
124
|
-
npx aomi
|
|
125
|
-
npx aomi
|
|
126
|
-
npx aomi
|
|
127
|
-
npx aomi
|
|
122
|
+
npx @aomi-labs/client chat "swap 1 ETH for USDC" # talk to the agent
|
|
123
|
+
npx @aomi-labs/client chat "swap 1 ETH for USDC" --model claude-sonnet-4
|
|
124
|
+
npx @aomi-labs/client chat "swap 1 ETH" --verbose # stream tool calls + responses live
|
|
125
|
+
npx @aomi-labs/client models # list available models
|
|
126
|
+
npx @aomi-labs/client model set claude-sonnet-4 # switch the current session model
|
|
127
|
+
npx @aomi-labs/client log # show full conversation history
|
|
128
|
+
npx @aomi-labs/client tx # list pending + signed txs
|
|
129
|
+
npx @aomi-labs/client sign tx-1 # sign a specific pending tx
|
|
130
|
+
npx @aomi-labs/client status # session info
|
|
131
|
+
npx @aomi-labs/client events # system events
|
|
132
|
+
npx @aomi-labs/client close # clear session
|
|
128
133
|
```
|
|
129
134
|
|
|
130
135
|
### Wallet connection
|
|
@@ -133,30 +138,49 @@ Pass `--public-key` so the agent knows your wallet address. This lets it build
|
|
|
133
138
|
transactions and check your balances:
|
|
134
139
|
|
|
135
140
|
```bash
|
|
136
|
-
npx aomi chat "send 0 ETH to myself" \
|
|
141
|
+
npx @aomi-labs/client chat "send 0 ETH to myself" \
|
|
137
142
|
--public-key 0x5D907BEa404e6F821d467314a9cA07663CF64c9B
|
|
138
143
|
```
|
|
139
144
|
|
|
140
145
|
The address is persisted in the state file, so subsequent commands in the same
|
|
141
146
|
session don't need it again.
|
|
142
147
|
|
|
148
|
+
### Model selection
|
|
149
|
+
|
|
150
|
+
The CLI can discover and switch backend models for the active session:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
$ npx @aomi-labs/client models
|
|
154
|
+
claude-sonnet-4
|
|
155
|
+
gpt-5
|
|
156
|
+
|
|
157
|
+
$ npx @aomi-labs/client model set gpt-5
|
|
158
|
+
Model set to gpt-5
|
|
159
|
+
|
|
160
|
+
$ npx @aomi-labs/client chat "hello" --model claude-sonnet-4
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
`aomi model set` persists the selected model in the local session state after a
|
|
164
|
+
successful backend update. `aomi chat --model ...` applies the requested model
|
|
165
|
+
before sending the message and updates that persisted state as well.
|
|
166
|
+
|
|
143
167
|
### Transaction flow
|
|
144
168
|
|
|
145
169
|
The backend builds transactions; the CLI persists and signs them:
|
|
146
170
|
|
|
147
171
|
```
|
|
148
|
-
$ npx aomi chat "swap 1 ETH for USDC on Uniswap" --public-key 0xYourAddr
|
|
172
|
+
$ npx @aomi-labs/client chat "swap 1 ETH for USDC on Uniswap" --public-key 0xYourAddr
|
|
149
173
|
⚡ Wallet request queued: tx-1
|
|
150
174
|
to: 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD
|
|
151
175
|
value: 1000000000000000000
|
|
152
176
|
chain: 1
|
|
153
177
|
Run `aomi tx` to see pending transactions, `aomi sign <id>` to sign.
|
|
154
178
|
|
|
155
|
-
$ npx aomi tx
|
|
179
|
+
$ npx @aomi-labs/client tx
|
|
156
180
|
Pending (1):
|
|
157
181
|
⏳ tx-1 to: 0x3fC9...7FAD value: 1000000000000000000 chain: 1
|
|
158
182
|
|
|
159
|
-
$ npx aomi sign tx-1 --private-key 0xac0974...
|
|
183
|
+
$ npx @aomi-labs/client sign tx-1 --private-key 0xac0974...
|
|
160
184
|
Signer: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
|
|
161
185
|
ID: tx-1
|
|
162
186
|
Kind: transaction
|
|
@@ -165,7 +189,7 @@ Value: 1000000000000000000
|
|
|
165
189
|
✅ Sent! Hash: 0xabc123...
|
|
166
190
|
Backend notified.
|
|
167
191
|
|
|
168
|
-
$ npx aomi tx
|
|
192
|
+
$ npx @aomi-labs/client tx
|
|
169
193
|
Signed (1):
|
|
170
194
|
✅ tx-1 hash: 0xabc123... to: 0x3fC9...7FAD value: 1000000000000000000
|
|
171
195
|
```
|
|
@@ -176,11 +200,11 @@ pending tx with `kind: eip712_sign`. `aomi sign` handles both kinds
|
|
|
176
200
|
automatically:
|
|
177
201
|
|
|
178
202
|
```
|
|
179
|
-
$ npx aomi tx
|
|
203
|
+
$ npx @aomi-labs/client tx
|
|
180
204
|
Pending (1):
|
|
181
205
|
⏳ tx-2 eip712 Sign CoW swap order (2:15:30 PM)
|
|
182
206
|
|
|
183
|
-
$ npx aomi sign tx-2 --private-key 0xac0974...
|
|
207
|
+
$ npx @aomi-labs/client sign tx-2 --private-key 0xac0974...
|
|
184
208
|
Signer: 0xf39Fd...92266
|
|
185
209
|
ID: tx-2
|
|
186
210
|
Kind: eip712_sign
|
|
@@ -198,7 +222,7 @@ alongside the session pointer, so they survive between CLI invocations.
|
|
|
198
222
|
Use `--verbose` (or `-v`) to see tool calls and agent responses in real-time:
|
|
199
223
|
|
|
200
224
|
```
|
|
201
|
-
$ npx aomi chat "what's the price of ETH?" --verbose
|
|
225
|
+
$ npx @aomi-labs/client chat "what's the price of ETH?" --verbose
|
|
202
226
|
⏳ Processing…
|
|
203
227
|
🔧 [tool] get_token_price: running
|
|
204
228
|
✔ [tool] get_token_price → {"price": 2045.67, "symbol": "ETH"}
|
|
@@ -211,7 +235,7 @@ Without `--verbose`, only the final agent message is printed.
|
|
|
211
235
|
Use `aomi log` to replay the full conversation with all messages and tool results:
|
|
212
236
|
|
|
213
237
|
```
|
|
214
|
-
$ npx aomi log
|
|
238
|
+
$ npx @aomi-labs/client log
|
|
215
239
|
10:30:15 AM 👤 You: what's the price of ETH?
|
|
216
240
|
10:30:16 AM 🤖 Agent: Let me check the current on-chain context for you.
|
|
217
241
|
10:30:16 AM 🔧 [Current ETH price] {"price": 2045.67, "symbol": "ETH"}
|
|
@@ -229,6 +253,7 @@ All config can be passed as flags (which take priority over env vars):
|
|
|
229
253
|
| `--backend-url` | `AOMI_BASE_URL` | `https://api.aomi.dev` | Backend URL |
|
|
230
254
|
| `--api-key` | `AOMI_API_KEY` | — | API key for non-default namespaces |
|
|
231
255
|
| `--namespace` | `AOMI_NAMESPACE` | `default` | Namespace |
|
|
256
|
+
| `--model` | `AOMI_MODEL` | — | Model rig to apply before chat |
|
|
232
257
|
| `--public-key` | `AOMI_PUBLIC_KEY` | — | Wallet address (tells agent your wallet) |
|
|
233
258
|
| `--private-key` | `PRIVATE_KEY` | — | Hex private key for `aomi sign` |
|
|
234
259
|
| `--rpc-url` | `CHAIN_RPC_URL` | — | RPC URL for transaction submission |
|
|
@@ -236,14 +261,15 @@ All config can be passed as flags (which take priority over env vars):
|
|
|
236
261
|
|
|
237
262
|
```bash
|
|
238
263
|
# Use a custom backend
|
|
239
|
-
npx aomi chat "hello" --backend-url https://my-backend.example.com
|
|
264
|
+
npx @aomi-labs/client chat "hello" --backend-url https://my-backend.example.com
|
|
240
265
|
|
|
241
266
|
# Full signing flow with all flags
|
|
242
|
-
npx aomi chat "send 0.1 ETH to vitalik.eth" \
|
|
267
|
+
npx @aomi-labs/client chat "send 0.1 ETH to vitalik.eth" \
|
|
243
268
|
--public-key 0xYourAddress \
|
|
244
269
|
--api-key sk-abc123 \
|
|
245
|
-
--namespace my-agent
|
|
246
|
-
|
|
270
|
+
--namespace my-agent \
|
|
271
|
+
--model claude-sonnet-4
|
|
272
|
+
npx @aomi-labs/client sign tx-1 \
|
|
247
273
|
--private-key 0xYourPrivateKey \
|
|
248
274
|
--rpc-url https://eth.llamarpc.com
|
|
249
275
|
```
|
|
@@ -257,16 +283,17 @@ persists a small JSON file to `$TMPDIR/aomi-session.json`:
|
|
|
257
283
|
| Field | Purpose |
|
|
258
284
|
|-------|---------|
|
|
259
285
|
| `sessionId` | Which conversation to continue |
|
|
286
|
+
| `model` | Last successfully applied model for the session |
|
|
260
287
|
| `publicKey` | Wallet address (from `--public-key`) |
|
|
261
288
|
| `pendingTxs` | Unsigned transactions waiting for `aomi sign <id>` |
|
|
262
289
|
| `signedTxs` | Completed transactions with hashes/signatures |
|
|
263
290
|
|
|
264
291
|
```
|
|
265
|
-
$ npx aomi chat "hello" # creates session, saves sessionId
|
|
266
|
-
$ npx aomi chat "swap 1 ETH" # reuses session, queues tx-1 if wallet request arrives
|
|
267
|
-
$ npx aomi sign tx-1 # signs tx-1, moves to signedTxs, notifies backend
|
|
268
|
-
$ npx aomi tx # shows all txs
|
|
269
|
-
$ npx aomi close # wipes state file
|
|
292
|
+
$ npx @aomi-labs/client chat "hello" # creates session, saves sessionId
|
|
293
|
+
$ npx @aomi-labs/client chat "swap 1 ETH" # reuses session, queues tx-1 if wallet request arrives
|
|
294
|
+
$ npx @aomi-labs/client sign tx-1 # signs tx-1, moves to signedTxs, notifies backend
|
|
295
|
+
$ npx @aomi-labs/client tx # shows all txs
|
|
296
|
+
$ npx @aomi-labs/client close # wipes state file
|
|
270
297
|
```
|
|
271
298
|
|
|
272
299
|
The state file lives in your OS temp directory and gets cleaned up on reboot.
|