httpcat-cli 0.2.11-rc.1 → 0.2.11-rc.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 +346 -13
- package/Screenshot 2025-12-21 at 8.56.02/342/200/257PM.png +0 -0
- package/bun.lock +5 -0
- package/cat-spin.sh +417 -0
- package/dist/agent/ax-agent.d.ts.map +1 -0
- package/dist/agent/ax-agent.js +459 -0
- package/dist/agent/ax-agent.js.map +1 -0
- package/dist/agent/llm-factory.d.ts.map +1 -0
- package/dist/agent/llm-factory.js +82 -0
- package/dist/agent/llm-factory.js.map +1 -0
- package/dist/agent/setup-wizard.d.ts.map +1 -0
- package/dist/agent/setup-wizard.js +114 -0
- package/dist/agent/setup-wizard.js.map +1 -0
- package/dist/agent/tools.d.ts.map +1 -0
- package/dist/agent/tools.js +312 -0
- package/dist/agent/tools.js.map +1 -0
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +56 -46
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +133 -5
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/positions.d.ts.map +1 -1
- package/dist/commands/positions.js +51 -54
- package/dist/commands/positions.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +83 -0
- package/dist/config.js.map +1 -1
- package/dist/index.js +301 -13
- package/dist/index.js.map +1 -1
- package/dist/interactive/cat-spin.d.ts.map +1 -0
- package/dist/interactive/cat-spin.js +448 -0
- package/dist/interactive/cat-spin.js.map +1 -0
- package/dist/interactive/shell.d.ts.map +1 -1
- package/dist/interactive/shell.js +1244 -149
- package/dist/interactive/shell.js.map +1 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +1 -6
- package/dist/mcp/tools.js.map +1 -1
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/utils/loading.d.ts.map +1 -1
- package/dist/utils/loading.js +30 -0
- package/dist/utils/loading.js.map +1 -1
- package/dist/utils/token-resolver.d.ts.map +1 -1
- package/dist/utils/token-resolver.js +32 -0
- package/dist/utils/token-resolver.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ httpcat is a full-featured CLI tool that provides both interactive (with ASCII a
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
9
|
- 🎨 **Interactive Shell** - Beautiful REPL with ASCII art cats and colored output
|
|
10
|
-
-
|
|
10
|
+
- 🐱 **Headless Mode** - JSON output for scripting and LLM/agent integration
|
|
11
11
|
- 🔌 **MCP Server** - Built-in Model Context Protocol server for AI assistant integration
|
|
12
12
|
- 💳 **x402 Payments** - Automatic payment handling via x402 protocol
|
|
13
13
|
- 🔐 **Secure Config** - Local configuration storage in `~/.config/httpcat`
|
|
@@ -125,16 +125,23 @@ httpcat> help
|
|
|
125
125
|
Available Commands:
|
|
126
126
|
|
|
127
127
|
create <name> <symbol> Create a new token
|
|
128
|
-
buy <id|name|symbol> <amount> Buy tokens ($0.05, $0.10,
|
|
128
|
+
buy <id|name|symbol> <amount> Buy tokens ($0.05, $0.10, $0.20, or percentage like 50%)
|
|
129
129
|
sell <id|name|symbol> <amount|all> Sell tokens
|
|
130
130
|
info <id|name|symbol> Get token information
|
|
131
131
|
list [--sort mcap|created] List all tokens
|
|
132
|
-
positions
|
|
132
|
+
positions [--active|--graduated] Get all your positions with comprehensive info
|
|
133
|
+
transactions [--user|--token|--type] Get transaction history
|
|
134
|
+
claim <id|name|symbol> [--execute] View/claim LP fees for graduated tokens
|
|
133
135
|
chat [token] Start streaming chat (optional: token symbol/name/address)
|
|
134
|
-
balances Check wallet balances (ETH and
|
|
136
|
+
balances Check wallet balances (ETH, USDC, and CAT)
|
|
137
|
+
account [list|switch|add] Manage accounts
|
|
138
|
+
agent <query> | cat <query> Ask the cat to do something (agent and cat are synonyms)
|
|
139
|
+
agent --chat | cat --chat Enter interactive chat mode
|
|
140
|
+
agent --setup | cat --setup Configure API key/provider
|
|
135
141
|
health Check agent health
|
|
136
142
|
config [--show|--set|--reset] Manage configuration
|
|
137
143
|
network Show current network
|
|
144
|
+
env [list|use|show|add|update] Manage environments
|
|
138
145
|
help Show this help message
|
|
139
146
|
exit Exit the shell
|
|
140
147
|
|
|
@@ -173,6 +180,38 @@ httpcat> buy 0x789abcd... 0.20
|
|
|
173
180
|
[🐱==> ] 0.15% to moon!
|
|
174
181
|
```
|
|
175
182
|
|
|
183
|
+
## Global Options
|
|
184
|
+
|
|
185
|
+
These options can be used with any command:
|
|
186
|
+
|
|
187
|
+
- `-j, --json` - Output in JSON format for scripting and automation
|
|
188
|
+
- `-q, --quiet` - Minimal output (exit codes only)
|
|
189
|
+
- `-v, --verbose` - Show verbose error messages and debugging information
|
|
190
|
+
- `--no-art` - Disable ASCII art cats
|
|
191
|
+
- `-k, --private-key <key>` - Use specific private key (overrides config and env var)
|
|
192
|
+
- `-a, --account <index>` - Use specific account index (overrides active account)
|
|
193
|
+
|
|
194
|
+
**Examples:**
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# Use account 2 for getting positions
|
|
198
|
+
httpcat -a 2 positions
|
|
199
|
+
|
|
200
|
+
# Use account 1 to buy tokens
|
|
201
|
+
httpcat -a 1 buy MTK 0.10
|
|
202
|
+
|
|
203
|
+
# JSON output for account 0
|
|
204
|
+
httpcat --json -a 0 balances
|
|
205
|
+
|
|
206
|
+
# Use specific private key
|
|
207
|
+
httpcat -k 0x1234... create "Test" "TEST"
|
|
208
|
+
|
|
209
|
+
# Quiet mode with exit code checking
|
|
210
|
+
httpcat -q buy MTK 0.20 && echo "Success!" || echo "Failed"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**Note:** The `-a, --account` flag allows you to use different accounts without switching your active account in the config.
|
|
214
|
+
|
|
176
215
|
## Commands
|
|
177
216
|
|
|
178
217
|
### Create Token
|
|
@@ -184,6 +223,7 @@ Create a new token on the bonding curve.
|
|
|
184
223
|
```bash
|
|
185
224
|
httpcat> create "My Token" "MTK"
|
|
186
225
|
httpcat> create "My Token" "MTK" --photo https://example.com/photo.png
|
|
226
|
+
httpcat> create "My Token" "MTK" --photo ./logo.png
|
|
187
227
|
```
|
|
188
228
|
|
|
189
229
|
**CLI:**
|
|
@@ -191,12 +231,12 @@ httpcat> create "My Token" "MTK" --photo https://example.com/photo.png
|
|
|
191
231
|
```bash
|
|
192
232
|
httpcat create "My Token" "MTK"
|
|
193
233
|
httpcat create "My Token" "MTK" --photo https://example.com/photo.png --website https://mytoken.io
|
|
234
|
+
httpcat create "My Token" "MTK" --photo ./logo.png
|
|
194
235
|
```
|
|
195
236
|
|
|
196
237
|
**Options:**
|
|
197
238
|
|
|
198
|
-
- `-p, --photo <url>` - Token photo URL
|
|
199
|
-
- `-b, --banner <url>` - Banner image URL
|
|
239
|
+
- `-p, --photo <url|path>` - Token photo URL or file path (supports http/https URLs, local file paths, or base64 data URLs)
|
|
200
240
|
- `-w, --website <url>` - Website URL
|
|
201
241
|
|
|
202
242
|
**Cost:** $0.01 USDC
|
|
@@ -246,6 +286,9 @@ httpcat buy MTK 0.10 -r 10 -d 500
|
|
|
246
286
|
|
|
247
287
|
- Test mode (base-sepolia): `0.05`, `0.10`, or `0.20` USDC
|
|
248
288
|
- Production (base): `50`, `100`, or `200` USDC
|
|
289
|
+
- Percentage: `10%`, `50%`, `100%` (percentage of your USDC balance)
|
|
290
|
+
- Example: `httpcat buy MTK 50%` - Buy with 50% of your USDC balance
|
|
291
|
+
- Works with any percentage from 0.01% to 100%
|
|
249
292
|
|
|
250
293
|
**Cost:** Amount + 1% fee (e.g., $5.05 for $5 purchase)
|
|
251
294
|
|
|
@@ -361,10 +404,17 @@ httpcat> positions
|
|
|
361
404
|
|
|
362
405
|
```bash
|
|
363
406
|
httpcat positions
|
|
407
|
+
httpcat positions --active # Only active positions
|
|
408
|
+
httpcat positions --graduated # Only graduated positions
|
|
364
409
|
httpcat -j positions
|
|
365
410
|
httpcat -k 0x... positions
|
|
366
411
|
```
|
|
367
412
|
|
|
413
|
+
**Options:**
|
|
414
|
+
|
|
415
|
+
- `-a, --active` - Show only active (non-graduated) positions
|
|
416
|
+
- `-g, --graduated` - Show only graduated positions (historical)
|
|
417
|
+
|
|
368
418
|
**Output:**
|
|
369
419
|
|
|
370
420
|
For each position:
|
|
@@ -385,6 +435,98 @@ Portfolio summary:
|
|
|
385
435
|
|
|
386
436
|
**Cost:** $0.01 USDC
|
|
387
437
|
|
|
438
|
+
### Claim LP Fees
|
|
439
|
+
|
|
440
|
+
View and claim accumulated liquidity provider fees for graduated tokens.
|
|
441
|
+
|
|
442
|
+
**Interactive:**
|
|
443
|
+
|
|
444
|
+
```bash
|
|
445
|
+
httpcat> claim "My Token" # View accumulated fees
|
|
446
|
+
httpcat> claim MTK # View by symbol
|
|
447
|
+
httpcat> claim MTK --execute # Claim fees
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
**CLI:**
|
|
451
|
+
|
|
452
|
+
```bash
|
|
453
|
+
httpcat claim "My Token"
|
|
454
|
+
httpcat claim MTK
|
|
455
|
+
httpcat claim MTK --execute
|
|
456
|
+
httpcat claim 0x1234... --execute
|
|
457
|
+
httpcat --json claim "My Token"
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
**Options:**
|
|
461
|
+
|
|
462
|
+
- `-e, --execute` - Execute the claim transaction (default is view-only)
|
|
463
|
+
- `-A, --address <address>` - Caller address (defaults to wallet address)
|
|
464
|
+
|
|
465
|
+
**Token Identifier:**
|
|
466
|
+
|
|
467
|
+
- Address, name, or symbol (same as buy/sell commands)
|
|
468
|
+
|
|
469
|
+
**Output:**
|
|
470
|
+
|
|
471
|
+
When viewing (without `--execute`):
|
|
472
|
+
- Total accumulated fees (tokens and USDC)
|
|
473
|
+
- Creator share (80%)
|
|
474
|
+
- Platform share (20%)
|
|
475
|
+
- LP lock status and details
|
|
476
|
+
- V4 position details (if applicable)
|
|
477
|
+
|
|
478
|
+
When claiming (with `--execute`):
|
|
479
|
+
- Transaction hash
|
|
480
|
+
- Fees claimed (tokens and USDC)
|
|
481
|
+
- Creator and platform shares distribution
|
|
482
|
+
|
|
483
|
+
**Cost:** Free to view, gas fees apply for claiming
|
|
484
|
+
|
|
485
|
+
### Transactions
|
|
486
|
+
|
|
487
|
+
Get paginated transaction history with filtering options.
|
|
488
|
+
|
|
489
|
+
**Interactive:**
|
|
490
|
+
|
|
491
|
+
```bash
|
|
492
|
+
httpcat> transactions
|
|
493
|
+
httpcat> transactions --type buy
|
|
494
|
+
httpcat> transactions --token abc123-...
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
**CLI:**
|
|
498
|
+
|
|
499
|
+
```bash
|
|
500
|
+
httpcat transactions
|
|
501
|
+
httpcat transactions --user 0x1234...
|
|
502
|
+
httpcat transactions --token abc123-... --type buy
|
|
503
|
+
httpcat transactions --type sell --limit 20
|
|
504
|
+
httpcat --json transactions --offset 50
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
**Options:**
|
|
508
|
+
|
|
509
|
+
- `-u, --user <address>` - Filter by user address (defaults to active account)
|
|
510
|
+
- `-t, --token <tokenId>` - Filter by token ID
|
|
511
|
+
- `-T, --type <type>` - Filter by type: `buy`, `sell`, or `airdrop`
|
|
512
|
+
- `-l, --limit <number>` - Number of results (default: 50, max: 100)
|
|
513
|
+
- `-o, --offset <number>` - Pagination offset (default: 0)
|
|
514
|
+
|
|
515
|
+
**Output:**
|
|
516
|
+
|
|
517
|
+
For each transaction:
|
|
518
|
+
- Transaction type (buy, sell, or airdrop)
|
|
519
|
+
- Status (pending, success, or failed)
|
|
520
|
+
- Token information (name, symbol, ID)
|
|
521
|
+
- User address
|
|
522
|
+
- Amount and fee
|
|
523
|
+
- Transaction hash
|
|
524
|
+
- Date/time
|
|
525
|
+
|
|
526
|
+
**Cost:** Varies based on API call
|
|
527
|
+
|
|
528
|
+
**Note:** Defaults to showing transactions for your active account. Use `--user` to view transactions for a different address.
|
|
529
|
+
|
|
388
530
|
### Check Balances
|
|
389
531
|
|
|
390
532
|
Check your wallet's ETH and USDC balances.
|
|
@@ -407,12 +549,64 @@ httpcat balances -k 0x...
|
|
|
407
549
|
- Wallet address
|
|
408
550
|
- ETH balance (for gas fees)
|
|
409
551
|
- USDC balance (for trading)
|
|
552
|
+
- CAT balance (402CAT token)
|
|
410
553
|
- Low balance warnings if applicable
|
|
411
554
|
|
|
412
555
|
**Cost:** Free (no payment required)
|
|
413
556
|
|
|
414
557
|
**Note:** If no private key is configured, you'll be prompted to enter it interactively (same as other commands).
|
|
415
558
|
|
|
559
|
+
### Account Management
|
|
560
|
+
|
|
561
|
+
Manage multiple accounts, view account information, and switch between accounts.
|
|
562
|
+
|
|
563
|
+
**Interactive:**
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
httpcat> account # Show active account info
|
|
567
|
+
httpcat> account list # List all accounts
|
|
568
|
+
httpcat> account switch 1 # Switch to account 1
|
|
569
|
+
httpcat> account add # Add new account
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
**CLI:**
|
|
573
|
+
|
|
574
|
+
```bash
|
|
575
|
+
httpcat account # Show active account
|
|
576
|
+
httpcat account list # List all accounts
|
|
577
|
+
httpcat account switch 1 # Switch to account 1
|
|
578
|
+
httpcat account add # Add new account
|
|
579
|
+
httpcat --account 2 positions # Use account 2 for positions
|
|
580
|
+
httpcat -a 1 buy MTK 0.10 # Use account 1 for buy
|
|
581
|
+
httpcat --json account
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
**Subcommands:**
|
|
585
|
+
|
|
586
|
+
- `account` (no args) - Display active account information (address, balances, positions)
|
|
587
|
+
- `account list` - List all configured accounts with their details
|
|
588
|
+
- `account switch <index>` - Switch to a different account by index
|
|
589
|
+
- `account add` - Add a new seed-derived account (HD wallet)
|
|
590
|
+
|
|
591
|
+
**Account Types:**
|
|
592
|
+
|
|
593
|
+
1. **Seed-Derived** (Account 1+) - Accounts generated from your seed phrase using BIP-32/BIP-39
|
|
594
|
+
2. **Custom** (Account 0) - Account added via private key import
|
|
595
|
+
|
|
596
|
+
**Output:**
|
|
597
|
+
|
|
598
|
+
Account information includes:
|
|
599
|
+
- Account index and type (Seed-Derived or Custom)
|
|
600
|
+
- Wallet address (checksummed)
|
|
601
|
+
- ETH balance (for gas fees)
|
|
602
|
+
- USDC balance (for trading)
|
|
603
|
+
- CAT balance (402CAT token)
|
|
604
|
+
- All positions (if any) with P&L
|
|
605
|
+
|
|
606
|
+
**Cost:** Free
|
|
607
|
+
|
|
608
|
+
**Security Note:** All accounts share the same password protection when password is enabled. Switch accounts anytime using the `--account` flag or `account switch` command.
|
|
609
|
+
|
|
416
610
|
### Health Check
|
|
417
611
|
|
|
418
612
|
Check if the agent is running.
|
|
@@ -461,6 +655,27 @@ httpcat -j -f stream-json chat MTK # Structured JSON input
|
|
|
461
655
|
- Token name: `"My Token"` (use quotes if it contains spaces)
|
|
462
656
|
- Token address: `0x1234...`
|
|
463
657
|
|
|
658
|
+
**In-Chat Commands:**
|
|
659
|
+
|
|
660
|
+
While in a chat session, you can use these commands:
|
|
661
|
+
|
|
662
|
+
- `/exit` or `/quit` - Exit the chat
|
|
663
|
+
- `/renew` - Renew your 10-minute lease
|
|
664
|
+
- `/buy <amount>` - Buy tokens (token-specific chats only)
|
|
665
|
+
- `/sell <amount>` - Sell tokens (token-specific chats only)
|
|
666
|
+
- `/help` - Show available commands
|
|
667
|
+
|
|
668
|
+
**Examples:**
|
|
669
|
+
|
|
670
|
+
```
|
|
671
|
+
/renew
|
|
672
|
+
/buy 0.10
|
|
673
|
+
/sell 50%
|
|
674
|
+
/sell all
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
**Note:** The `/buy` and `/sell` commands are only available in token-specific chats, not in general chat.
|
|
678
|
+
|
|
464
679
|
**Options:**
|
|
465
680
|
|
|
466
681
|
- `-f, --input-format <format>` - Input format (only works with `--json`): `"text"` (default) or `"stream-json"` (realtime streaming input)
|
|
@@ -471,6 +686,64 @@ httpcat -j -f stream-json chat MTK # Structured JSON input
|
|
|
471
686
|
|
|
472
687
|
**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.
|
|
473
688
|
|
|
689
|
+
### Cat / Agent
|
|
690
|
+
|
|
691
|
+
Interact with an AI-powered cat assistant that can help you with token operations, portfolio management, and more. **`agent` and `cat` are synonyms** - you can use either command name.
|
|
692
|
+
|
|
693
|
+
**Interactive:**
|
|
694
|
+
|
|
695
|
+
```bash
|
|
696
|
+
httpcat> agent "Buy 100 WOW tokens" # Ask the cat to do something
|
|
697
|
+
httpcat> cat "What tokens do I own?" # Same thing, different name
|
|
698
|
+
httpcat> agent --chat # Enter interactive chat mode
|
|
699
|
+
httpcat> cat --chat # Same thing
|
|
700
|
+
httpcat> agent --setup # Configure API key/provider
|
|
701
|
+
httpcat> cat --setup # Same thing
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
**CLI:**
|
|
705
|
+
|
|
706
|
+
```bash
|
|
707
|
+
httpcat agent "Buy 100 WOW tokens"
|
|
708
|
+
httpcat cat "What tokens do I own?"
|
|
709
|
+
httpcat agent --chat
|
|
710
|
+
httpcat cat --chat
|
|
711
|
+
httpcat agent --setup
|
|
712
|
+
httpcat cat --setup
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
**Usage:**
|
|
716
|
+
|
|
717
|
+
- `agent <query>` or `cat <query>` - Ask the cat to execute a task (e.g., "Buy WOW tokens", "Check my balance", "List my positions")
|
|
718
|
+
- `agent --chat` or `cat --chat` - Enter interactive chat mode for extended conversations
|
|
719
|
+
- `agent --setup` or `cat --setup` - Configure or reconfigure your AI provider (OpenAI or Anthropic) and API key
|
|
720
|
+
|
|
721
|
+
**First-Time Setup:**
|
|
722
|
+
|
|
723
|
+
Before using the cat/agent, you'll need to configure it:
|
|
724
|
+
|
|
725
|
+
```bash
|
|
726
|
+
httpcat> agent --setup
|
|
727
|
+
# or
|
|
728
|
+
httpcat> cat --setup
|
|
729
|
+
```
|
|
730
|
+
|
|
731
|
+
You'll be prompted to:
|
|
732
|
+
- Choose an AI provider (OpenAI or Anthropic)
|
|
733
|
+
- Enter your API key
|
|
734
|
+
- Select a model (defaults provided)
|
|
735
|
+
|
|
736
|
+
**How It Works:**
|
|
737
|
+
|
|
738
|
+
The cat uses an AI agent (powered by OpenAI GPT-4 or Anthropic Claude) to understand natural language requests and execute token operations on your behalf. It can:
|
|
739
|
+
- Buy and sell tokens
|
|
740
|
+
- Check balances and positions
|
|
741
|
+
- List tokens
|
|
742
|
+
- Get token information
|
|
743
|
+
- And more!
|
|
744
|
+
|
|
745
|
+
**Note:** The cat requires an API key from either OpenAI or Anthropic. Your API key is stored locally and encrypted, and is only sent to the LLM provider - never to any other server.
|
|
746
|
+
|
|
474
747
|
### Help
|
|
475
748
|
|
|
476
749
|
Display help information for httpcat.
|
|
@@ -922,8 +1195,7 @@ Create a new token on the bonding curve.
|
|
|
922
1195
|
|
|
923
1196
|
- `name` (string, required) - Token name (e.g., "My Token")
|
|
924
1197
|
- `symbol` (string, required) - Token symbol/ticker (3-10 characters)
|
|
925
|
-
- `photoUrl` (string, optional) - Photo URL for token logo
|
|
926
|
-
- `bannerUrl` (string, optional) - Banner image URL
|
|
1198
|
+
- `photoUrl` (string, optional) - Photo URL, file path, or base64 data URL for token logo
|
|
927
1199
|
- `websiteUrl` (string, optional) - Website URL
|
|
928
1200
|
- `privateKey` (string, optional) - Private key (overrides config/env)
|
|
929
1201
|
|
|
@@ -1214,6 +1486,18 @@ httpcat env add production http://production-agent:8787 -n base
|
|
|
1214
1486
|
httpcat env use production
|
|
1215
1487
|
```
|
|
1216
1488
|
|
|
1489
|
+
#### Update Environment
|
|
1490
|
+
|
|
1491
|
+
```bash
|
|
1492
|
+
# Update existing environment URL
|
|
1493
|
+
httpcat env update local http://localhost:8788
|
|
1494
|
+
|
|
1495
|
+
# Update environment with different network
|
|
1496
|
+
httpcat env update production http://prod-agent:8787 -n base
|
|
1497
|
+
```
|
|
1498
|
+
|
|
1499
|
+
Updates an existing environment's agent URL and optionally its network.
|
|
1500
|
+
|
|
1217
1501
|
#### Predefined Environments
|
|
1218
1502
|
|
|
1219
1503
|
- **local** - `http://localhost:8787` (base-sepolia)
|
|
@@ -1282,24 +1566,73 @@ Config is stored at `~/.config/httpcat/config.json`:
|
|
|
1282
1566
|
|
|
1283
1567
|
```json
|
|
1284
1568
|
{
|
|
1285
|
-
"
|
|
1569
|
+
"encryptedPrivateKey": "...",
|
|
1570
|
+
"encryptedSeedPhrase": "...",
|
|
1571
|
+
"password": "hashed_password",
|
|
1572
|
+
"passwordTimeoutMinutes": 15,
|
|
1573
|
+
"accounts": [
|
|
1574
|
+
{
|
|
1575
|
+
"index": 0,
|
|
1576
|
+
"type": "custom",
|
|
1577
|
+
"address": "0x...",
|
|
1578
|
+
"label": "Main Account"
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
"index": 1,
|
|
1582
|
+
"type": "seed",
|
|
1583
|
+
"address": "0x..."
|
|
1584
|
+
}
|
|
1585
|
+
],
|
|
1586
|
+
"activeAccountIndex": 0,
|
|
1286
1587
|
"network": "base-sepolia",
|
|
1287
1588
|
"agentUrl": "https://agent.402.cat",
|
|
1288
1589
|
"facilitatorUrl": "https://facilitators.x402scan.com",
|
|
1289
1590
|
"defaultMaxPayment": "10.00",
|
|
1591
|
+
"environment": "sepolia",
|
|
1592
|
+
"environments": {
|
|
1593
|
+
"local": {
|
|
1594
|
+
"name": "local",
|
|
1595
|
+
"agentUrl": "http://localhost:8787",
|
|
1596
|
+
"network": "base-sepolia"
|
|
1597
|
+
},
|
|
1598
|
+
"sepolia": {
|
|
1599
|
+
"name": "sepolia",
|
|
1600
|
+
"agentUrl": "https://agent.402.cat",
|
|
1601
|
+
"network": "base-sepolia"
|
|
1602
|
+
}
|
|
1603
|
+
},
|
|
1290
1604
|
"preferences": {
|
|
1291
1605
|
"enableAsciiArt": true,
|
|
1292
1606
|
"colorOutput": true,
|
|
1293
1607
|
"verboseLogging": false
|
|
1608
|
+
},
|
|
1609
|
+
"aiAgent": {
|
|
1610
|
+
"provider": "openai",
|
|
1611
|
+
"apiKey": "encrypted_key_here",
|
|
1612
|
+
"model": "gpt-4"
|
|
1294
1613
|
}
|
|
1295
1614
|
}
|
|
1296
1615
|
```
|
|
1297
1616
|
|
|
1298
|
-
**Security
|
|
1617
|
+
**Security Features:**
|
|
1618
|
+
|
|
1619
|
+
- **Password Protection**: Set a password during setup to encrypt your private keys and seed phrase
|
|
1620
|
+
- **Session Management**: Configurable timeout (default: 15 minutes via `passwordTimeoutMinutes`)
|
|
1621
|
+
- **Multi-Account Support**: Manage multiple accounts (seed-derived HD wallet accounts and custom imported accounts)
|
|
1622
|
+
- **Encrypted Storage**: Keys and seed phrases are encrypted when password is enabled
|
|
1623
|
+
- **Account Types**:
|
|
1624
|
+
- **Seed-Derived** (Account 1+): Generated from your seed phrase using BIP-32/BIP-39
|
|
1625
|
+
- **Custom** (Account 0): Imported via private key
|
|
1626
|
+
|
|
1627
|
+
**Security Notes:**
|
|
1299
1628
|
|
|
1300
|
-
-
|
|
1301
|
-
-
|
|
1302
|
-
-
|
|
1629
|
+
- **Without password**: Private key stored in plain text (legacy `privateKey` field, auto-migrated to encrypted format)
|
|
1630
|
+
- **With password**: Private key, seed phrase, and AI API keys are encrypted
|
|
1631
|
+
- **For production use**:
|
|
1632
|
+
- Enable password protection during setup for encryption
|
|
1633
|
+
- Use `HTTPCAT_PRIVATE_KEY` environment variable for additional security
|
|
1634
|
+
- Set restrictive file permissions: `chmod 600 ~/.config/httpcat/config.json`
|
|
1635
|
+
- Use a dedicated wallet with limited funds
|
|
1303
1636
|
|
|
1304
1637
|
## How It Works
|
|
1305
1638
|
|
|
Binary file
|
package/bun.lock
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"": {
|
|
6
6
|
"name": "httpcat-cli",
|
|
7
7
|
"dependencies": {
|
|
8
|
+
"@ax-llm/ax": "^15.1.1",
|
|
8
9
|
"@modelcontextprotocol/sdk": "^1.23.0",
|
|
9
10
|
"@scure/bip32": "^2.0.1",
|
|
10
11
|
"@scure/bip39": "^2.0.1",
|
|
@@ -43,6 +44,8 @@
|
|
|
43
44
|
"packages": {
|
|
44
45
|
"@adraffy/ens-normalize": ["@adraffy/ens-normalize@1.11.1", "", {}, "sha512-nhCBV3quEgesuf7c7KYfperqSS14T8bYuvJ8PcLJp6znkZpFc0AuW4qBtr8eKVyPPe/8RSr7sglCWPU5eaxwKQ=="],
|
|
45
46
|
|
|
47
|
+
"@ax-llm/ax": ["@ax-llm/ax@15.1.1", "", { "dependencies": { "@opentelemetry/api": "^1.9.0", "dayjs": "^1.11.13" } }, "sha512-gKd0m+Fuw6xeAB+nAOVtfhLaGBjYhenQCOH7WwpmkP6bfbaAJ0BB0yci7alomjIvMDjv5j93ejCexQvti/FQZg=="],
|
|
48
|
+
|
|
46
49
|
"@babel/code-frame": ["@babel/code-frame@7.27.1", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg=="],
|
|
47
50
|
|
|
48
51
|
"@babel/compat-data": ["@babel/compat-data@7.28.5", "", {}, "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA=="],
|
|
@@ -281,6 +284,8 @@
|
|
|
281
284
|
|
|
282
285
|
"@noble/hashes": ["@noble/hashes@2.0.1", "", {}, "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw=="],
|
|
283
286
|
|
|
287
|
+
"@opentelemetry/api": ["@opentelemetry/api@1.9.0", "", {}, "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg=="],
|
|
288
|
+
|
|
284
289
|
"@paulmillr/qr": ["@paulmillr/qr@0.2.1", "", {}, "sha512-IHnV6A+zxU7XwmKFinmYjUcwlyK9+xkG3/s9KcQhI9BjQKycrJ1JRO+FbNYPwZiPKW3je/DR0k7w8/gLa5eaxQ=="],
|
|
285
290
|
|
|
286
291
|
"@pkgr/core": ["@pkgr/core@0.2.9", "", {}, "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA=="],
|