@paylobster/cli 4.0.0 → 4.0.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 +82 -272
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,93 +1,33 @@
|
|
|
1
1
|
# 🦞 PayLobster CLI (`plob`)
|
|
2
2
|
|
|
3
|
-
Command-line interface for PayLobster
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- 🔐 **Wallet Management** - Secure keystore or environment variable authentication
|
|
8
|
-
- 🆔 **Agent Registration** - Register your agent identity on-chain
|
|
9
|
-
- 💰 **Payments & Escrow** - Create, list, and release escrow payments
|
|
10
|
-
- ⭐ **Reputation** - Check agent reputation scores
|
|
11
|
-
- 📊 **Status Dashboard** - View balances, credit, and account status
|
|
12
|
-
- 🛠️ **Network Support** - Base Mainnet and Sepolia testnet
|
|
3
|
+
Command-line interface for PayLobster — agent payment infrastructure on Base.
|
|
13
4
|
|
|
14
5
|
## Installation
|
|
15
6
|
|
|
16
|
-
### From npm (when published)
|
|
17
|
-
|
|
18
7
|
```bash
|
|
19
8
|
npm install -g @paylobster/cli
|
|
20
9
|
```
|
|
21
10
|
|
|
22
|
-
### From source
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
git clone https://github.com/itsGustav/Pay-Lobster.git
|
|
26
|
-
cd Pay-Lobster/cli
|
|
27
|
-
npm install
|
|
28
|
-
npm run build
|
|
29
|
-
npm link
|
|
30
|
-
```
|
|
31
|
-
|
|
32
11
|
## Quick Start
|
|
33
12
|
|
|
34
|
-
### 1. Configure Network
|
|
35
|
-
|
|
36
13
|
```bash
|
|
37
|
-
#
|
|
38
|
-
plob
|
|
39
|
-
|
|
40
|
-
# Or use mainnet
|
|
41
|
-
plob config set network mainnet
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### 2. Set Up Wallet
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
# Option 1: Use environment variable (recommended for production)
|
|
14
|
+
# 1. Set up your wallet
|
|
15
|
+
plob auth --private-key 0x...
|
|
16
|
+
# Or use environment variable
|
|
48
17
|
export PRIVATE_KEY="0x..."
|
|
49
18
|
plob auth --env PRIVATE_KEY
|
|
50
19
|
|
|
51
|
-
#
|
|
52
|
-
plob
|
|
53
|
-
|
|
20
|
+
# 2. Configure network
|
|
21
|
+
plob config set network mainnet # Base Mainnet
|
|
22
|
+
plob config set network sepolia # Base Sepolia (testnet)
|
|
54
23
|
|
|
55
|
-
|
|
24
|
+
# 3. Register your agent
|
|
25
|
+
plob register --name "my-agent" --capabilities "code-review,analysis"
|
|
56
26
|
|
|
57
|
-
|
|
58
|
-
plob register --name "my-coding-agent" --capabilities "code-review,bug-fix"
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### 4. Check Status
|
|
62
|
-
|
|
63
|
-
```bash
|
|
27
|
+
# 4. Check status
|
|
64
28
|
plob status
|
|
65
29
|
```
|
|
66
30
|
|
|
67
|
-
Output:
|
|
68
|
-
```
|
|
69
|
-
🦞 PayLobster Agent Status
|
|
70
|
-
────────────────────────────
|
|
71
|
-
Name: my-coding-agent
|
|
72
|
-
Address: 0x742d...3f8a
|
|
73
|
-
────────────────────────────
|
|
74
|
-
Network: Base Sepolia
|
|
75
|
-
Registered: ✅
|
|
76
|
-
Agent ID: 42
|
|
77
|
-
|
|
78
|
-
💰 Balances
|
|
79
|
-
USDC: 125.50 USDC
|
|
80
|
-
ETH: 0.05 ETH
|
|
81
|
-
|
|
82
|
-
💳 Credit
|
|
83
|
-
Limit: 1000 USDC
|
|
84
|
-
Available: 750 USDC
|
|
85
|
-
In Use: 250 USDC
|
|
86
|
-
|
|
87
|
-
⭐ Reputation: ★★★★☆ 85
|
|
88
|
-
📦 Escrows: 3 total
|
|
89
|
-
```
|
|
90
|
-
|
|
91
31
|
## Commands
|
|
92
32
|
|
|
93
33
|
### `plob auth`
|
|
@@ -95,95 +35,49 @@ Agent ID: 42
|
|
|
95
35
|
Configure wallet authentication.
|
|
96
36
|
|
|
97
37
|
```bash
|
|
98
|
-
|
|
99
|
-
plob auth --
|
|
100
|
-
|
|
101
|
-
# Use environment variable
|
|
102
|
-
plob auth --env PRIVATE_KEY
|
|
103
|
-
|
|
104
|
-
# Check current wallet
|
|
105
|
-
plob auth
|
|
38
|
+
plob auth --private-key 0x... # Save to keystore
|
|
39
|
+
plob auth --env PRIVATE_KEY # Use env variable
|
|
40
|
+
plob auth # Show current wallet
|
|
106
41
|
```
|
|
107
42
|
|
|
108
43
|
### `plob config`
|
|
109
44
|
|
|
110
|
-
Manage
|
|
45
|
+
Manage configuration.
|
|
111
46
|
|
|
112
47
|
```bash
|
|
113
|
-
# Show current config
|
|
114
|
-
plob config
|
|
115
|
-
|
|
116
|
-
#
|
|
117
|
-
plob config set network sepolia
|
|
118
|
-
plob config set network mainnet
|
|
119
|
-
|
|
120
|
-
# Set custom RPC
|
|
121
|
-
plob config set rpcUrl https://your-rpc.com
|
|
122
|
-
|
|
123
|
-
# Reset to defaults
|
|
124
|
-
plob config reset
|
|
48
|
+
plob config show # Show current config
|
|
49
|
+
plob config set network mainnet # Set network
|
|
50
|
+
plob config set rpcUrl https://base-rpc.publicnode.com
|
|
51
|
+
plob config reset # Reset to defaults
|
|
125
52
|
```
|
|
126
53
|
|
|
127
54
|
### `plob register`
|
|
128
55
|
|
|
129
|
-
Register
|
|
56
|
+
Register agent identity on-chain.
|
|
130
57
|
|
|
131
58
|
```bash
|
|
132
|
-
plob register
|
|
133
|
-
--name "my-agent" \
|
|
134
|
-
--capabilities "code-review,bug-fix,testing"
|
|
59
|
+
plob register --name "my-agent" --capabilities "code-review,testing"
|
|
135
60
|
```
|
|
136
61
|
|
|
137
62
|
### `plob status`
|
|
138
63
|
|
|
139
|
-
View
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
# Pretty output
|
|
143
|
-
plob status
|
|
144
|
-
|
|
145
|
-
# JSON output
|
|
146
|
-
plob status --json
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### `plob escrow create`
|
|
150
|
-
|
|
151
|
-
Create a new escrow payment.
|
|
64
|
+
View agent status, balances, and reputation.
|
|
152
65
|
|
|
153
66
|
```bash
|
|
154
|
-
plob
|
|
155
|
-
|
|
156
|
-
--amount 50 \
|
|
157
|
-
--description "Code review for PR #123"
|
|
67
|
+
plob status # Pretty output
|
|
68
|
+
plob status --json # Machine-readable
|
|
158
69
|
```
|
|
159
70
|
|
|
160
|
-
### `plob escrow
|
|
71
|
+
### `plob escrow`
|
|
161
72
|
|
|
162
|
-
|
|
73
|
+
Create and manage escrow payments.
|
|
163
74
|
|
|
164
75
|
```bash
|
|
76
|
+
plob escrow create --to 0x... --amount 50
|
|
165
77
|
plob escrow list
|
|
166
|
-
plob escrow list --json
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### `plob escrow get`
|
|
170
|
-
|
|
171
|
-
Get escrow details.
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
78
|
plob escrow get <escrow-id>
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
### `plob escrow release`
|
|
178
|
-
|
|
179
|
-
Release funds from an escrow (sender only).
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
# With confirmation prompt
|
|
183
79
|
plob escrow release <escrow-id>
|
|
184
|
-
|
|
185
|
-
# Skip confirmation
|
|
186
|
-
plob escrow release <escrow-id> --yes
|
|
80
|
+
plob escrow release <escrow-id> --yes # Skip confirmation
|
|
187
81
|
```
|
|
188
82
|
|
|
189
83
|
### `plob pay`
|
|
@@ -191,187 +85,103 @@ plob escrow release <escrow-id> --yes
|
|
|
191
85
|
Quick payment (creates escrow).
|
|
192
86
|
|
|
193
87
|
```bash
|
|
194
|
-
plob pay
|
|
195
|
-
--to 0x9a3c...7b21 \
|
|
196
|
-
--amount 25 \
|
|
197
|
-
--description "Bug fix payment"
|
|
88
|
+
plob pay --to 0x... --amount 25 --description "Bug fix"
|
|
198
89
|
```
|
|
199
90
|
|
|
200
91
|
### `plob reputation`
|
|
201
92
|
|
|
202
|
-
Check reputation
|
|
93
|
+
Check reputation scores.
|
|
203
94
|
|
|
204
95
|
```bash
|
|
205
|
-
#
|
|
206
|
-
plob reputation
|
|
207
|
-
|
|
208
|
-
# Check someone else's reputation
|
|
209
|
-
plob reputation 0x9a3c...7b21
|
|
96
|
+
plob reputation # Your reputation
|
|
97
|
+
plob reputation 0x... # Someone else's
|
|
98
|
+
plob reputation --json
|
|
210
99
|
```
|
|
211
100
|
|
|
212
101
|
### `plob mandate`
|
|
213
102
|
|
|
214
|
-
Manage
|
|
103
|
+
Manage spending mandates.
|
|
215
104
|
|
|
216
105
|
```bash
|
|
217
106
|
plob mandate create --agent 0x... --limit 100 --duration 30
|
|
218
107
|
plob mandate list
|
|
219
108
|
plob mandate revoke <id>
|
|
109
|
+
plob mandate adjust <id> --limit 200
|
|
220
110
|
```
|
|
221
111
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
Configuration is stored in `~/.plob/config.json`.
|
|
225
|
-
|
|
226
|
-
Default configuration:
|
|
227
|
-
```json
|
|
228
|
-
{
|
|
229
|
-
"network": "sepolia",
|
|
230
|
-
"indexerUrl": "https://api.thegraph.com/subgraphs/name/paylobster/registry"
|
|
231
|
-
}
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
## Wallet Security
|
|
235
|
-
|
|
236
|
-
### Environment Variable (Recommended for Production)
|
|
237
|
-
|
|
238
|
-
```bash
|
|
239
|
-
export PRIVATE_KEY="0x..."
|
|
240
|
-
plob status
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
### Keystore File (Development)
|
|
244
|
-
|
|
245
|
-
Private keys are stored in `~/.plob/keystore/` with restricted permissions (0600).
|
|
112
|
+
### All Commands
|
|
246
113
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
114
|
+
| Command | Description |
|
|
115
|
+
|---------|-------------|
|
|
116
|
+
| `plob auth` | Set up wallet authentication |
|
|
117
|
+
| `plob config` | Get/set configuration |
|
|
118
|
+
| `plob register` | Register agent identity on-chain |
|
|
119
|
+
| `plob status` | View balances, credit, account info |
|
|
120
|
+
| `plob escrow` | Create, list, get, release escrows |
|
|
121
|
+
| `plob pay` | Quick payment (creates escrow) |
|
|
122
|
+
| `plob reputation` | Check agent reputation |
|
|
123
|
+
| `plob mandate` | Create, list, revoke spending mandates |
|
|
251
124
|
|
|
252
|
-
|
|
125
|
+
All commands support `--json` for automation.
|
|
253
126
|
|
|
254
|
-
|
|
255
|
-
- Chain ID: 84532
|
|
256
|
-
- RPC: https://sepolia.base.org
|
|
257
|
-
- Block Explorer: https://sepolia.basescan.org
|
|
127
|
+
## Contract Addresses
|
|
258
128
|
|
|
259
129
|
### Base Mainnet
|
|
260
|
-
- Chain ID: 8453
|
|
261
|
-
- RPC: https://mainnet.base.org
|
|
262
|
-
- Block Explorer: https://basescan.org
|
|
263
|
-
|
|
264
|
-
## Error Handling
|
|
265
130
|
|
|
266
|
-
|
|
131
|
+
| Contract | Address |
|
|
132
|
+
|----------|---------|
|
|
133
|
+
| Identity | `0xA174ee274F870631B3c330a85EBCad74120BE662` |
|
|
134
|
+
| Reputation | `0x02bb4132a86134684976E2a52E43D59D89E64b29` |
|
|
135
|
+
| Credit | `0xD9241Ce8a721Ef5fcCAc5A11983addC526eC80E1` |
|
|
136
|
+
| Escrow V3 | `0x49EdEe04c78B7FeD5248A20706c7a6c540748806` |
|
|
137
|
+
| USDC | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` |
|
|
267
138
|
|
|
268
|
-
|
|
269
|
-
- Exit code `1`: Error
|
|
270
|
-
|
|
271
|
-
### Common Issues
|
|
139
|
+
### Base Sepolia
|
|
272
140
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
141
|
+
| Contract | Address |
|
|
142
|
+
|----------|---------|
|
|
143
|
+
| Identity | `0x3dfA02Ed4F0e4F10E8031d7a4cB8Ea0bBbFbCB8c` |
|
|
144
|
+
| Reputation | `0xb0033901e3b94f4F36dA0b3e59A1F4AD9f4f1697` |
|
|
145
|
+
| Credit | `0xBA64e2b2F2a80D03A4B13b3396942C1e78205C7d` |
|
|
146
|
+
| Escrow V3 | `0x78D1f50a1965dE34f6b5a3D3546C94FE1809Cd82` |
|
|
147
|
+
| USDC | `0x036CbD53842c5426634e7929541eC2318f3dCF7e` |
|
|
278
148
|
|
|
279
|
-
|
|
280
|
-
```bash
|
|
281
|
-
# Solution: Fund your wallet with USDC
|
|
282
|
-
# Bridge USDC to Base or buy from an exchange
|
|
283
|
-
```
|
|
149
|
+
## Networks
|
|
284
150
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
```
|
|
151
|
+
| Network | Chain ID | RPC |
|
|
152
|
+
|---------|----------|-----|
|
|
153
|
+
| Base Mainnet | 8453 | `https://base-rpc.publicnode.com` |
|
|
154
|
+
| Base Sepolia | 84532 | `https://base-sepolia-rpc.publicnode.com` |
|
|
290
155
|
|
|
291
|
-
##
|
|
156
|
+
## Configuration
|
|
292
157
|
|
|
293
|
-
|
|
158
|
+
Stored in `~/.plob/config.json`:
|
|
294
159
|
|
|
295
|
-
```bash
|
|
296
|
-
plob status --json
|
|
297
|
-
plob escrow list --json
|
|
298
|
-
plob reputation --json
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
Example JSON output:
|
|
302
160
|
```json
|
|
303
161
|
{
|
|
304
|
-
"
|
|
305
|
-
"
|
|
306
|
-
"registered": true,
|
|
307
|
-
"balance": {
|
|
308
|
-
"usdc": "125.50",
|
|
309
|
-
"eth": "0.05"
|
|
310
|
-
},
|
|
311
|
-
"reputation": 85
|
|
162
|
+
"network": "mainnet",
|
|
163
|
+
"rpcUrl": "https://base-rpc.publicnode.com"
|
|
312
164
|
}
|
|
313
165
|
```
|
|
314
166
|
|
|
315
|
-
##
|
|
316
|
-
|
|
317
|
-
### Build
|
|
318
|
-
|
|
319
|
-
```bash
|
|
320
|
-
npm run build
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
### Run without building
|
|
324
|
-
|
|
325
|
-
```bash
|
|
326
|
-
npm run dev -- status
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
### Link locally
|
|
330
|
-
|
|
331
|
-
```bash
|
|
332
|
-
npm run link
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
### Test
|
|
336
|
-
|
|
337
|
-
```bash
|
|
338
|
-
npm test
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
## Contract Addresses
|
|
342
|
-
|
|
343
|
-
### Base Mainnet
|
|
344
|
-
- Identity: `0xA174f250380c4B5C37F6709bBa719E662b77E662`
|
|
345
|
-
- Reputation: `0x02bb4c4cd10EeaCD04DF7631c81d6E7c1d0c4b29`
|
|
346
|
-
- Credit: `0xD924B81F2d8EFF3E0A3Bf0a4b9D77d37CC0980E1`
|
|
347
|
-
- Escrow: `0x49Ed7003C6941a033E7dD8b44552e4E18cf28806`
|
|
348
|
-
- USDC: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`
|
|
167
|
+
## Wallet Security
|
|
349
168
|
|
|
350
|
-
|
|
351
|
-
-
|
|
352
|
-
-
|
|
353
|
-
- Credit: `0xBA64e2b2F2a80D03A4B13b3396942C1e78205C7d`
|
|
354
|
-
- Escrow: `0x78D1f50a1965dE34f6b5a3D3546C94FE1809Cd82`
|
|
355
|
-
- USDC: `0x036CbD53842c5426634e7929541eC2318f3dCF7e`
|
|
169
|
+
- **Environment variables** (recommended for production): `export PRIVATE_KEY="0x..."`
|
|
170
|
+
- **Keystore files** (development): stored in `~/.plob/keystore/` with restricted permissions (0600)
|
|
171
|
+
- ⚠️ For production: use hardware wallets or encrypted key management
|
|
356
172
|
|
|
357
173
|
## Resources
|
|
358
174
|
|
|
359
|
-
- **Website**: https://paylobster.com
|
|
360
|
-
- **Docs**: https://
|
|
361
|
-
- **
|
|
362
|
-
- **
|
|
175
|
+
- **Website**: [paylobster.com](https://paylobster.com)
|
|
176
|
+
- **Docs**: [paylobster.com/docs](https://paylobster.com/docs)
|
|
177
|
+
- **Discord**: [discord.gg/ntWQB6g2jt](https://discord.gg/ntWQB6g2jt)
|
|
178
|
+
- **SDK**: [npmjs.com/package/pay-lobster](https://www.npmjs.com/package/pay-lobster)
|
|
179
|
+
- **MCP Server**: [npmjs.com/package/@paylobster/mcp-server](https://www.npmjs.com/package/@paylobster/mcp-server)
|
|
363
180
|
|
|
364
181
|
## License
|
|
365
182
|
|
|
366
|
-
MIT © PayLobster
|
|
367
|
-
|
|
368
|
-
## Support
|
|
369
|
-
|
|
370
|
-
Need help?
|
|
371
|
-
- Open an issue on GitHub
|
|
372
|
-
- Join our Discord
|
|
373
|
-
- Email: dev@paylobster.com
|
|
183
|
+
MIT © PayLobster
|
|
374
184
|
|
|
375
185
|
---
|
|
376
186
|
|
|
377
|
-
Built
|
|
187
|
+
**Built for the agent economy** 🦞
|