@agentis-hq/cli 0.1.0 → 0.1.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 +281 -0
- package/assets/agentis-help.png +0 -0
- package/dist/index.js +283 -0
- package/package.json +4 -2
package/README.md
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# Agentis CLI
|
|
2
|
+
|
|
3
|
+
Command line tools for Agentis, the financial infrastructure layer for AI agents on Solana.
|
|
4
|
+
|
|
5
|
+
The CLI lets you create agent wallets, manage spend policies, pay MPP and x402 URLs, work with Umbra privacy flows, deposit idle USDC into Jupiter Earn, and scaffold x402 facilitators.
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Run without installing:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @agentis-hq/cli --help
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or install globally:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @agentis-hq/cli
|
|
21
|
+
agentis --help
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
With Bun:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
bun x @agentis-hq/cli --help
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Backend URL
|
|
31
|
+
|
|
32
|
+
By default, the CLI talks to the hosted Agentis API:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
https://api.agentis.systems
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
To point the CLI at a local or self-hosted backend:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
AGENTIS_API_URL=http://localhost:3001 agentis agent list
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Authentication
|
|
45
|
+
|
|
46
|
+
Hosted wallets and hosted agents require an Agentis account key. The CLI gets one through the browser login flow and stores it in your OS keychain.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
agentis login
|
|
50
|
+
agentis whoami
|
|
51
|
+
agentis logout
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Local encrypted wallets do not require login.
|
|
55
|
+
|
|
56
|
+
## Wallets
|
|
57
|
+
|
|
58
|
+
Create a hosted wallet when logged in:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
agentis wallet create --name my-agent
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Create a local encrypted wallet:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
agentis wallet create --name local-agent --local
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
List hosted and local wallets:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
agentis wallet list
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Hosted Agents
|
|
77
|
+
|
|
78
|
+
List agents:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
agentis agent list
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Create a hosted agent:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
agentis agent create research-agent
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Create an agent in Quasar on-chain policy mode:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
agentis agent create policy-agent --onchain-policy
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Check balances:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
agentis agent balance research-agent
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Send SOL. Amount is lamports by default:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
agentis agent send research-agent <recipient-wallet> 1000000
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Send using SOL units:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
agentis agent send research-agent <recipient-wallet> 0.01 --sol
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Paid Fetch
|
|
115
|
+
|
|
116
|
+
Fetch a URL and let Agentis automatically pay MPP or x402 payment requests through the selected hosted agent:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
agentis fetch https://example.com/paid-data --agent research-agent
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Use a different HTTP method:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
agentis fetch https://example.com/paid-data --agent research-agent --method POST
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Policies
|
|
129
|
+
|
|
130
|
+
Read an agent or local wallet policy:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
agentis policy get research-agent
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Set limits:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
agentis policy set research-agent --max-per-tx 1 --daily 10 --budget 100
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Allow or remove domains:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
agentis policy set research-agent --allow api.example.com
|
|
146
|
+
agentis policy set research-agent --disallow api.example.com
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Stop or resume spending:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
agentis policy set research-agent --kill
|
|
153
|
+
agentis policy set research-agent --resume
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Initialize on-chain policy PDAs for an on-chain policy agent after funding the wallet:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
agentis policy init-onchain policy-agent
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Jupiter Earn
|
|
163
|
+
|
|
164
|
+
Jupiter Earn support is mainnet-only. USDC amounts use UI units.
|
|
165
|
+
|
|
166
|
+
Deposit USDC into Jupiter Earn:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
agentis earn deposit research-agent --asset USDC --amount 1 --mainnet
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Show positions:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
agentis earn positions research-agent --mainnet
|
|
176
|
+
agentis earn positions research-agent --mainnet --all
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Sweep non-zero mainnet USDC balances across hosted agents into Jupiter Earn:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
agentis earn sweep --dry-run
|
|
183
|
+
agentis earn sweep --no-dry-run
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Umbra Privacy
|
|
187
|
+
|
|
188
|
+
Umbra commands operate on hosted agent wallets.
|
|
189
|
+
|
|
190
|
+
Register an agent:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
agentis privacy register --agent private-agent
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Check status and encrypted balance:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
agentis privacy status --agent private-agent
|
|
200
|
+
agentis privacy balance --agent private-agent
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Deposit or withdraw encrypted balance:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
agentis privacy deposit --agent private-agent --amount 1000000
|
|
207
|
+
agentis privacy withdraw --agent private-agent --amount 500000
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Create and claim receiver-claimable UTXOs:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
agentis privacy create-utxo --agent private-agent --to <receiver-wallet> --amount 1000000
|
|
214
|
+
agentis privacy scan --agent private-agent
|
|
215
|
+
agentis privacy claim-latest --agent private-agent
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Facilitators
|
|
219
|
+
|
|
220
|
+
Agentis can scaffold Kora-backed x402 facilitators and register them with the Agentis facilitator network.
|
|
221
|
+
|
|
222
|
+
Create a facilitator project:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
agentis facilitator create my-facilitator
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Create with custom settings:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
agentis facilitator create my-facilitator --dir ./facilitator --fee-bps 500 --listed
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
List facilitators:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
agentis facilitator list
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Publish a public URL and optionally opt into discovery:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
agentis facilitator publish my-facilitator --url https://facilitator.example.com --listed
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Command Help
|
|
247
|
+
|
|
248
|
+
Every command and subcommand supports `--help`:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
agentis --help
|
|
252
|
+
agentis wallet create --help
|
|
253
|
+
agentis agent send --help
|
|
254
|
+
agentis fetch --help
|
|
255
|
+
agentis earn deposit --help
|
|
256
|
+
agentis privacy create-utxo --help
|
|
257
|
+
agentis facilitator publish --help
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
## Local Development
|
|
261
|
+
|
|
262
|
+
From the monorepo:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
cd packages/cli
|
|
266
|
+
bun src/index.ts --help
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Point at a local backend:
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
AGENTIS_API_URL=http://localhost:3001 bun src/index.ts agent list
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## Notes
|
|
276
|
+
|
|
277
|
+
- Hosted agent keys are shown only when created or regenerated.
|
|
278
|
+
- CLI account keys are stored in the OS keychain.
|
|
279
|
+
- Local wallet vaults live under `~/.agentis/wallets/`.
|
|
280
|
+
- Jupiter Earn commands require mainnet and the `--mainnet` safety flag.
|
|
281
|
+
- Umbra devnet flows are currently safest with SOL or wSOL.
|
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -1273,6 +1273,254 @@ var green = "\x1B[38;5;114m";
|
|
|
1273
1273
|
var muted = "\x1B[38;5;244m";
|
|
1274
1274
|
var bold = "\x1B[1m";
|
|
1275
1275
|
var reset = "\x1B[0m";
|
|
1276
|
+
var helpSpecs = {
|
|
1277
|
+
login: {
|
|
1278
|
+
usage: "agentis login",
|
|
1279
|
+
description: "Authenticate with your Agentis account and store an account API key in your OS keychain."
|
|
1280
|
+
},
|
|
1281
|
+
logout: {
|
|
1282
|
+
usage: "agentis logout",
|
|
1283
|
+
description: "Remove stored Agentis CLI credentials from your OS keychain."
|
|
1284
|
+
},
|
|
1285
|
+
whoami: {
|
|
1286
|
+
usage: "agentis whoami",
|
|
1287
|
+
description: "Show the currently authenticated Agentis account key in masked form."
|
|
1288
|
+
},
|
|
1289
|
+
wallet: {
|
|
1290
|
+
usage: "agentis wallet <command>",
|
|
1291
|
+
description: "Create and list hosted or local Solana wallets.",
|
|
1292
|
+
commands: [
|
|
1293
|
+
["create --name <name> [--local]", "create a hosted wallet, or a local encrypted wallet with --local"],
|
|
1294
|
+
["list", "list hosted and local wallets"]
|
|
1295
|
+
]
|
|
1296
|
+
},
|
|
1297
|
+
"wallet create": {
|
|
1298
|
+
usage: "agentis wallet create --name <name> [--local]",
|
|
1299
|
+
description: "Create a hosted Agentis wallet when logged in, or a local encrypted wallet when --local is provided.",
|
|
1300
|
+
options: [
|
|
1301
|
+
["--name <name>", "wallet name"],
|
|
1302
|
+
["--local", "create a local encrypted wallet instead of a hosted Agentis wallet"],
|
|
1303
|
+
["-h, --help", "display help for command"]
|
|
1304
|
+
]
|
|
1305
|
+
},
|
|
1306
|
+
"wallet list": {
|
|
1307
|
+
usage: "agentis wallet list",
|
|
1308
|
+
description: "List hosted wallets from Agentis and local encrypted wallets on this machine.",
|
|
1309
|
+
options: [["-h, --help", "display help for command"]]
|
|
1310
|
+
},
|
|
1311
|
+
agent: {
|
|
1312
|
+
usage: "agentis agent <command>",
|
|
1313
|
+
description: "Manage hosted agents and send funds from hosted or local wallets.",
|
|
1314
|
+
commands: [
|
|
1315
|
+
["list", "list hosted agents"],
|
|
1316
|
+
["create <name> [--onchain-policy]", "create a hosted agent"],
|
|
1317
|
+
["balance <name-or-id>", "show SOL and token balances"],
|
|
1318
|
+
["send <name-or-id> <to> <amount> [options]", "send SOL from an agent or local wallet"]
|
|
1319
|
+
]
|
|
1320
|
+
},
|
|
1321
|
+
"agent list": {
|
|
1322
|
+
usage: "agentis agent list",
|
|
1323
|
+
description: "List hosted agents owned by your Agentis account.",
|
|
1324
|
+
options: [["-h, --help", "display help for command"]]
|
|
1325
|
+
},
|
|
1326
|
+
"agent create": {
|
|
1327
|
+
usage: "agentis agent create <name> [--onchain-policy]",
|
|
1328
|
+
description: "Create a hosted agent wallet and return its wallet address and API key.",
|
|
1329
|
+
options: [
|
|
1330
|
+
["--onchain-policy", "create the agent in Quasar on-chain policy mode"],
|
|
1331
|
+
["-h, --help", "display help for command"]
|
|
1332
|
+
]
|
|
1333
|
+
},
|
|
1334
|
+
"agent balance": {
|
|
1335
|
+
usage: "agentis agent balance <name-or-id>",
|
|
1336
|
+
description: "Show SOL and known SPL token balances for a hosted agent or local wallet.",
|
|
1337
|
+
options: [["-h, --help", "display help for command"]]
|
|
1338
|
+
},
|
|
1339
|
+
"agent send": {
|
|
1340
|
+
usage: "agentis agent send <name-or-id> <to> <amount> [options]",
|
|
1341
|
+
description: "Send SOL from a hosted agent or local encrypted wallet. Amount is lamports by default.",
|
|
1342
|
+
options: [
|
|
1343
|
+
["--sol", "treat amount as SOL instead of lamports"],
|
|
1344
|
+
["--token <mint>", "send an SPL token by mint address; currently not implemented"],
|
|
1345
|
+
["-h, --help", "display help for command"]
|
|
1346
|
+
]
|
|
1347
|
+
},
|
|
1348
|
+
fetch: {
|
|
1349
|
+
usage: "agentis fetch <url> --agent <name-or-id> [options]",
|
|
1350
|
+
description: "Fetch a URL and automatically pay MPP or x402 payment requests through the selected hosted agent.",
|
|
1351
|
+
options: [
|
|
1352
|
+
["--agent <name-or-id>", "hosted agent to pay from"],
|
|
1353
|
+
["--method <method>", "HTTP method to use; defaults to GET"],
|
|
1354
|
+
["-h, --help", "display help for command"]
|
|
1355
|
+
]
|
|
1356
|
+
},
|
|
1357
|
+
earn: {
|
|
1358
|
+
usage: "agentis earn <command>",
|
|
1359
|
+
description: "Manage Jupiter Earn deposits and positions for hosted agent wallets.",
|
|
1360
|
+
commands: [
|
|
1361
|
+
["deposit <agent> --asset USDC --amount <amount> --mainnet", "deposit mainnet USDC into Jupiter Earn"],
|
|
1362
|
+
["positions <agent> --mainnet [--all]", "show Jupiter Earn positions"],
|
|
1363
|
+
["sweep [--dry-run|--no-dry-run]", "sweep all hosted agents mainnet USDC into Jupiter Earn"]
|
|
1364
|
+
]
|
|
1365
|
+
},
|
|
1366
|
+
"earn deposit": {
|
|
1367
|
+
usage: "agentis earn deposit <agent> --asset USDC --amount <amount> --mainnet",
|
|
1368
|
+
description: "Deposit mainnet USDC from a hosted agent wallet into Jupiter Earn.",
|
|
1369
|
+
options: [
|
|
1370
|
+
["--asset USDC", "asset to deposit; currently USDC"],
|
|
1371
|
+
["--amount <amount>", "UI amount, for example 1 for 1 USDC"],
|
|
1372
|
+
["--mainnet", "required safety flag"],
|
|
1373
|
+
["-h, --help", "display help for command"]
|
|
1374
|
+
]
|
|
1375
|
+
},
|
|
1376
|
+
"earn positions": {
|
|
1377
|
+
usage: "agentis earn positions <agent> --mainnet [--all]",
|
|
1378
|
+
description: "Show Jupiter Earn positions for a hosted agent wallet.",
|
|
1379
|
+
options: [
|
|
1380
|
+
["--mainnet", "required safety flag"],
|
|
1381
|
+
["--all", "show empty vaults as well as non-zero positions"],
|
|
1382
|
+
["-h, --help", "display help for command"]
|
|
1383
|
+
]
|
|
1384
|
+
},
|
|
1385
|
+
"earn sweep": {
|
|
1386
|
+
usage: "agentis earn sweep [--dry-run|--no-dry-run]",
|
|
1387
|
+
description: "Read all hosted agents mainnet USDC balances and deposit non-zero balances into Jupiter Earn.",
|
|
1388
|
+
options: [
|
|
1389
|
+
["--dry-run", "print the sweep plan only"],
|
|
1390
|
+
["--no-dry-run", "execute directly without first printing the dry-run plan"],
|
|
1391
|
+
["-h, --help", "display help for command"]
|
|
1392
|
+
]
|
|
1393
|
+
},
|
|
1394
|
+
privacy: {
|
|
1395
|
+
usage: "agentis privacy <command> --agent <name-or-id>",
|
|
1396
|
+
description: "Use Umbra privacy flows for hosted agent wallets.",
|
|
1397
|
+
commands: [
|
|
1398
|
+
["status --agent <name-or-id>", "show Umbra registration status"],
|
|
1399
|
+
["register --agent <name-or-id>", "register with Umbra"],
|
|
1400
|
+
["balance --agent <name-or-id> [--mint <mint>]", "show encrypted balance"],
|
|
1401
|
+
["deposit --agent <name-or-id> --amount <atomic> [--mint <mint>]", "deposit into encrypted balance"],
|
|
1402
|
+
["withdraw --agent <name-or-id> --amount <atomic> [--mint <mint>]", "withdraw encrypted balance"],
|
|
1403
|
+
["create-utxo --agent <name-or-id> --to <wallet> --amount <atomic>", "create receiver-claimable UTXO"],
|
|
1404
|
+
["scan --agent <name-or-id>", "scan claimable UTXOs"],
|
|
1405
|
+
["claim-latest --agent <name-or-id>", "claim latest publicReceived UTXO"]
|
|
1406
|
+
]
|
|
1407
|
+
},
|
|
1408
|
+
"privacy status": {
|
|
1409
|
+
usage: "agentis privacy status --agent <name-or-id>",
|
|
1410
|
+
description: "Show direct Umbra account status for a hosted agent.",
|
|
1411
|
+
options: [["--agent <name-or-id>", "hosted agent"], ["-h, --help", "display help for command"]]
|
|
1412
|
+
},
|
|
1413
|
+
"privacy register": {
|
|
1414
|
+
usage: "agentis privacy register --agent <name-or-id> [options]",
|
|
1415
|
+
description: "Register a hosted agent wallet with Umbra.",
|
|
1416
|
+
options: [
|
|
1417
|
+
["--agent <name-or-id>", "hosted agent"],
|
|
1418
|
+
["--no-confidential", "disable confidential mode during registration"],
|
|
1419
|
+
["--no-anonymous", "disable anonymous mode during registration"],
|
|
1420
|
+
["-h, --help", "display help for command"]
|
|
1421
|
+
]
|
|
1422
|
+
},
|
|
1423
|
+
"privacy balance": {
|
|
1424
|
+
usage: "agentis privacy balance --agent <name-or-id> [--mint <mint>]",
|
|
1425
|
+
description: "Show encrypted Umbra balance for a hosted agent.",
|
|
1426
|
+
options: [["--agent <name-or-id>", "hosted agent"], ["--mint <mint>", "token mint"], ["-h, --help", "display help for command"]]
|
|
1427
|
+
},
|
|
1428
|
+
"privacy deposit": {
|
|
1429
|
+
usage: "agentis privacy deposit --agent <name-or-id> --amount <atomic> [--mint <mint>]",
|
|
1430
|
+
description: "Deposit public funds into an encrypted Umbra balance.",
|
|
1431
|
+
options: [["--agent <name-or-id>", "hosted agent"], ["--amount <atomic>", "token amount in atomic units"], ["--mint <mint>", "token mint"], ["-h, --help", "display help for command"]]
|
|
1432
|
+
},
|
|
1433
|
+
"privacy withdraw": {
|
|
1434
|
+
usage: "agentis privacy withdraw --agent <name-or-id> --amount <atomic> [--mint <mint>]",
|
|
1435
|
+
description: "Withdraw an encrypted Umbra balance to the public wallet balance.",
|
|
1436
|
+
options: [["--agent <name-or-id>", "hosted agent"], ["--amount <atomic>", "token amount in atomic units"], ["--mint <mint>", "token mint"], ["-h, --help", "display help for command"]]
|
|
1437
|
+
},
|
|
1438
|
+
"privacy create-utxo": {
|
|
1439
|
+
usage: "agentis privacy create-utxo --agent <name-or-id> --to <wallet> --amount <atomic> [--mint <mint>]",
|
|
1440
|
+
description: "Create a receiver-claimable Umbra UTXO for another wallet.",
|
|
1441
|
+
options: [["--agent <name-or-id>", "hosted agent"], ["--to <wallet>", "receiver wallet address"], ["--amount <atomic>", "token amount in atomic units"], ["--mint <mint>", "token mint"], ["-h, --help", "display help for command"]]
|
|
1442
|
+
},
|
|
1443
|
+
"privacy scan": {
|
|
1444
|
+
usage: "agentis privacy scan --agent <name-or-id>",
|
|
1445
|
+
description: "Scan Umbra for UTXOs claimable by the hosted agent.",
|
|
1446
|
+
options: [["--agent <name-or-id>", "hosted agent"], ["-h, --help", "display help for command"]]
|
|
1447
|
+
},
|
|
1448
|
+
"privacy claim-latest": {
|
|
1449
|
+
usage: "agentis privacy claim-latest --agent <name-or-id>",
|
|
1450
|
+
description: "Claim the latest publicReceived Umbra UTXO for the hosted agent.",
|
|
1451
|
+
options: [["--agent <name-or-id>", "hosted agent"], ["-h, --help", "display help for command"]]
|
|
1452
|
+
},
|
|
1453
|
+
facilitator: {
|
|
1454
|
+
usage: "agentis facilitator <command>",
|
|
1455
|
+
description: "Create, list, and publish Agentis x402 facilitator scaffolds.",
|
|
1456
|
+
commands: [
|
|
1457
|
+
["create <name> [options]", "register and scaffold a Kora-backed x402 facilitator"],
|
|
1458
|
+
["list", "list registered facilitators"],
|
|
1459
|
+
["publish <name-or-id> --url <public-url> [--listed]", "publish public URL and discovery settings"]
|
|
1460
|
+
]
|
|
1461
|
+
},
|
|
1462
|
+
"facilitator create": {
|
|
1463
|
+
usage: "agentis facilitator create <name> [options]",
|
|
1464
|
+
description: "Register a facilitator in Agentis and scaffold a Kora-backed x402 facilitator project.",
|
|
1465
|
+
options: [
|
|
1466
|
+
["--dir <path>", "output directory"],
|
|
1467
|
+
["--network <network>", "accepted network; defaults to Solana devnet CAIP-2"],
|
|
1468
|
+
["--mint <mint>", "accepted token mint; defaults to devnet USDC"],
|
|
1469
|
+
["--fee-bps <bps>", "seller prepaid fee rate; defaults to 500"],
|
|
1470
|
+
["--listed", "opt into public facilitator discovery"],
|
|
1471
|
+
["-h, --help", "display help for command"]
|
|
1472
|
+
]
|
|
1473
|
+
},
|
|
1474
|
+
"facilitator list": {
|
|
1475
|
+
usage: "agentis facilitator list",
|
|
1476
|
+
description: "List facilitators registered to your Agentis account.",
|
|
1477
|
+
options: [["-h, --help", "display help for command"]]
|
|
1478
|
+
},
|
|
1479
|
+
"facilitator publish": {
|
|
1480
|
+
usage: "agentis facilitator publish <name-or-id> --url <public-url> [--listed]",
|
|
1481
|
+
description: "Set a facilitator public URL and optionally list it in public discovery.",
|
|
1482
|
+
options: [
|
|
1483
|
+
["--url <public-url>", "public facilitator endpoint URL"],
|
|
1484
|
+
["--listed", "opt into public facilitator discovery"],
|
|
1485
|
+
["-h, --help", "display help for command"]
|
|
1486
|
+
]
|
|
1487
|
+
},
|
|
1488
|
+
policy: {
|
|
1489
|
+
usage: "agentis policy <command>",
|
|
1490
|
+
description: "Read, update, and initialize agent spend policies.",
|
|
1491
|
+
commands: [
|
|
1492
|
+
["get <name-or-id>", "show agent policy"],
|
|
1493
|
+
["set <name-or-id> [flags]", "update agent policy"],
|
|
1494
|
+
["init-onchain <name-or-id>", "initialize Quasar policy PDAs after funding"]
|
|
1495
|
+
]
|
|
1496
|
+
},
|
|
1497
|
+
"policy get": {
|
|
1498
|
+
usage: "agentis policy get <name-or-id>",
|
|
1499
|
+
description: "Show policy settings for a hosted agent or local wallet.",
|
|
1500
|
+
options: [["-h, --help", "display help for command"]]
|
|
1501
|
+
},
|
|
1502
|
+
"policy set": {
|
|
1503
|
+
usage: "agentis policy set <name-or-id> [flags]",
|
|
1504
|
+
description: "Update policy settings for a hosted agent or local wallet.",
|
|
1505
|
+
options: [
|
|
1506
|
+
["--kill", "activate kill switch"],
|
|
1507
|
+
["--resume", "deactivate kill switch"],
|
|
1508
|
+
["--max-per-tx <usd>", "max spend per transaction"],
|
|
1509
|
+
["--hourly <usd>", "hourly spend limit"],
|
|
1510
|
+
["--daily <usd>", "daily spend limit"],
|
|
1511
|
+
["--monthly <usd>", "monthly spend limit"],
|
|
1512
|
+
["--budget <usd>", "total lifetime budget cap"],
|
|
1513
|
+
["--allow <domain>", "add domain to whitelist"],
|
|
1514
|
+
["--disallow <domain>", "remove domain from whitelist"],
|
|
1515
|
+
["-h, --help", "display help for command"]
|
|
1516
|
+
]
|
|
1517
|
+
},
|
|
1518
|
+
"policy init-onchain": {
|
|
1519
|
+
usage: "agentis policy init-onchain <name-or-id>",
|
|
1520
|
+
description: "Initialize Quasar policy PDAs for an on-chain policy hosted agent after the wallet is funded.",
|
|
1521
|
+
options: [["-h, --help", "display help for command"]]
|
|
1522
|
+
}
|
|
1523
|
+
};
|
|
1276
1524
|
function showHelp() {
|
|
1277
1525
|
console.log(`${blue}${bold}
|
|
1278
1526
|
\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557
|
|
@@ -1344,7 +1592,42 @@ ${green}${bold}Commands:${reset}
|
|
|
1344
1592
|
--disallow <domain> remove domain from whitelist
|
|
1345
1593
|
`);
|
|
1346
1594
|
}
|
|
1595
|
+
function hasHelpFlag(values) {
|
|
1596
|
+
return values.includes("--help") || values.includes("-h");
|
|
1597
|
+
}
|
|
1598
|
+
function helpPath(values) {
|
|
1599
|
+
return values.filter((value) => value !== "--help" && value !== "-h").slice(0, 2).join(" ");
|
|
1600
|
+
}
|
|
1601
|
+
function printRows(title, rows) {
|
|
1602
|
+
console.log(`
|
|
1603
|
+
${green}${bold}${title}:${reset}`);
|
|
1604
|
+
for (const [left, right] of rows) {
|
|
1605
|
+
console.log(` ${left.padEnd(38)} ${right}`);
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
function showCommandHelp(path) {
|
|
1609
|
+
if (!path) {
|
|
1610
|
+
showHelp();
|
|
1611
|
+
return;
|
|
1612
|
+
}
|
|
1613
|
+
const spec = helpSpecs[path] ?? helpSpecs[path.split(" ")[0]];
|
|
1614
|
+
if (!spec) {
|
|
1615
|
+
showHelp();
|
|
1616
|
+
return;
|
|
1617
|
+
}
|
|
1618
|
+
console.log(`${bold}Usage:${reset} ${spec.usage}
|
|
1619
|
+
`);
|
|
1620
|
+
console.log(spec.description);
|
|
1621
|
+
if (spec.commands) printRows("Commands", spec.commands);
|
|
1622
|
+
if (spec.options) printRows("Options", spec.options);
|
|
1623
|
+
if (spec.examples) printRows("Examples", spec.examples.map((example) => [example, ""]));
|
|
1624
|
+
console.log();
|
|
1625
|
+
}
|
|
1347
1626
|
async function main() {
|
|
1627
|
+
if (!cmd || hasHelpFlag(args)) {
|
|
1628
|
+
showCommandHelp(helpPath(args));
|
|
1629
|
+
return;
|
|
1630
|
+
}
|
|
1348
1631
|
switch (cmd) {
|
|
1349
1632
|
case "login":
|
|
1350
1633
|
await login();
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentis-hq/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
|
-
"agentis": "
|
|
6
|
+
"agentis": "dist/index.js"
|
|
7
7
|
},
|
|
8
8
|
"description": "Agentis CLI",
|
|
9
9
|
"exports": {
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
"dist",
|
|
14
14
|
"templates",
|
|
15
|
+
"assets",
|
|
16
|
+
"README.md",
|
|
15
17
|
"package.json"
|
|
16
18
|
],
|
|
17
19
|
"scripts": {
|