@aomi-labs/client 0.1.23 → 0.1.24

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/dist/cli.js CHANGED
@@ -1838,7 +1838,7 @@ Available: ${available}`);
1838
1838
  requirePendingTxs(txIds) {
1839
1839
  const uniqueIds = Array.from(new Set(txIds));
1840
1840
  if (uniqueIds.length !== txIds.length) {
1841
- fatal("Duplicate transaction IDs are not allowed in a single `aomi sign` call.");
1841
+ fatal("Duplicate transaction IDs are not allowed in a single `aomi tx sign` call.");
1842
1842
  }
1843
1843
  return uniqueIds.map((txId) => this.requirePendingTx(txId));
1844
1844
  }
@@ -2274,7 +2274,7 @@ async function chatCommand(config, message, verbose) {
2274
2274
  }
2275
2275
  if (capturedRequests.length > 0) {
2276
2276
  console.log(
2277
- "\nRun `aomi tx` to see pending transactions, `aomi sign <id>` to sign."
2277
+ "\nRun `aomi tx list` to see pending transactions, `aomi tx sign <id>` to sign."
2278
2278
  );
2279
2279
  }
2280
2280
  } finally {
@@ -3504,17 +3504,17 @@ async function signCommand(config, txIds) {
3504
3504
  var _a3, _b, _c, _d;
3505
3505
  if (txIds.length === 0) {
3506
3506
  fatal(
3507
- "Usage: aomi sign <tx-id> [<tx-id> ...]\nRun `aomi tx` to see pending transaction IDs."
3507
+ "Usage: aomi tx sign <tx-id> [<tx-id> ...]\nRun `aomi tx list` to see pending transaction IDs."
3508
3508
  );
3509
3509
  }
3510
3510
  const privateKey = config.privateKey;
3511
3511
  if (!privateKey) {
3512
3512
  fatal(
3513
3513
  [
3514
- "Private key required for `aomi sign`.",
3514
+ "Private key required for `aomi tx sign`.",
3515
3515
  "Pass one of:",
3516
3516
  " --private-key <hex-key>",
3517
- " PRIVATE_KEY=<hex-key> aomi sign <tx-id>"
3517
+ " PRIVATE_KEY=<hex-key> aomi tx sign <tx-id>"
3518
3518
  ].join("\n")
3519
3519
  );
3520
3520
  }
@@ -3771,7 +3771,7 @@ async function simulateCommand(txIds) {
3771
3771
  fatal("No active session. Run `aomi chat` first.");
3772
3772
  }
3773
3773
  if (txIds.length === 0) {
3774
- fatal("Usage: aomi simulate <tx-id> [<tx-id> ...]\nRun `aomi tx` to see available IDs.");
3774
+ fatal("Usage: aomi tx simulate <tx-id> [<tx-id> ...]\nRun `aomi tx list` to see available IDs.");
3775
3775
  }
3776
3776
  const pendingTxs = txIds.map((txId) => cli.requirePendingTx(txId));
3777
3777
  console.log(
@@ -3827,12 +3827,12 @@ ${DIM}Total gas: ${result.total_gas.toLocaleString()}${RESET}`);
3827
3827
  console.log();
3828
3828
  if (result.batch_success) {
3829
3829
  console.log(
3830
- `${GREEN}All steps passed.${RESET} Run \`aomi sign ${txIds.join(" ")}\` to execute.`
3830
+ `${GREEN}All steps passed.${RESET} Run \`aomi tx sign ${txIds.join(" ")}\` to execute.`
3831
3831
  );
3832
3832
  } else {
3833
3833
  const failed = result.steps.find((s) => !s.success);
3834
3834
  console.log(
3835
- `\x1B[31mBatch failed at step ${(_c = failed == null ? void 0 : failed.step) != null ? _c : "?"}.${RESET} Fix the issue and re-queue, or run \`aomi sign\` on the successful prefix.`
3835
+ `\x1B[31mBatch failed at step ${(_c = failed == null ? void 0 : failed.step) != null ? _c : "?"}.${RESET} Fix the issue and re-queue, or run \`aomi tx sign\` on the successful prefix.`
3836
3836
  );
3837
3837
  }
3838
3838
  }
@@ -4890,7 +4890,7 @@ var secretDef = defineCommand7({
4890
4890
  // package.json
4891
4891
  var package_default = {
4892
4892
  name: "@aomi-labs/client",
4893
- version: "0.1.23",
4893
+ version: "0.1.24",
4894
4894
  description: "Platform-agnostic TypeScript client for the Aomi backend API",
4895
4895
  type: "module",
4896
4896
  main: "./dist/index.cjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aomi-labs/client",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "Platform-agnostic TypeScript client for the Aomi backend API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -0,0 +1,124 @@
1
+ [
2
+ {
3
+ "command": "chat",
4
+ "description": "Send a message to the agent and print the response",
5
+ "args": [{ "name": "message", "required": true, "description": "The message text" }],
6
+ "options": [
7
+ { "name": "--model", "takesValue": true, "description": "Set the session model before sending the message" },
8
+ { "name": "--verbose", "takesValue": false, "description": "Stream agent responses, tool calls, and events live" },
9
+ { "name": "--new-session", "takesValue": false, "description": "Create a fresh active session for this command" },
10
+ { "name": "--app", "takesValue": true, "description": "App name (default: 'default')" },
11
+ { "name": "--chain", "takesValue": true, "description": "Active chain id for chat/session context" },
12
+ { "name": "--public-key", "takesValue": true, "description": "Wallet address so the agent knows your wallet" }
13
+ ]
14
+ },
15
+ {
16
+ "command": "app list",
17
+ "description": "List available apps",
18
+ "options": []
19
+ },
20
+ {
21
+ "command": "app current",
22
+ "description": "Show the current app",
23
+ "options": []
24
+ },
25
+ {
26
+ "command": "model list",
27
+ "description": "List models available to the current backend",
28
+ "options": []
29
+ },
30
+ {
31
+ "command": "model set",
32
+ "description": "Set the active model for the current session",
33
+ "args": [{ "name": "rig", "required": true, "description": "Model identifier" }],
34
+ "options": []
35
+ },
36
+ {
37
+ "command": "chain list",
38
+ "description": "List supported chains",
39
+ "options": []
40
+ },
41
+ {
42
+ "command": "session list",
43
+ "description": "List local sessions with metadata",
44
+ "options": []
45
+ },
46
+ {
47
+ "command": "session new",
48
+ "description": "Start a fresh local/backend session and make it active",
49
+ "options": []
50
+ },
51
+ {
52
+ "command": "session resume",
53
+ "description": "Resume a local session",
54
+ "args": [{ "name": "id", "required": true, "description": "session-id or session-N" }],
55
+ "options": []
56
+ },
57
+ {
58
+ "command": "session delete",
59
+ "description": "Delete a local session file",
60
+ "args": [{ "name": "id", "required": true, "description": "session-id or session-N" }],
61
+ "options": []
62
+ },
63
+ {
64
+ "command": "log",
65
+ "description": "Show full conversation history with tool results",
66
+ "options": []
67
+ },
68
+ {
69
+ "command": "tx",
70
+ "description": "List pending and signed transactions",
71
+ "options": []
72
+ },
73
+ {
74
+ "command": "simulate",
75
+ "description": "Batch-simulate pending transactions atomically (e.g. approve then swap)",
76
+ "args": [{ "name": "tx-id", "required": true, "variadic": true, "description": "One or more pending tx ids" }],
77
+ "options": []
78
+ },
79
+ {
80
+ "command": "sign",
81
+ "description": "Sign and submit a pending transaction",
82
+ "args": [{ "name": "tx-id", "required": true, "variadic": true, "description": "One or more pending tx ids" }],
83
+ "options": [
84
+ { "name": "--eoa", "takesValue": false, "description": "Force EOA signing path" },
85
+ { "name": "--aa", "takesValue": false, "description": "Force AA signing path" },
86
+ { "name": "--aa-provider", "takesValue": true, "description": "AA provider name (AA only)" },
87
+ { "name": "--aa-mode", "takesValue": true, "description": "AA mode (AA only)" },
88
+ { "name": "--rpc-url", "takesValue": true, "description": "Override RPC URL for this signing call" },
89
+ { "name": "--private-key", "takesValue": true, "description": "Hex private key (must start with 0x)" },
90
+ { "name": "--public-key", "takesValue": true, "description": "Wallet address; must match the signer" }
91
+ ]
92
+ },
93
+ {
94
+ "command": "secret list",
95
+ "description": "List configured secrets for the active session",
96
+ "options": []
97
+ },
98
+ {
99
+ "command": "secret add",
100
+ "description": "Add a secret to the active session (NAME=value)",
101
+ "args": [{ "name": "kv", "required": true, "description": "KEY=value pair, e.g. ALCHEMY_API_KEY=..." }],
102
+ "options": []
103
+ },
104
+ {
105
+ "command": "secret clear",
106
+ "description": "Clear all secrets for the active session",
107
+ "options": []
108
+ },
109
+ {
110
+ "command": "status",
111
+ "description": "Show current session state",
112
+ "options": []
113
+ },
114
+ {
115
+ "command": "events",
116
+ "description": "List system events",
117
+ "options": []
118
+ },
119
+ {
120
+ "command": "close",
121
+ "description": "Close the current session",
122
+ "options": []
123
+ }
124
+ ]
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "aomi-transact",
3
+ "target": {
4
+ "surface": "cli",
5
+ "repoPath": "..",
6
+ "skill": "../SKILL.md",
7
+ "discovery": {
8
+ "mode": "manifest"
9
+ },
10
+ "cli": {
11
+ "commands": "./cli-commands.json"
12
+ }
13
+ },
14
+ "benchmark": {
15
+ "apiKeyEnv": "OPENROUTER_API_KEY",
16
+ "format": "pi",
17
+ "timeout": 240000,
18
+ "taskGeneration": {
19
+ "enabled": true,
20
+ "maxTasks": 20,
21
+ "outputDir": "."
22
+ },
23
+ "models": [
24
+ {
25
+ "id": "openrouter/anthropic/claude-sonnet-4-6",
26
+ "name": "Claude Sonnet 4.6",
27
+ "tier": "flagship"
28
+ },
29
+ {
30
+ "id": "openrouter/openai/gpt-4o",
31
+ "name": "Gpt 4o",
32
+ "tier": "mid"
33
+ }
34
+ ],
35
+ "output": {
36
+ "dir": "../benchmark-results"
37
+ },
38
+ "verdict": {
39
+ "perModelFloor": 0.6000000000000001,
40
+ "targetWeightedAverage": 0.8
41
+ }
42
+ },
43
+ "optimize": {
44
+ "model": "openrouter/anthropic/claude-sonnet-4-6",
45
+ "apiKeyEnv": "OPENROUTER_API_KEY",
46
+ "allowedPaths": [
47
+ "SKILL.md"
48
+ ],
49
+ "validation": [],
50
+ "maxIterations": 5
51
+ }
52
+ }
@@ -5,8 +5,8 @@ description: >
5
5
  check balances or prices, build wallet requests, confirm quotes or routes,
6
6
  sign transactions or EIP-712 payloads, switch apps or chains, or execute
7
7
  swaps, transfers, and DeFi actions on-chain. Covers Aomi chat, transaction
8
- review, AA-first signing with mode fallback, persistent AA configuration,
9
- session controls, and per-session secret ingestion.
8
+ review, AA-first signing with mode fallback, session controls, and
9
+ per-session secret ingestion.
10
10
  compatibility: "Requires @aomi-labs/client (`npm install -g @aomi-labs/client`). CLI executable is `aomi`. Requires viem for signing (`npm install viem`). Use AOMI_APP / --app, AOMI_MODEL / --model, AOMI_CHAIN_ID / --chain, CHAIN_RPC_URL / --rpc-url, `aomi secret add` for session secret ingestion, and AOMI_STATE_DIR for local session storage."
11
11
 
12
12
  license: MIT
@@ -62,7 +62,6 @@ aomi model list|set|current
62
62
  aomi app list|current
63
63
  aomi chain list
64
64
  aomi secret list|clear|add
65
- aomi aa status|set|test|reset
66
65
  ```
67
66
 
68
67
  ## Quick Start
@@ -182,7 +181,7 @@ Run `aomi tx list` to see pending transactions, `aomi tx sign <id>` to sign.
182
181
  Use these rules exactly:
183
182
 
184
183
  - Default command: `aomi tx sign <tx-id> [<tx-id> ...]`
185
- - Default behavior (**auto-detect**): if an AA provider is configured (env vars, `~/.aomi/aa.json`, or flags), use AA automatically. If no AA provider is configured, use EOA. There is no silent fallback — AA either works or fails.
184
+ - Default behavior (**auto-detect**): if an AA provider is configured (env vars or flags), use AA automatically. If no AA provider is configured, use EOA. There is no silent fallback — AA either works or fails.
186
185
  - **Mode fallback**: when AA is used, the CLI tries the preferred mode (default 7702). If it fails, it tries the alternative mode (4337). If both fail, it returns an error suggesting `--eoa`.
187
186
  - `--eoa`: force direct EOA execution, skip AA entirely.
188
187
  - `--aa-provider` or `--aa-mode`: AA-specific controls that also force AA mode. Cannot be used with `--eoa`.
@@ -202,16 +201,16 @@ aomi tx sign tx-1 --aa-provider pimlico --aa-mode 4337 --private-key 0xYourPriva
202
201
 
203
202
  ### Batch Simulation
204
203
 
205
- Use `aomi simulate` to dry-run pending transactions before signing. Simulation
204
+ Use `aomi tx simulate` to dry-run pending transactions before signing. Simulation
206
205
  runs each tx sequentially on a forked chain so state-dependent flows (approve →
207
206
  swap) are validated as a batch — the swap sees the approve's state changes.
208
207
 
209
208
  ```bash
210
209
  # Simulate a single pending tx
211
- aomi simulate tx-1
210
+ aomi tx simulate tx-1
212
211
 
213
212
  # Simulate a multi-step batch in order (approve then swap)
214
- aomi simulate tx-1 tx-2
213
+ aomi tx simulate tx-1 tx-2
215
214
  ```
216
215
 
217
216
  The response includes per-step success/failure, revert reasons, and gas usage:
@@ -240,7 +239,7 @@ When to simulate:
240
239
  When not to simulate:
241
240
 
242
241
  - Read-only operations (balances, prices, quotes).
243
- - If there are no pending transactions (`aomi tx` shows nothing).
242
+ - If there are no pending transactions (`aomi tx list` shows nothing).
244
243
 
245
244
  Simulation and signing workflow:
246
245
 
@@ -250,16 +249,16 @@ aomi chat "approve and swap 100 USDC for ETH on Uniswap" \
250
249
  --public-key 0xYourAddress --chain 1
251
250
 
252
251
  # 2. Check what got queued
253
- aomi tx
252
+ aomi tx list
254
253
 
255
254
  # 3. Simulate the batch
256
- aomi simulate tx-1 tx-2
255
+ aomi tx simulate tx-1 tx-2
257
256
 
258
257
  # 4. If simulation succeeds, sign
259
- aomi sign tx-1 tx-2 --private-key 0xYourPrivateKey --rpc-url https://eth.llamarpc.com
258
+ aomi tx sign tx-1 tx-2 --private-key 0xYourPrivateKey --rpc-url https://eth.llamarpc.com
260
259
 
261
260
  # 5. Verify
262
- aomi tx
261
+ aomi tx list
263
262
  ```
264
263
 
265
264
  ### Account Abstraction
@@ -275,11 +274,11 @@ Use AA when:
275
274
 
276
275
  How to choose:
277
276
 
278
- - `aomi sign` with no AA flags: try AA first, then fall back to EOA automatically if AA is unavailable.
279
- - `aomi sign --aa`: require AA only. Use this when the user does not want an EOA fallback.
280
- - `aomi sign --eoa`: bypass AA entirely and sign directly with the wallet key.
281
- - `aomi sign --aa-provider alchemy|pimlico`: force a specific AA provider.
282
- - `aomi sign --aa-mode 4337|7702`: force the execution mode when the user wants a specific AA path.
277
+ - `aomi tx sign` with no AA flags: try AA first, then fall back to EOA automatically if AA is unavailable.
278
+ - `aomi tx sign --aa`: require AA only. Use this when the user does not want an EOA fallback.
279
+ - `aomi tx sign --eoa`: bypass AA entirely and sign directly with the wallet key.
280
+ - `aomi tx sign --aa-provider alchemy|pimlico`: force a specific AA provider.
281
+ - `aomi tx sign --aa-mode 4337|7702`: force the execution mode when the user wants a specific AA path.
283
282
 
284
283
  More signing notes:
285
284
 
@@ -371,7 +370,7 @@ aomi secret add NAME=value [NAME=value ...]
371
370
  ### Batch Simulation
372
371
 
373
372
  ```bash
374
- aomi simulate <tx-id> [<tx-id> ...]
373
+ aomi tx simulate <tx-id> [<tx-id> ...]
375
374
  ```
376
375
 
377
376
  - Runs pending transactions sequentially on a forked chain (Anvil snapshot/revert).
@@ -379,7 +378,7 @@ aomi simulate <tx-id> [<tx-id> ...]
379
378
  - Returns per-step success/failure, revert reasons, and `gas_used`.
380
379
  - Returns `total_gas` for the entire batch.
381
380
  - No on-chain state is modified — the fork is reverted after simulation.
382
- - Requires pending transactions to exist in the session (`aomi tx` to check).
381
+ - Requires pending transactions to exist in the session (`aomi tx list` to check).
383
382
 
384
383
  ### App And Model Commands
385
384
 
@@ -467,44 +466,25 @@ When using AA, the CLI tries modes in order:
467
466
  2. If preferred mode fails, try the alternative mode (7702 ↔ 4337).
468
467
  3. If both modes fail, return error with suggestion: use `--eoa` to sign without AA.
469
468
 
470
- ### Persistent AA Configuration
471
-
472
- AA settings can be persisted to `~/.aomi/aa.json` using the `aomi aa` commands,
473
- eliminating the need to pass env vars or flags on every sign.
474
-
475
- ```bash
476
- # Configure AA provider and credentials
477
- aomi aa set provider alchemy
478
- aomi aa set key <your-alchemy-key>
479
- aomi aa set alchemy-key <your-alchemy-key> # provider-specific key
480
- aomi aa set pimlico-key <your-pimlico-key> # provider-specific key
481
- aomi aa set policy <gas-policy-id>
482
- aomi aa set mode 7702
483
- aomi aa set fallback eoa
469
+ ### AA Configuration
484
470
 
485
- # View resolved config (all layers merged)
486
- aomi aa status
471
+ AA is configured per-invocation via flags or environment variables. There is
472
+ no persistent AA config file — export the relevant env vars in your shell, or
473
+ pass `--aa-*` flags directly on `aomi tx sign`.
487
474
 
488
- # Validate setup against a chain
489
- aomi aa test --chain 8453
490
-
491
- # Clear all persisted config
492
- aomi aa reset
493
- ```
494
-
495
- Priority chain for AA resolution: **flag > env var > `~/.aomi/aa.json` > defaults**.
475
+ Priority chain for AA resolution: **flag > env var > defaults**.
496
476
 
497
477
  ### AA Providers
498
478
 
499
- | Provider | Flag | Env Var | Persistent Config | Notes |
500
- | -------- | ----------------------- | ----------------- | ------------------------- | -------------------------------- |
501
- | Alchemy | `--aa-provider alchemy` | `ALCHEMY_API_KEY` | `aomi aa set provider alchemy` | 4337 (sponsored via gas policy), 7702 (EOA pays gas) |
502
- | Pimlico | `--aa-provider pimlico` | `PIMLICO_API_KEY` | `aomi aa set provider pimlico` | 4337 (sponsored via dashboard policy). Direct private key supported. |
479
+ | Provider | Flag | Env Var | Notes |
480
+ | -------- | ----------------------- | ----------------- | -------------------------------- |
481
+ | Alchemy | `--aa-provider alchemy` | `ALCHEMY_API_KEY` | 4337 (sponsored via gas policy), 7702 (EOA pays gas) |
482
+ | Pimlico | `--aa-provider pimlico` | `PIMLICO_API_KEY` | 4337 (sponsored via dashboard policy). Direct private key supported. |
503
483
 
504
484
  Provider selection rules:
505
485
 
506
- - If the user explicitly selects a provider (flag or persistent config), use it.
507
- - In auto-detect mode, the CLI uses the first configured AA provider.
486
+ - If the user explicitly selects a provider via flag, use it.
487
+ - In auto-detect mode, the CLI uses the first configured AA provider (whichever env var is set).
508
488
  - If no AA provider is configured, auto-detect uses EOA directly.
509
489
 
510
490
  ### AA Modes
@@ -538,15 +518,6 @@ export ALCHEMY_GAS_POLICY_ID=your-policy-id
538
518
  aomi tx sign tx-1
539
519
  ```
540
520
 
541
- Or use persistent config:
542
-
543
- ```bash
544
- aomi aa set provider alchemy
545
- aomi aa set key your-key
546
- aomi aa set policy your-policy-id
547
- aomi tx sign tx-1
548
- ```
549
-
550
521
  **Pimlico** (sponsorship via dashboard policy):
551
522
 
552
523
  ```bash
@@ -589,20 +560,22 @@ Practical rule:
589
560
  ### Flags And Env Vars
590
561
 
591
562
  All config can be passed as flags. Flags override environment variables.
592
- Environment variables override persistent config (`~/.aomi/aa.json`).
593
-
594
- | Flag | Env Var | Default | Purpose |
595
- | --------------- | ------------------ | ---------------------- | --------------------------------------- |
596
- | `--backend-url` | `AOMI_BACKEND_URL` | `https://api.aomi.dev` | Backend URL |
597
- | `--api-key` | `AOMI_API_KEY` | none | API key for non-default apps |
598
- | `--app` | `AOMI_APP` | `default` | Backend app |
599
- | `--model` | `AOMI_MODEL` | backend default | Session model |
600
- | `--public-key` | `AOMI_PUBLIC_KEY` | none | Wallet address for chat/session context |
601
- | `--private-key` | `PRIVATE_KEY` | none | Signing key for `aomi tx sign` |
602
- | `--rpc-url` | `CHAIN_RPC_URL` | chain RPC default | RPC override for signing |
603
- | `--chain` | `AOMI_CHAIN_ID` | `1` | Active wallet chain |
604
- | `--aa-provider` | `AOMI_AA_PROVIDER` | auto-detect | AA provider override |
605
- | `--aa-mode` | `AOMI_AA_MODE` | chain default | AA mode override |
563
+
564
+ | Flag | Env Var | Default | Purpose |
565
+ | --------------- | ------------------ | ---------------------- | --------------------------------------------------------- |
566
+ | `--backend-url` | `AOMI_BACKEND_URL` | `https://api.aomi.dev` | Backend URL |
567
+ | `--api-key` | `AOMI_API_KEY` | none | API key for non-default apps |
568
+ | `--app` | `AOMI_APP` | `default` | Backend app |
569
+ | `--model` | `AOMI_MODEL` | backend default | Session model |
570
+ | `--new-session` | | off | Create a fresh active session for this command |
571
+ | `--public-key` | `AOMI_PUBLIC_KEY` | none | Wallet address for chat/session context |
572
+ | `--private-key` | `PRIVATE_KEY` | none | Signing key for `aomi tx sign` |
573
+ | `--rpc-url` | `CHAIN_RPC_URL` | chain RPC default | RPC override for signing |
574
+ | `--chain` | `AOMI_CHAIN_ID` | none | Active wallet chain (inherits session chain if unset) |
575
+ | `--eoa` | | off | Force plain EOA, skip AA even if configured (sign-only) |
576
+ | `--aa` | | off | Force AA, error if provider not configured (sign-only) |
577
+ | `--aa-provider` | `AOMI_AA_PROVIDER` | auto-detect | AA provider override: `alchemy` \| `pimlico` (sign-only) |
578
+ | `--aa-mode` | `AOMI_AA_MODE` | chain default | AA mode override: `4337` \| `7702` (sign-only) |
606
579
 
607
580
  ### AA Provider Credentials
608
581
 
@@ -634,7 +607,8 @@ Storage layout by default:
634
607
 
635
608
  - `~/.aomi/sessions/` stores per-session JSON files.
636
609
  - `~/.aomi/active-session.txt` stores the active local session pointer.
637
- - `~/.aomi/aa.json` stores persistent AA configuration.
610
+
611
+ AA configuration is supplied per-invocation via flags or environment variables (no persistent `aa.json` file).
638
612
 
639
613
  ### Important Config Rules
640
614
 
@@ -686,18 +660,18 @@ aomi chat "approve and swap 500 USDC for ETH on Uniswap" \
686
660
  --public-key 0xYourAddress --chain 1
687
661
 
688
662
  # 2. Check queued requests
689
- aomi tx
663
+ aomi tx list
690
664
 
691
665
  # 3. Simulate the batch — approve then swap
692
- aomi simulate tx-1 tx-2
666
+ aomi tx simulate tx-1 tx-2
693
667
 
694
668
  # 4. If simulation passes, sign the batch
695
- aomi sign tx-1 tx-2 \
669
+ aomi tx sign tx-1 tx-2 \
696
670
  --private-key 0xYourPrivateKey \
697
671
  --rpc-url https://eth.llamarpc.com
698
672
 
699
673
  # 5. Verify
700
- aomi tx
674
+ aomi tx list
701
675
  ```
702
676
 
703
677
  ### Explicit EOA Flow
@@ -718,16 +692,14 @@ aomi tx sign tx-1 \
718
692
  --private-key 0xYourPrivateKey
719
693
  ```
720
694
 
721
- ### AA Setup With Persistent Config
695
+ ### AA Setup With Environment Variables
722
696
 
723
697
  ```bash
724
- # One-time setup
725
- aomi aa set provider alchemy
726
- aomi aa set key your-alchemy-key
727
- aomi aa set policy your-gas-policy-id
728
- aomi aa status
698
+ # Export once per shell — auto-detected by `aomi tx sign`
699
+ export ALCHEMY_API_KEY=your-alchemy-key
700
+ export ALCHEMY_GAS_POLICY_ID=your-gas-policy-id
729
701
 
730
- # Now all signs auto-use AA — no flags needed
702
+ # All subsequent signs auto-use AA — no flags needed
731
703
  aomi tx sign tx-1 --private-key 0xYourPrivateKey
732
704
  ```
733
705
 
@@ -794,11 +766,10 @@ aomi session close
794
766
 
795
767
  - If `aomi chat` returns `(no response)`, wait briefly and run `aomi session status`.
796
768
  - If AA signing fails, the CLI tries the alternative AA mode automatically. If both modes fail, it returns an error suggesting `--eoa`. Read the console output before retrying manually.
797
- - If AA is required and fails, check `ALCHEMY_API_KEY` or `PIMLICO_API_KEY`, the selected chain, and any requested `--aa-mode`. Use `aomi aa status` to see the resolved AA config.
769
+ - If AA is required and fails, check `ALCHEMY_API_KEY` or `PIMLICO_API_KEY`, the selected chain, and any requested `--aa-mode`.
798
770
  - If a transaction fails on-chain, check the RPC URL, balance, and chain.
799
771
  - `401`, `429`, and generic parameter errors during `aomi tx sign` are often RPC problems rather than transaction-construction problems. Try a reliable RPC for the correct chain.
800
772
  - If `ALCHEMY_API_KEY` is set, construct the correct chain-specific Alchemy RPC before falling back to random public endpoints.
801
773
  - If one or two public RPCs fail for the same chain, stop rotating through random endpoints and ask the user for a proper RPC URL for that chain.
802
- - Use `aomi aa test --chain <id>` to validate AA setup for a specific chain before signing.
803
- - If `aomi simulate` fails with a revert, read the revert reason. Common causes: expired quote or timestamp (re-chat to get a fresh quote), insufficient token balance, or missing prior approval. Do not sign transactions that failed simulation without understanding why.
804
- - If `aomi simulate` returns `stateful: false`, the backend could not fork the chain — simulation ran each tx independently via `eth_call`, so state-dependent flows (approve → swap) may show false negatives. Retry or check that the backend's Anvil instance is running.
774
+ - If `aomi tx simulate` fails with a revert, read the revert reason. Common causes: expired quote or timestamp (re-chat to get a fresh quote), insufficient token balance, or missing prior approval. Do not sign transactions that failed simulation without understanding why.
775
+ - If `aomi tx simulate` returns `stateful: false`, the backend could not fork the chain simulation ran each tx independently via `eth_call`, so state-dependent flows (approve swap) may show false negatives. Retry or check that the backend's Anvil instance is running.