@t2000/cli 0.2.5 → 0.2.6

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 +52 -21
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -43,11 +43,13 @@ npm install -g @t2000/cli
43
43
  npm install -g @t2000/cli
44
44
 
45
45
  t2000 balance check for funds
46
- t2000 save all USDC start earning yield
46
+ t2000 save all start earning yield
47
47
  t2000 address show address again
48
48
 
49
49
  ❯ t2000 send 10 USDC to 0x8b3e...d412
50
50
  ✓ Sent $10.00 USDC → 0x8b3e...d412
51
+ Gas: 0.0042 SUI (self-funded)
52
+ Balance: $90.00 USDC
51
53
  Tx: https://suiscan.xyz/mainnet/tx/0xa1b2...
52
54
 
53
55
  ❯ t2000 save 80 USDC
@@ -62,8 +64,8 @@ npm install -g @t2000/cli
62
64
  Health Factor: 3.39
63
65
  Tx: https://suiscan.xyz/mainnet/tx/0xb3c4...
64
66
 
65
- ❯ t2000 swap 5 USDC to SUI
66
- ✓ Swapped 5 USDC → 5.83 SUI
67
+ ❯ t2000 swap 5 USDC SUI
68
+ ✓ Swapped 5 USDC → 5.8300 SUI
67
69
  Tx: https://suiscan.xyz/mainnet/tx/0xd5e6...
68
70
 
69
71
  ❯ t2000 pay https://data.api.com/prices
@@ -100,6 +102,7 @@ npm install -g @t2000/cli
100
102
  | `t2000 init` | Create a new agent bank account (Ed25519 keypair, AES-256-GCM encrypted) |
101
103
  | `t2000 lock` | Clear saved session (require PIN on next command) |
102
104
  | `t2000 balance` | Show available USDC + savings + gas reserve |
105
+ | `t2000 balance --show-limits` | Include maxWithdraw, maxBorrow, and health factor |
103
106
  | `t2000 address` | Show wallet address |
104
107
  | `t2000 deposit` | Show funding instructions |
105
108
  | `t2000 import` | Import an existing bank account from private key |
@@ -110,16 +113,17 @@ npm install -g @t2000/cli
110
113
 
111
114
  | Command | Description |
112
115
  |---------|-------------|
113
- | `t2000 send <amount> USDC to <address>` | Send USDC to any Sui address |
116
+ | `t2000 send <amount> USDC to <address>` | Send USDC to any Sui address (the `to` keyword is optional) |
114
117
 
115
118
  ### Savings & DeFi
116
119
 
117
120
  | Command | Description |
118
121
  |---------|-------------|
119
- | `t2000 save <amount> USDC` | Deposit USDC to NAVI Protocol (earn ~4–8% APY) |
120
- | `t2000 withdraw <amount> USDC` | Withdraw USDC from savings |
121
- | `t2000 borrow <amount> USDC` | Borrow USDC against savings collateral |
122
- | `t2000 repay <amount> USDC` | Repay outstanding borrows |
122
+ | `t2000 save <amount> [asset]` | Deposit to NAVI Protocol (earn ~4–8% APY). Asset defaults to USDC. |
123
+ | `t2000 save all` | Deposit all available USDC |
124
+ | `t2000 withdraw <amount> [asset]` | Withdraw from savings |
125
+ | `t2000 borrow <amount> [asset]` | Borrow against savings collateral |
126
+ | `t2000 repay <amount> [asset]` | Repay outstanding borrows. Use `repay all` for full repayment. |
123
127
  | `t2000 swap <amount> <from> <to>` | Swap via Cetus DEX (e.g. `swap 5 USDC SUI`) |
124
128
  | `t2000 health` | Check savings health factor |
125
129
  | `t2000 rates` | Current NAVI save/borrow APYs |
@@ -134,12 +138,15 @@ npm install -g @t2000/cli
134
138
  | `t2000 pay <url>` | Pay for an x402-protected API resource |
135
139
  | `t2000 pay <url> --max-price 0.10` | Set max USDC per request (default: $1.00) |
136
140
  | `t2000 pay <url> --method POST --data '{...}'` | POST with JSON body |
141
+ | `t2000 pay <url> --header 'key=value'` | Add custom HTTP headers (repeatable) |
142
+ | `t2000 pay <url> --timeout 60` | Request timeout in seconds (default: 30) |
143
+ | `t2000 pay <url> --dry-run` | Show what would be paid without paying |
137
144
 
138
145
  ### Configuration
139
146
 
140
147
  | Command | Description |
141
148
  |---------|-------------|
142
- | `t2000 config get <key>` | Show a config value |
149
+ | `t2000 config get [key]` | Show a config value (omit key for all) |
143
150
  | `t2000 config set <key> <value>` | Set a config value |
144
151
 
145
152
  ### HTTP API Server
@@ -155,14 +162,27 @@ curl -X POST -H "Authorization: Bearer t2k_..." \
155
162
  http://localhost:3001/v1/send
156
163
  ```
157
164
 
158
- ## Flags
165
+ | Option | Description | Default |
166
+ |--------|-------------|---------|
167
+ | `--port <port>` | Port number | `3001` |
168
+ | `--rate-limit <rps>` | Max requests per second | `10` |
169
+
170
+ ## Global Flags
159
171
 
160
172
  | Flag | Description |
161
173
  |------|-------------|
162
174
  | `--json` | Structured JSON output (for automation) |
163
175
  | `--yes` | Skip confirmation prompts |
164
- | `--key <path>` | Custom key file path |
165
- | `--network <net>` | `mainnet` or `testnet` |
176
+
177
+ ## Per-Command Options
178
+
179
+ | Command | Option | Description | Default |
180
+ |---------|--------|-------------|---------|
181
+ | `init` | `--name <name>` | Agent name | — |
182
+ | `init` | `--no-sponsor` | Skip gas sponsorship | — |
183
+ | `swap` | `--slippage <percent>` | Max slippage % | `3` |
184
+ | `history` | `--limit <n>` | Number of transactions | `20` |
185
+ | Most commands | `--key <path>` | Custom key file path | `~/.t2000/wallet.key` |
166
186
 
167
187
  ## Configuration
168
188
 
@@ -178,19 +198,30 @@ Config is stored at `~/.t2000/config.json`.
178
198
  | Variable | Description |
179
199
  |----------|-------------|
180
200
  | `T2000_PIN` | Bank account PIN (skip interactive prompt) |
181
- | `T2000_NETWORK` | Override network (`mainnet` / `testnet`) |
182
- | `T2000_KEY_PATH` | Custom key file path |
201
+ | `T2000_PRIVATE_KEY` | Private key for `t2000 import` (skip interactive prompt) |
183
202
 
184
203
  ## Gas Handling
185
204
 
186
205
  Gas is fully automated:
187
206
 
188
- 1. **Sponsored** — early transactions are free via the t2000 Gas Station
189
- 2. **Self-funded** — uses SUI balance after bootstrap
190
- 3. **Auto-topup** — swaps $1 USDC SUI when gas reserve is low
207
+ 1. **Self-funded** — uses SUI balance when reserve 0.05 SUI
208
+ 2. **Auto-topup** — swaps $1 USDC → SUI when gas reserve is low
209
+ 3. **Sponsored** — Gas Station sponsors the transaction as a fallback
191
210
 
192
211
  You never need to manually acquire SUI for gas.
193
212
 
213
+ ## Protocol Fees
214
+
215
+ | Operation | Fee |
216
+ |-----------|-----|
217
+ | Save | 0.1% |
218
+ | Borrow | 0.05% |
219
+ | Swap | **Free** |
220
+ | Withdraw | Free |
221
+ | Repay | Free |
222
+ | Send | Free |
223
+ | Pay (x402) | Free |
224
+
194
225
  ## File Locations
195
226
 
196
227
  | File | Path | Description |
@@ -203,13 +234,13 @@ You never need to manually acquire SUI for gas.
203
234
  ```bash
204
235
  # Full DeFi cycle
205
236
  t2000 save all USDC # Deposit all available USDC
206
- t2000 borrow 40 USDC # Borrow against it
207
- t2000 repay 40 USDC # Pay it back
208
- t2000 withdraw all USDC # Get everything out
237
+ t2000 borrow 40 USDC # Borrow against it
238
+ t2000 repay 40 USDC # Pay it back
239
+ t2000 withdraw all USDC # Get everything out
209
240
 
210
241
  # Automation-friendly (no prompts, JSON output)
211
242
  t2000 balance --json
212
- t2000 send 10 USDC to 0x... --yes --json
243
+ t2000 save 10 USDC --yes --json
213
244
 
214
245
  # Use with AI coding agents
215
246
  export T2000_PIN="agent-secret"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t2000/cli",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "CLI bank account for AI agents on Sui — send, save, swap, borrow from your terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -37,8 +37,8 @@
37
37
  "commander": "^13",
38
38
  "hono": "^4",
39
39
  "picocolors": "^1",
40
- "@t2000/sdk": "0.2.5",
41
- "@t2000/x402": "0.2.4"
40
+ "@t2000/sdk": "0.2.6",
41
+ "@t2000/x402": "0.2.6"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "^22",