httpcat-cli 0.0.27 → 0.1.0

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 (69) hide show
  1. package/.github/workflows/README.md +37 -4
  2. package/.github/workflows/ci.yml +31 -20
  3. package/.github/workflows/homebrew-tap.yml +1 -1
  4. package/.github/workflows/publish-switch.yml +41 -0
  5. package/.github/workflows/rc-publish.yml +196 -0
  6. package/.github/workflows/release.yml +260 -81
  7. package/README.md +107 -108
  8. package/bun.lock +2933 -0
  9. package/dist/commands/account.d.ts.map +1 -1
  10. package/dist/commands/account.js +14 -7
  11. package/dist/commands/account.js.map +1 -1
  12. package/dist/commands/balances.d.ts.map +1 -0
  13. package/dist/commands/balances.js +171 -0
  14. package/dist/commands/balances.js.map +1 -0
  15. package/dist/commands/buy.d.ts.map +1 -1
  16. package/dist/commands/buy.js +743 -35
  17. package/dist/commands/buy.js.map +1 -1
  18. package/dist/commands/chat.d.ts.map +1 -1
  19. package/dist/commands/chat.js +467 -906
  20. package/dist/commands/chat.js.map +1 -1
  21. package/dist/commands/claim.d.ts.map +1 -0
  22. package/dist/commands/claim.js +65 -0
  23. package/dist/commands/claim.js.map +1 -0
  24. package/dist/commands/create.d.ts.map +1 -1
  25. package/dist/commands/create.js +0 -1
  26. package/dist/commands/create.js.map +1 -1
  27. package/dist/commands/info.d.ts.map +1 -1
  28. package/dist/commands/info.js +143 -38
  29. package/dist/commands/info.js.map +1 -1
  30. package/dist/commands/list.d.ts.map +1 -1
  31. package/dist/commands/list.js +31 -27
  32. package/dist/commands/list.js.map +1 -1
  33. package/dist/commands/positions.d.ts.map +1 -1
  34. package/dist/commands/positions.js +178 -106
  35. package/dist/commands/positions.js.map +1 -1
  36. package/dist/commands/sell.d.ts.map +1 -1
  37. package/dist/commands/sell.js +720 -28
  38. package/dist/commands/sell.js.map +1 -1
  39. package/dist/index.js +321 -104
  40. package/dist/index.js.map +1 -1
  41. package/dist/interactive/shell.d.ts.map +1 -1
  42. package/dist/interactive/shell.js +328 -179
  43. package/dist/interactive/shell.js.map +1 -1
  44. package/dist/mcp/tools.d.ts.map +1 -1
  45. package/dist/mcp/tools.js +8 -8
  46. package/dist/mcp/tools.js.map +1 -1
  47. package/dist/utils/constants.d.ts.map +1 -0
  48. package/dist/utils/constants.js +66 -0
  49. package/dist/utils/constants.js.map +1 -0
  50. package/dist/utils/formatting.d.ts.map +1 -1
  51. package/dist/utils/formatting.js +3 -5
  52. package/dist/utils/formatting.js.map +1 -1
  53. package/dist/utils/token-resolver.d.ts.map +1 -1
  54. package/dist/utils/token-resolver.js +70 -68
  55. package/dist/utils/token-resolver.js.map +1 -1
  56. package/dist/utils/validation.d.ts.map +1 -1
  57. package/dist/utils/validation.js +4 -3
  58. package/dist/utils/validation.js.map +1 -1
  59. package/jest.config.js +1 -1
  60. package/package.json +19 -13
  61. package/tests/README.md +0 -1
  62. package/.claude/settings.local.json +0 -41
  63. package/dist/commands/balance.d.ts.map +0 -1
  64. package/dist/commands/balance.js +0 -112
  65. package/dist/commands/balance.js.map +0 -1
  66. package/homebrew-httpcat/Formula/httpcat.rb +0 -18
  67. package/homebrew-httpcat/README.md +0 -31
  68. package/homebrew-httpcat/homebrew-httpcat/Formula/httpcat.rb +0 -18
  69. package/homebrew-httpcat/homebrew-httpcat/README.md +0 -31
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # httpcat CLI
1
+ # httpcat-cli
2
2
 
3
3
  > 🐱 Command-line interface for interacting with the httpcat agent - create, buy, and sell tokens with x402 payments
4
4
 
@@ -125,13 +125,13 @@ httpcat> help
125
125
  Available Commands:
126
126
 
127
127
  create <name> <symbol> Create a new token
128
- buy <identifier> <amount> Buy tokens ($0.05, $0.10, or $0.20)
129
- sell <identifier> <amount|all> Sell tokens
130
- info <identifier> Get token information
128
+ buy <id|name|symbol> <amount> Buy tokens ($0.05, $0.10, or $0.20)
129
+ sell <id|name|symbol> <amount|all> Sell tokens
130
+ info <id|name|symbol> Get token information
131
131
  list [--sort mcap|created] List all tokens
132
132
  positions Get all your positions with comprehensive info
133
- chat [token] Start streaming chat (optional: token identifier)
134
- balance Check wallet balance (ETH and USDC)
133
+ chat [token] Start streaming chat (optional: token symbol/name/address)
134
+ balances Check wallet balances (ETH and USDC)
135
135
  health Check agent health
136
136
  config [--show|--set|--reset] Manage configuration
137
137
  network Show current network
@@ -150,14 +150,12 @@ httpcat> create "Meow Token" "MEOW"
150
150
  ┌─────────────────────────────────────────┐
151
151
  │ 🎉 Meow Token (MEOW) │
152
152
  ├─────────────────────────────────────────┤
153
- │ Token ID: abc123-4567-89ab-cdef-... │
154
153
  │ Address: 0x789abcd... │
155
154
  │ Supply: 1,000,000,000 MEOW │
156
155
  │ Status: Active │
157
156
  └─────────────────────────────────────────┘
158
157
 
159
- httpcat> buy 0x1234567890123456789012345678901234567890 0.20
160
- httpcat> buy abc123-4567-89ab-cdef-0123456789ab 0.20
158
+ httpcat> buy 0x789abcd... 0.20
161
159
 
162
160
  💰 Tokens purchased successfully!
163
161
 
@@ -197,9 +195,9 @@ httpcat create "My Token" "MTK" --photo https://example.com/photo.png --website
197
195
 
198
196
  **Options:**
199
197
 
200
- - `--photo <url>` - Token photo URL
201
- - `--banner <url>` - Banner image URL
202
- - `--website <url>` - Website URL
198
+ - `-p, --photo <url>` - Token photo URL
199
+ - `-b, --banner <url>` - Banner image URL
200
+ - `-w, --website <url>` - Website URL
203
201
 
204
202
  **Cost:** $0.01 USDC
205
203
 
@@ -210,8 +208,7 @@ Purchase tokens from the bonding curve.
210
208
  **Interactive:**
211
209
 
212
210
  ```bash
213
- httpcat> buy 0x1234567890123456789012345678901234567890 0.20
214
- httpcat> buy abc123-... 0.20
211
+ httpcat> buy 0x1234... 0.20
215
212
  httpcat> buy "My Token" 0.10
216
213
  httpcat> buy MTK 0.05
217
214
  ```
@@ -219,36 +216,31 @@ httpcat> buy MTK 0.05
219
216
  **CLI:**
220
217
 
221
218
  ```bash
222
- httpcat buy 0x1234567890123456789012345678901234567890 0.20
223
- httpcat buy abc123-4567-89ab-cdef-0123456789ab 0.20
219
+ httpcat buy 0x1234567890abcdef1234567890abcdef12345678 0.20
224
220
  httpcat buy "My Token" 0.10
225
221
  httpcat buy MTK 0.05
226
222
  ```
227
223
 
228
224
  **Options:**
229
225
 
230
- - `--repeat <count>` - Execute multiple buys in sequence (stops early if token graduates or insufficient funds)
231
- - `--delay <ms>` - Delay in milliseconds between repeat operations (default: 0)
226
+ - `-r, --repeat <count>` - Execute multiple buys in sequence (stops early if token graduates or insufficient funds)
227
+ - `-d, --delay <ms>` - Delay in milliseconds between repeat operations (default: 0)
232
228
 
233
229
  **Examples with repeat:**
234
230
 
235
231
  ```bash
236
232
  # Execute 10 buys back-to-back
237
- httpcat buy MTK 0.10 --repeat 10
233
+ httpcat buy MTK 0.10 -r 10
238
234
 
239
235
  # Execute 10 buys with 500ms delay between each
240
- httpcat buy MTK 0.10 --repeat 10 --delay 500
236
+ httpcat buy MTK 0.10 -r 10 -d 500
241
237
  ```
242
238
 
243
239
  **Token Identifier:**
244
240
 
245
- You can use any of the following formats:
246
- - **Contract address** (recommended): `0x1234567890123456789012345678901234567890`
247
- - **Token ID (UUID)**: `abc123-4567-89ab-cdef-0123456789ab`
248
- - **Token name**: `"My Token"` (use quotes if it contains spaces)
249
- - **Token symbol**: `MTK` (case-insensitive)
250
-
251
- **Note:** If multiple tokens share the same name or symbol, the system will automatically select the token with the highest graduation progress. For buy/sell operations, it's recommended to use the contract address for unambiguous identification.
241
+ - Token address: `0x1234...` (contract address)
242
+ - Token name: `"My Token"` (use quotes if it contains spaces)
243
+ - Token symbol: `MTK` (case-insensitive)
252
244
 
253
245
  **Amounts:**
254
246
 
@@ -259,7 +251,8 @@ You can use any of the following formats:
259
251
 
260
252
  **Repeat Mode Behavior:**
261
253
 
262
- When using `--repeat`, the command will:
254
+ When using `-r, --repeat`, the command will:
255
+
263
256
  - Execute the specified number of buys sequentially
264
257
  - Stop early if the token graduates (reaches 100% graduation progress)
265
258
  - Stop early if you run out of funds (HTTP 402 error)
@@ -273,8 +266,7 @@ Sell tokens back to the bonding curve.
273
266
  **Interactive:**
274
267
 
275
268
  ```bash
276
- httpcat> sell 0x1234567890123456789012345678901234567890 1000 # Sell 1000 tokens
277
- httpcat> sell abc123-... 1000 # Sell 1000 tokens
269
+ httpcat> sell 0x1234... 1000 # Sell 1000 tokens
278
270
  httpcat> sell "My Token" 50% # Sell 50% of holdings
279
271
  httpcat> sell MTK all # Sell all tokens
280
272
  ```
@@ -282,15 +274,14 @@ httpcat> sell MTK all # Sell all tokens
282
274
  **CLI:**
283
275
 
284
276
  ```bash
285
- httpcat sell 0x1234567890123456789012345678901234567890 1000
286
- httpcat sell abc123-4567-89ab-cdef-0123456789ab 1000
277
+ httpcat sell 0x1234567890abcdef1234567890abcdef12345678 1000
287
278
  httpcat sell "My Token" 50%
288
279
  httpcat sell MTK all
289
280
  ```
290
281
 
291
282
  **Token Identifier:**
292
283
 
293
- - Contract address, Token ID (UUID), name, or symbol (same as buy command)
284
+ - Address, name, or symbol (same as buy command)
294
285
 
295
286
  **Cost:** Dynamic based on amount (1% fee deducted from proceeds)
296
287
 
@@ -301,8 +292,7 @@ Get detailed information about a token.
301
292
  **Interactive:**
302
293
 
303
294
  ```bash
304
- httpcat> info 0x1234567890123456789012345678901234567890
305
- httpcat> info abc123-...
295
+ httpcat> info 0x1234...
306
296
  httpcat> info "My Token"
307
297
  httpcat> info MTK
308
298
  ```
@@ -310,26 +300,23 @@ httpcat> info MTK
310
300
  **CLI:**
311
301
 
312
302
  ```bash
313
- httpcat info 0x1234567890123456789012345678901234567890
314
- httpcat info abc123-4567-89ab-cdef-0123456789ab
303
+ httpcat info 0x1234567890abcdef1234567890abcdef12345678
315
304
  httpcat info "My Token"
316
305
  httpcat info MTK
317
306
  ```
318
307
 
319
308
  **Token Identifier:**
320
309
 
321
- - Contract address, Token ID (UUID), name, or symbol (same as buy command)
310
+ - Address, name, or symbol (same as buy command)
322
311
 
323
312
  **Output:**
324
313
 
325
- - Token name, symbol, and contract address
314
+ - Token name, symbol, address
326
315
  - Current price and market cap
327
316
  - Graduation progress
328
317
  - Your position (if you hold any)
329
318
  - P&L calculation
330
319
 
331
- **Note:** The token list now prominently displays contract addresses, making it easy to copy and use addresses for commands.
332
-
333
320
  **Cost:** $0.0001 USDC
334
321
 
335
322
  ### List Tokens
@@ -354,9 +341,9 @@ httpcat list --page 3 --sort name
354
341
 
355
342
  **Options:**
356
343
 
357
- - `--sort <field>` - Sort by `mcap`, `created`, or `name` (default: `mcap`)
358
- - `--limit <n>` - Items per page (default: 20, max: 100)
359
- - `--page <n>` - Page number (default: 1)
344
+ - `-s, --sort <field>` - Sort by `mcap`, `created`, or `name` (default: `mcap`)
345
+ - `-l, --limit <n>` - Items per page (default: 20, max: 100)
346
+ - `-p, --page <n>` - Page number (default: 1)
360
347
 
361
348
  **Cost:** $0.0001 USDC
362
349
 
@@ -374,13 +361,14 @@ httpcat> positions
374
361
 
375
362
  ```bash
376
363
  httpcat positions
377
- httpcat --json positions
378
- httpcat --private-key 0x... positions
364
+ httpcat -j positions
365
+ httpcat -k 0x... positions
379
366
  ```
380
367
 
381
368
  **Output:**
382
369
 
383
370
  For each position:
371
+
384
372
  - Token information (name, symbol, address, status, price, market cap, graduation progress)
385
373
  - Position details (tokens owned, USDC invested, current value, average cost per token)
386
374
  - Performance metrics (profit/loss in USDC and percentage ROI)
@@ -389,6 +377,7 @@ For each position:
389
377
  - Timestamps (position created and updated dates)
390
378
 
391
379
  Portfolio summary:
380
+
392
381
  - Total positions count
393
382
  - Total portfolio value
394
383
  - Total amount invested
@@ -396,21 +385,21 @@ Portfolio summary:
396
385
 
397
386
  **Cost:** $0.01 USDC
398
387
 
399
- ### Check Balance
388
+ ### Check Balances
400
389
 
401
390
  Check your wallet's ETH and USDC balances.
402
391
 
403
392
  **Interactive:**
404
393
 
405
394
  ```bash
406
- httpcat> balance
395
+ httpcat> balances
407
396
  ```
408
397
 
409
398
  **CLI:**
410
399
 
411
400
  ```bash
412
- httpcat balance
413
- httpcat balance --private-key 0x...
401
+ httpcat balances
402
+ httpcat balances -k 0x...
414
403
  ```
415
404
 
416
405
  **Output:**
@@ -462,21 +451,19 @@ httpcat chat
462
451
  httpcat chat MTK
463
452
  httpcat chat "My Token"
464
453
  httpcat chat 0x1234...
465
- httpcat --json chat MTK
466
- httpcat --json --input-format stream-json chat MTK # Structured JSON input
454
+ httpcat -j chat MTK
455
+ httpcat -j -f stream-json chat MTK # Structured JSON input
467
456
  ```
468
457
 
469
458
  **Token Identifier:**
470
459
 
471
- You can use any of the following formats:
472
- - **Contract address** (recommended): `0x1234567890123456789012345678901234567890`
473
- - **Token symbol**: `MTK` (case-insensitive)
474
- - **Token name**: `"My Token"` (use quotes if it contains spaces)
475
- - **Token ID (UUID)**: `abc123-4567-89ab-cdef-0123456789ab`
460
+ - Token symbol: `MTK` (case-insensitive)
461
+ - Token name: `"My Token"` (use quotes if it contains spaces)
462
+ - Token address: `0x1234...`
476
463
 
477
464
  **Options:**
478
465
 
479
- - `--input-format <format>` - Input format (only works with `--json`): `"text"` (default) or `"stream-json"` (realtime streaming input)
466
+ - `-f, --input-format <format>` - Input format (only works with `--json`): `"text"` (default) or `"stream-json"` (realtime streaming input)
480
467
  - `"text"`: Line-delimited text input (default)
481
468
  - `"stream-json"`: Newline-delimited JSON (NDJSON) objects. Each line is a JSON object: `{"message": "text"}` or `{"command": "/renew"}`
482
469
 
@@ -484,6 +471,20 @@ You can use any of the following formats:
484
471
 
485
472
  **Note:** For AI agents, consider using MCP tools (`chat_join`, `chat_send_message`, etc.) instead of CLI streaming for better integration. See [MCP Chat Tools](#chat-tools-usage-example) section.
486
473
 
474
+ ### Help
475
+
476
+ Display help information for httpcat.
477
+
478
+ **CLI:**
479
+
480
+ ```bash
481
+ httpcat help
482
+ httpcat --help
483
+ httpcat -h
484
+ ```
485
+
486
+ All three commands show the same help output with available commands and options.
487
+
487
488
  ### Configuration
488
489
 
489
490
  Manage your httpcat configuration.
@@ -491,17 +492,17 @@ Manage your httpcat configuration.
491
492
  **Interactive:**
492
493
 
493
494
  ```bash
494
- httpcat> config --show # Show current config
495
- httpcat> config --set network=base # Update a setting
496
- httpcat> config --reset # Re-run setup wizard
495
+ httpcat> config -s # Show current config
496
+ httpcat> config -S network=base # Update a setting
497
+ httpcat> config -r # Re-run setup wizard
497
498
  ```
498
499
 
499
500
  **CLI:**
500
501
 
501
502
  ```bash
502
503
  httpcat config # Run setup wizard
503
- httpcat config --show # Show current config (JSON)
504
- httpcat config --set network=base # Update a setting
504
+ httpcat config -s # Show current config (JSON)
505
+ httpcat config -S network=base # Update a setting
505
506
  ```
506
507
 
507
508
  ### MCP Server
@@ -544,10 +545,10 @@ Perfect for scripting, automation, or LLM/agent integration.
544
545
 
545
546
  ### JSON Output
546
547
 
547
- Add `--json` flag to any command:
548
+ Add `-j, --json` flag to any command:
548
549
 
549
550
  ```bash
550
- $ httpcat --json create "Test Token" "TEST"
551
+ $ httpcat -j create "Test Token" "TEST"
551
552
  {
552
553
  "success": true,
553
554
  "operation": "create_token",
@@ -754,7 +755,7 @@ All commands with `--json` flag return structured JSON responses. The output fol
754
755
  }
755
756
  ```
756
757
 
757
- **Balance (`balance`)**
758
+ **Balances (`balances`)**
758
759
 
759
760
  ```json
760
761
  {
@@ -780,7 +781,7 @@ All commands with `--json` flag return structured JSON responses. The output fol
780
781
  Minimal output, only exit codes:
781
782
 
782
783
  ```bash
783
- $ httpcat --quiet buy abc123-... 0.20
784
+ $ httpcat -q buy abc123-... 0.20
784
785
  $ echo $?
785
786
  0
786
787
  ```
@@ -800,21 +801,21 @@ $ echo $?
800
801
  #!/bin/bash
801
802
 
802
803
  # Create a token
803
- RESULT=$(httpcat --json create "AI Token" "AI")
804
- TOKEN_ID=$(echo $RESULT | jq -r '.data.tokenId')
804
+ RESULT=$(httpcat -j create "AI Token" "AI")
805
+ TOKEN_ADDRESS=$(echo $RESULT | jq -r '.data.tokenAddress')
805
806
 
806
807
  # Buy some tokens
807
- httpcat --json buy $TOKEN_ID 5
808
+ httpcat -j buy $TOKEN_ADDRESS 5
808
809
 
809
810
  # Get current info
810
- httpcat --json info $TOKEN_ID
811
+ httpcat -j info $TOKEN_ADDRESS
811
812
 
812
813
  # Sell 50% if profitable
813
- INFO=$(httpcat --json info $TOKEN_ID)
814
+ INFO=$(httpcat -j info $TOKEN_ADDRESS)
814
815
  PNL=$(echo $INFO | jq -r '.data.userPosition.pnl')
815
816
 
816
817
  if (( $(echo "$PNL > 0" | bc -l) )); then
817
- httpcat --json sell $TOKEN_ID 50%
818
+ httpcat -j sell $TOKEN_ADDRESS 50%
818
819
  fi
819
820
  ```
820
821
 
@@ -824,11 +825,11 @@ For scripts that need raw streaming access:
824
825
 
825
826
  ```bash
826
827
  # Using stream-json input format
827
- echo '{"message": "Hello!"}' | httpcat --json --input-format stream-json chat MTK
828
- echo '{"command": "/renew"}' | httpcat --json --input-format stream-json chat MTK
828
+ echo '{"message": "Hello!"}' | httpcat -j -f stream-json chat MTK
829
+ echo '{"command": "/renew"}' | httpcat -j -f stream-json chat MTK
829
830
 
830
831
  # Or pipe multiple messages
831
- cat messages.ndjson | httpcat --json --input-format stream-json chat MTK
832
+ cat messages.ndjson | httpcat -j -f stream-json chat MTK
832
833
  ```
833
834
 
834
835
  **Note:** For AI agents, MCP tools are recommended over CLI streaming. See [MCP Chat Tools](#chat-tools-usage-example) section.
@@ -934,7 +935,7 @@ Buy tokens from the bonding curve.
934
935
 
935
936
  **Parameters:**
936
937
 
937
- - `identifier` (string, required) - Token identifier: contract address (0x...), UUID, name, or symbol
938
+ - `identifier` (string, required) - Address, name, or symbol
938
939
  - `amount` (string, required) - Amount: "0.05", "0.10", or "0.20" (testnet) | "50", "100", or "200" (mainnet)
939
940
  - `privateKey` (string, optional) - Private key (overrides config/env)
940
941
 
@@ -946,7 +947,7 @@ Sell tokens back to the bonding curve.
946
947
 
947
948
  **Parameters:**
948
949
 
949
- - `identifier` (string, required) - Token identifier: contract address (0x...), UUID, name, or symbol
950
+ - `identifier` (string, required) - Address, name, or symbol
950
951
  - `amount` (string, required) - Amount: number (e.g., "1000"), percentage (e.g., "50%"), or "all"
951
952
  - `privateKey` (string, optional) - Private key (overrides config/env)
952
953
 
@@ -958,7 +959,7 @@ Get detailed information about a token.
958
959
 
959
960
  **Parameters:**
960
961
 
961
- - `identifier` (string, required) - Token identifier: contract address (0x...), UUID, name, or symbol
962
+ - `identifier` (string, required) - Address, name, or symbol
962
963
  - `privateKey` (string, optional) - Private key (overrides config/env)
963
964
 
964
965
  **Returns:** Token details, price, market cap, graduation progress, and your position (if you own tokens)
@@ -987,6 +988,7 @@ Get all your positions with comprehensive information including current value, p
987
988
  - `privateKey` (string, optional) - Private key (overrides config/env)
988
989
 
989
990
  **Returns:** All positions for the requesting address with:
991
+
990
992
  - Position details (tokens owned, USDC invested, current value, average cost)
991
993
  - Performance metrics (profit/loss, ROI percentage)
992
994
  - Position age and transaction history
@@ -1079,33 +1081,34 @@ Here's how an AI agent like Claude Code would use the chat tools:
1079
1081
 
1080
1082
  ```javascript
1081
1083
  // Step 1: Join the FRIDA token chat room
1082
- const joinResult = await mcp.callTool("chat_join", {
1083
- tokenIdentifier: "FRIDA"
1084
+ const joinResult = await mcp.callTool("chat_join", {
1085
+ tokenIdentifier: "FRIDA",
1084
1086
  });
1085
1087
  // Returns: { leaseId: "abc123...", leaseExpiresAt: "...", lastMessages: [...] }
1086
1088
 
1087
1089
  // Step 2: Send a message
1088
1090
  const sendResult = await mcp.callTool("chat_send_message", {
1089
1091
  message: "Hello FRIDA community!",
1090
- leaseId: joinResult.leaseId
1092
+ leaseId: joinResult.leaseId,
1091
1093
  });
1092
1094
  // Returns: { messageId: "msg456...", timestamp: "...", message: "...", author: "0x..." }
1093
1095
 
1094
1096
  // Step 3: Poll for new messages (agent does this periodically)
1095
1097
  const messages = await mcp.callTool("chat_get_recent_messages", {
1096
1098
  leaseId: joinResult.leaseId,
1097
- limit: 20
1099
+ limit: 20,
1098
1100
  });
1099
1101
  // Returns: { messages: [...] }
1100
1102
 
1101
1103
  // Step 4: Renew lease when needed
1102
1104
  const renewal = await mcp.callTool("chat_renew_lease", {
1103
- leaseId: joinResult.leaseId
1105
+ leaseId: joinResult.leaseId,
1104
1106
  });
1105
1107
  // Returns: { leaseId: "new-lease-id...", leaseExpiresAt: "..." }
1106
1108
  ```
1107
1109
 
1108
1110
  **Key Benefits:**
1111
+
1109
1112
  - No shell scripting or process management required
1110
1113
  - WebSocket connections maintained automatically by MCP server
1111
1114
  - Messages cached in memory for quick retrieval
@@ -1127,9 +1130,8 @@ Once configured, AI assistants can use the tools like this:
1127
1130
 
1128
1131
  ```
1129
1132
  create_token(name="Moon Token", symbol="MOON", websiteUrl="https://moon.com")
1130
- buy_token(identifier="0x1234567890123456789012345678901234567890", amount="0.20")
1131
- buy_token(identifier="MOON", amount="0.20") # Can also use symbol
1132
- token_info(identifier="0x1234567890123456789012345678901234567890")
1133
+ buy_token(identifier="0x1234...", amount="0.20")
1134
+ token_info(identifier="MOON")
1133
1135
  list_tokens(sort="mcap", limit=10)
1134
1136
  check_balance()
1135
1137
  ```
@@ -1206,7 +1208,7 @@ httpcat env show
1206
1208
 
1207
1209
  ```bash
1208
1210
  # Add a custom environment
1209
- httpcat env add production http://production-agent:8787 --network base
1211
+ httpcat env add production http://production-agent:8787 -n base
1210
1212
 
1211
1213
  # Switch to it
1212
1214
  httpcat env use production
@@ -1247,8 +1249,8 @@ You can also pass the private key directly via command-line flag (highest priori
1247
1249
 
1248
1250
  ```bash
1249
1251
  # Private key priority: CLI flag > Environment variable > Config file
1250
- httpcat --private-key 0x1234567890abcdef... create "My Token" "MTK"
1251
- httpcat --private-key 0x1234567890abcdef... --json buy abc123-... 0.20
1252
+ httpcat -k 0x1234567890abcdef... create "My Token" "MTK"
1253
+ httpcat -k 0x1234567890abcdef... -j buy 0x1234... 0.20
1252
1254
  ```
1253
1255
 
1254
1256
  **Note:** The `--private-key` flag takes precedence over environment variables and config file settings.
@@ -1257,8 +1259,8 @@ httpcat --private-key 0x1234567890abcdef... --json buy abc123-... 0.20
1257
1259
 
1258
1260
  ```bash
1259
1261
  # Switch to mainnet
1260
- httpcat config --set network=base
1261
- httpcat config --set agentUrl=http://production-url:8787
1262
+ httpcat config -S network=base
1263
+ httpcat config -S agentUrl=http://production-url:8787
1262
1264
 
1263
1265
  # Or in interactive mode
1264
1266
  httpcat> network base
@@ -1373,10 +1375,10 @@ httpcat config --show
1373
1375
 
1374
1376
  ### Check Wallet Balance
1375
1377
 
1376
- Use the balance command to check your wallet's ETH and USDC balances:
1378
+ Use the balances command to check your wallet's ETH and USDC balances:
1377
1379
 
1378
1380
  ```bash
1379
- httpcat balance
1381
+ httpcat balances
1380
1382
  ```
1381
1383
 
1382
1384
  This will show your wallet address, ETH balance (for gas fees), and USDC balance (for trading), with warnings if balances are low.
@@ -1389,28 +1391,25 @@ This will show your wallet address, ETH balance (for gas fees), and USDC balance
1389
1391
  # Setup
1390
1392
  httpcat config
1391
1393
 
1392
- # Check your wallet balance
1393
- httpcat balance
1394
+ # Check your wallet balances
1395
+ httpcat balances
1394
1396
 
1395
1397
  # Create a token
1396
- httpcat create "Moon Cat" "MOON" --website https://mooncat.io
1398
+ httpcat create "Moon Cat" "MOON" -w --website https://mooncat.io
1397
1399
 
1398
- # Buy tokens (using contract address, UUID, name, or symbol)
1399
- httpcat buy 0x1234567890123456789012345678901234567890 0.20
1400
- httpcat buy <tokenId> 0.20
1401
- httpcat buy "My Token" 0.20
1402
- httpcat buy MTK 0.20
1400
+ # Buy tokens
1401
+ httpcat buy 0x1234... 5
1403
1402
 
1404
1403
  # Check your position
1405
- httpcat info 0x1234567890123456789012345678901234567890
1404
+ httpcat info 0x1234...
1406
1405
 
1407
1406
  # Get all your positions with comprehensive info
1408
1407
  httpcat positions
1409
1408
 
1410
1409
  # Sell half when profitable
1411
- httpcat sell 0x1234567890123456789012345678901234567890 50%
1410
+ httpcat sell 0x1234... 50%
1412
1411
 
1413
- # List all your tokens (shows positions and addresses)
1412
+ # List all your tokens (shows positions)
1414
1413
  httpcat list
1415
1414
  ```
1416
1415
 
@@ -1419,16 +1418,16 @@ httpcat list
1419
1418
  ```bash
1420
1419
  #!/bin/bash
1421
1420
 
1422
- TOKEN_ID="abc123-..."
1421
+ TOKEN_ADDRESS="0x1234567890abcdef1234567890abcdef12345678"
1423
1422
 
1424
1423
  # Monitor and trade
1425
1424
  while true; do
1426
- INFO=$(httpcat --json info $TOKEN_ID)
1425
+ INFO=$(httpcat -j info $TOKEN_ADDRESS)
1427
1426
  PROGRESS=$(echo $INFO | jq -r '.data.graduationProgress')
1428
1427
 
1429
1428
  # Buy if close to graduation
1430
1429
  if (( $(echo "$PROGRESS > 90" | bc -l) )); then
1431
- httpcat --quiet buy $TOKEN_ID 5
1430
+ httpcat -q buy $TOKEN_ADDRESS 5
1432
1431
  fi
1433
1432
 
1434
1433
  sleep 60