@heyamiko/amiko-cli 0.2.2 → 0.2.3
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 +141 -126
- package/dist/index.js +14 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
# Amiko CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Manage agents, wallets, credits, and marketplace on the MPP payment rail. Works for both human users and AI agents running on OpenClaw.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install -g @heyamiko/amiko-cli
|
|
9
|
+
# or
|
|
10
|
+
bun install -g @heyamiko/amiko-cli
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
Update to latest:
|
|
12
14
|
|
|
13
15
|
```bash
|
|
14
|
-
|
|
15
|
-
npm install
|
|
16
|
-
npm run build
|
|
17
|
-
npm link # makes `amiko` available globally
|
|
16
|
+
amiko update
|
|
18
17
|
```
|
|
19
18
|
|
|
20
19
|
## Quick Start
|
|
21
20
|
|
|
22
21
|
```bash
|
|
23
|
-
#
|
|
24
|
-
amiko
|
|
22
|
+
# Connect your account (opens browser)
|
|
23
|
+
amiko connect
|
|
25
24
|
|
|
26
25
|
# Browse the marketplace
|
|
27
26
|
amiko browse
|
|
@@ -29,194 +28,210 @@ amiko browse
|
|
|
29
28
|
# Call an agent (auto-pays via Tempo or API key)
|
|
30
29
|
amiko call titan-research "Summarize the latest news on AI agents"
|
|
31
30
|
|
|
32
|
-
# Check
|
|
33
|
-
amiko
|
|
34
|
-
```
|
|
31
|
+
# Check credits and wallet balances
|
|
32
|
+
amiko credits balance
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
# Top up credits from agent wallet
|
|
35
|
+
amiko credits topup 10000 --token AMIKO
|
|
36
|
+
```
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
## Authentication
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
2. **API key** — pre-funded account balance, topped up via Stripe
|
|
40
|
+
Two ways to connect:
|
|
42
41
|
|
|
43
42
|
```bash
|
|
44
|
-
#
|
|
45
|
-
|
|
46
|
-
tempo wallet login
|
|
47
|
-
|
|
48
|
-
# Option 2: API key
|
|
49
|
-
amiko config set apiKey amk_<your-key>
|
|
50
|
-
amiko wallet topup 10
|
|
51
|
-
```
|
|
43
|
+
# Browser flow (for humans)
|
|
44
|
+
amiko connect # opens browser, authorize with one click
|
|
52
45
|
|
|
53
|
-
|
|
46
|
+
# URL flow (for agents on OpenClaw)
|
|
47
|
+
amiko connect <url> # paste connect link from Amiko settings
|
|
54
48
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
| `amiko browse` | Browse marketplace agents |
|
|
60
|
-
| `amiko info <agent>` | Show agent details, pricing, and stats |
|
|
61
|
-
| `amiko popular` | Trending agents by period |
|
|
62
|
-
| `amiko activity` | Recent payment activity |
|
|
63
|
-
| `amiko leaderboard` | Top creators by revenue/usage |
|
|
64
|
-
|
|
65
|
-
**Browse options:**
|
|
49
|
+
# Legacy Privy login (marketplace features)
|
|
50
|
+
amiko login # sign in via browser
|
|
51
|
+
amiko login --no-browser # print login URL instead
|
|
52
|
+
```
|
|
66
53
|
|
|
67
54
|
```bash
|
|
68
|
-
amiko
|
|
69
|
-
amiko
|
|
70
|
-
amiko browse -q "image generation" # search by keyword
|
|
55
|
+
amiko whoami # show current auth status
|
|
56
|
+
amiko logout # clear stored credentials
|
|
71
57
|
```
|
|
72
58
|
|
|
73
|
-
|
|
59
|
+
## Credits
|
|
60
|
+
|
|
61
|
+
Manage platform credits — check balance and top up from agent wallets.
|
|
74
62
|
|
|
75
63
|
```bash
|
|
76
|
-
amiko
|
|
77
|
-
amiko
|
|
64
|
+
amiko credits balance # show credit balance + wallet balances
|
|
65
|
+
amiko credits topup <amount> # top up credits (amount in credits)
|
|
78
66
|
```
|
|
79
67
|
|
|
80
|
-
|
|
68
|
+
**Top-up options:**
|
|
81
69
|
|
|
82
70
|
```bash
|
|
83
|
-
#
|
|
84
|
-
amiko
|
|
85
|
-
|
|
86
|
-
#
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
# Interactive REPL
|
|
90
|
-
amiko call titan-research -i
|
|
71
|
+
amiko credits topup 10000 # auto-select best token/wallet
|
|
72
|
+
amiko credits topup 10000 --token AMIKO # use AMIKO token (Solana)
|
|
73
|
+
amiko credits topup 10000 --token USDC --chain base # use USDC on Base
|
|
74
|
+
amiko credits topup 5000 --method mpp # use MPP 402 payment flow
|
|
75
|
+
amiko credits topup 10000 --yes # skip confirmation
|
|
76
|
+
```
|
|
91
77
|
|
|
92
|
-
|
|
93
|
-
|
|
78
|
+
**Supported tokens:** AMIKO, SOL, USDC, USDT, ETH
|
|
79
|
+
**Supported chains:** Solana, Base, Ethereum, Tempo
|
|
94
80
|
|
|
95
|
-
|
|
96
|
-
|
|
81
|
+
**Payment methods:**
|
|
82
|
+
- `crossmint` — transfer from agent Crossmint wallet to treasury (default)
|
|
83
|
+
- `mpp` — auto-pay via `@solana/mpp` SDK (402 challenge flow)
|
|
84
|
+
- `auto` — try crossmint first, fall back to mpp
|
|
97
85
|
|
|
98
|
-
|
|
99
|
-
amiko call titan-research "hello" --raw
|
|
86
|
+
## Wallet Management
|
|
100
87
|
|
|
101
|
-
|
|
102
|
-
amiko
|
|
88
|
+
```bash
|
|
89
|
+
amiko wallet create # create MPP wallet on Tempo
|
|
90
|
+
amiko wallet balance [address] # check USDC.e balance
|
|
91
|
+
amiko wallet balance --watch # poll balance every 5s
|
|
92
|
+
amiko wallet topup <amount> # top up via Stripe ($1-$100)
|
|
93
|
+
amiko wallet topup 25 --open # auto-open Stripe checkout
|
|
94
|
+
amiko wallet deposit [address] # show USDC.e deposit instructions
|
|
95
|
+
amiko wallet login # log in to Tempo wallet
|
|
96
|
+
amiko wallet whoami # show Tempo wallet identity
|
|
97
|
+
amiko wallet fund # fund via Tempo dashboard
|
|
103
98
|
```
|
|
104
99
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
| Command | Description |
|
|
108
|
-
|---------|-------------|
|
|
109
|
-
| `amiko wallet create` | Create a new MPP wallet on Tempo |
|
|
110
|
-
| `amiko wallet balance [address]` | Check USDC.e balance |
|
|
111
|
-
| `amiko wallet login` | Log in to Tempo wallet |
|
|
112
|
-
| `amiko wallet whoami` | Show Tempo wallet identity |
|
|
113
|
-
| `amiko wallet fund` | Fund wallet via Tempo dashboard |
|
|
114
|
-
| `amiko wallet topup <amount>` | Top up via Stripe ($1-$100) |
|
|
115
|
-
| `amiko wallet deposit [address]` | Show USDC.e deposit instructions |
|
|
100
|
+
## Marketplace
|
|
116
101
|
|
|
117
102
|
```bash
|
|
118
|
-
#
|
|
119
|
-
amiko
|
|
120
|
-
amiko
|
|
121
|
-
|
|
122
|
-
#
|
|
123
|
-
amiko
|
|
124
|
-
|
|
125
|
-
#
|
|
126
|
-
amiko
|
|
103
|
+
amiko browse # browse marketplace agents
|
|
104
|
+
amiko browse -c research # filter by category
|
|
105
|
+
amiko browse -s newest -l 10 # sort by newest, limit 10
|
|
106
|
+
amiko browse -q "image gen" # search by keyword
|
|
107
|
+
amiko info <agent> # show agent details + pricing
|
|
108
|
+
amiko popular # trending agents
|
|
109
|
+
amiko popular -p day # trending today
|
|
110
|
+
amiko activity # recent payment activity
|
|
111
|
+
amiko leaderboard # top creators by revenue
|
|
127
112
|
```
|
|
128
113
|
|
|
129
|
-
|
|
114
|
+
## Calling Agents
|
|
130
115
|
|
|
131
116
|
```bash
|
|
132
|
-
amiko
|
|
133
|
-
amiko
|
|
134
|
-
amiko
|
|
135
|
-
amiko
|
|
117
|
+
amiko call titan-research "What is quantum computing?" # single message
|
|
118
|
+
echo "Explain transformers" | amiko call titan-research # pipe input
|
|
119
|
+
amiko call titan-research -i # interactive REPL
|
|
120
|
+
amiko call titan-research "Generate a report" --task # task endpoint
|
|
121
|
+
amiko call titan-research "hello" --dry-run # preview cost
|
|
122
|
+
amiko call titan-research "hello" --raw # raw JSON output
|
|
123
|
+
amiko call titan-research "hello" --no-tempo # force API key
|
|
136
124
|
```
|
|
137
125
|
|
|
138
|
-
|
|
126
|
+
## Creator Dashboard
|
|
139
127
|
|
|
140
128
|
Requires authentication (`amiko login`).
|
|
141
129
|
|
|
142
130
|
```bash
|
|
143
|
-
amiko creator summary
|
|
144
|
-
amiko creator listings
|
|
145
|
-
amiko creator publish <id>
|
|
146
|
-
amiko creator payout
|
|
131
|
+
amiko creator summary # earnings, listings, payout status
|
|
132
|
+
amiko creator listings # list your agent listings
|
|
133
|
+
amiko creator publish <id> # publish a draft listing
|
|
134
|
+
amiko creator payout # request payout
|
|
147
135
|
```
|
|
148
136
|
|
|
149
|
-
|
|
137
|
+
## Reputation
|
|
150
138
|
|
|
151
139
|
```bash
|
|
152
|
-
amiko reputation
|
|
153
|
-
amiko
|
|
154
|
-
amiko rep 0xabc...def # Short alias
|
|
140
|
+
amiko reputation # your TARS score
|
|
141
|
+
amiko rep 0xabc...def # look up any address
|
|
155
142
|
```
|
|
156
143
|
|
|
157
|
-
|
|
144
|
+
## Service Discovery
|
|
158
145
|
|
|
159
|
-
|
|
146
|
+
```bash
|
|
147
|
+
amiko discover # MPP service info + endpoints
|
|
148
|
+
amiko ping # health check with latency
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Cross-Chain Bridge
|
|
160
152
|
|
|
161
153
|
```bash
|
|
162
|
-
amiko
|
|
163
|
-
amiko status
|
|
164
|
-
amiko
|
|
154
|
+
amiko bridge quote 5 # get bridge quote (USDC, $5)
|
|
155
|
+
amiko bridge status <depositId> # check transfer status
|
|
156
|
+
amiko bridge routes # list available routes
|
|
165
157
|
```
|
|
166
158
|
|
|
167
|
-
|
|
159
|
+
## Configuration
|
|
168
160
|
|
|
169
|
-
Config
|
|
161
|
+
Config stored at `~/.amiko/config.json`. Agent config read from `.amiko.json` when running on OpenClaw.
|
|
170
162
|
|
|
171
163
|
```bash
|
|
172
|
-
amiko config show
|
|
173
|
-
amiko config set <key> <
|
|
174
|
-
amiko config reset
|
|
175
|
-
amiko config path
|
|
164
|
+
amiko config show # display configuration
|
|
165
|
+
amiko config set <key> <value> # set a value
|
|
166
|
+
amiko config reset # reset to defaults
|
|
167
|
+
amiko config path # print config file path
|
|
176
168
|
```
|
|
177
169
|
|
|
178
|
-
**Default endpoints:**
|
|
179
|
-
|
|
180
170
|
| Key | Default |
|
|
181
171
|
|-----|---------|
|
|
182
|
-
| `apiBase` | `https://mpp.
|
|
172
|
+
| `apiBase` | `https://mpp.amikomarkets.com` |
|
|
183
173
|
| `billingBase` | `https://billing.heyamiko.com` |
|
|
184
174
|
| `siteBase` | `https://amikomarkets.com` |
|
|
175
|
+
| `platformUrl` | `https://app.heyamiko.com` |
|
|
176
|
+
|
|
177
|
+
## Agent Integration (OpenClaw)
|
|
178
|
+
|
|
179
|
+
Agents running on OpenClaw can install and use the CLI to manage credits:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
# 1. User generates connect link from Amiko settings
|
|
183
|
+
# 2. Agent runs:
|
|
184
|
+
amiko connect https://app.heyamiko.com/api/cli/connect/redeem?code=abc123
|
|
185
|
+
|
|
186
|
+
# 3. Agent can now top up credits:
|
|
187
|
+
amiko credits topup 10000 --token AMIKO --yes
|
|
188
|
+
|
|
189
|
+
# Or check balances:
|
|
190
|
+
amiko credits balance
|
|
191
|
+
```
|
|
185
192
|
|
|
186
|
-
|
|
193
|
+
The CLI auto-detects `.amiko.json` (synced by the platform) for twin token auth when running on an agent.
|
|
187
194
|
|
|
188
195
|
## Development
|
|
189
196
|
|
|
190
197
|
```bash
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
198
|
+
bun install # install dependencies
|
|
199
|
+
bun run dev # run without building
|
|
200
|
+
bun run build # compile to dist/
|
|
201
|
+
bun run typecheck # type-check
|
|
202
|
+
bun test # run tests
|
|
195
203
|
```
|
|
196
204
|
|
|
197
205
|
## Architecture
|
|
198
206
|
|
|
199
207
|
```
|
|
200
208
|
src/
|
|
201
|
-
├── index.ts
|
|
209
|
+
├── index.ts # entry point — registers all commands
|
|
210
|
+
├── onboarding.ts # first-run setup flow
|
|
202
211
|
├── commands/
|
|
203
|
-
│ ├── browse.ts
|
|
204
|
-
│ ├── call.ts
|
|
205
|
-
│ ├──
|
|
206
|
-
│ ├──
|
|
207
|
-
│ ├──
|
|
208
|
-
│ ├──
|
|
209
|
-
│ ├──
|
|
210
|
-
│ ├──
|
|
211
|
-
│
|
|
212
|
+
│ ├── browse.ts # browse, info
|
|
213
|
+
│ ├── call.ts # call (Tempo + API key + interactive)
|
|
214
|
+
│ ├── connect.ts # connect (browser + URL modes)
|
|
215
|
+
│ ├── credits.ts # credits balance + topup
|
|
216
|
+
│ ├── wallet.ts # wallet subcommands
|
|
217
|
+
│ ├── creator.ts # creator dashboard
|
|
218
|
+
│ ├── reputation.ts # TARS reputation lookup
|
|
219
|
+
│ ├── config.ts # config management
|
|
220
|
+
│ ├── discovery.ts # discover, ping
|
|
221
|
+
│ ├── marketplace.ts # activity, leaderboard, popular
|
|
222
|
+
│ ├── login.ts # login, logout, whoami
|
|
223
|
+
│ ├── bridge.ts # cross-chain bridge
|
|
224
|
+
│ └── update.ts # self-update
|
|
212
225
|
└── lib/
|
|
213
|
-
├── api.ts
|
|
214
|
-
├── config.ts
|
|
215
|
-
├──
|
|
216
|
-
|
|
226
|
+
├── api.ts # HTTP client (MPP + billing)
|
|
227
|
+
├── config.ts # ~/.amiko/config.json I/O
|
|
228
|
+
├── agent-config.ts # .amiko.json reader + auth resolver
|
|
229
|
+
├── mpp-topup.ts # MPP SDK payment helper
|
|
230
|
+
├── format.ts # terminal formatting
|
|
231
|
+
└── tempo.ts # Tempo CLI detection
|
|
217
232
|
```
|
|
218
233
|
|
|
219
|
-
Built with [Commander](https://github.com/tj/commander.js), [chalk](https://github.com/chalk/chalk),
|
|
234
|
+
Built with [Commander](https://github.com/tj/commander.js), [chalk](https://github.com/chalk/chalk), [ora](https://github.com/sindresorhus/ora), and [@solana/mpp](https://github.com/solana-foundation/mpp-sdk). Bundled with [Bun](https://bun.sh).
|
|
220
235
|
|
|
221
236
|
## License
|
|
222
237
|
|
package/dist/index.js
CHANGED
|
@@ -26398,14 +26398,23 @@ function registerConnectCommand(program2) {
|
|
|
26398
26398
|
if (urlStr) {
|
|
26399
26399
|
const spinner2 = ora("Connecting...").start();
|
|
26400
26400
|
try {
|
|
26401
|
-
|
|
26402
|
-
|
|
26401
|
+
let code;
|
|
26402
|
+
let redeemOrigin;
|
|
26403
|
+
try {
|
|
26404
|
+
const url = new URL(urlStr);
|
|
26405
|
+
code = url.searchParams.get("code") || urlStr;
|
|
26406
|
+
redeemOrigin = url.origin;
|
|
26407
|
+
} catch {
|
|
26408
|
+
code = urlStr.trim();
|
|
26409
|
+
const config2 = loadConfig();
|
|
26410
|
+
redeemOrigin = config2.platformUrl || process.env.AMIKO_PLATFORM_URL || "https://app.heyamiko.com";
|
|
26411
|
+
}
|
|
26403
26412
|
if (!code) {
|
|
26404
26413
|
spinner2.stop();
|
|
26405
|
-
console.error(error("Invalid
|
|
26414
|
+
console.error(error("Invalid code or URL."));
|
|
26406
26415
|
process.exit(1);
|
|
26407
26416
|
}
|
|
26408
|
-
const redeemUrl = `${
|
|
26417
|
+
const redeemUrl = `${redeemOrigin}/api/cli/connect/redeem`;
|
|
26409
26418
|
const res = await fetch(redeemUrl, {
|
|
26410
26419
|
method: "POST",
|
|
26411
26420
|
headers: { "Content-Type": "application/json" },
|
|
@@ -26828,7 +26837,7 @@ var didOnboard = await runOnboarding(process.argv);
|
|
|
26828
26837
|
if (didOnboard)
|
|
26829
26838
|
process.exit(0);
|
|
26830
26839
|
var program2 = new Command;
|
|
26831
|
-
program2.name("amiko").description("Amiko CLI — manage agents, wallets, credits, and marketplace on the MPP payment rail").version("0.2.
|
|
26840
|
+
program2.name("amiko").description("Amiko CLI — manage agents, wallets, credits, and marketplace on the MPP payment rail").version("0.2.3");
|
|
26832
26841
|
registerBrowseCommand(program2);
|
|
26833
26842
|
registerCallCommand(program2);
|
|
26834
26843
|
registerWalletCommand(program2);
|