@heyamiko/amiko-cli 0.7.0 → 0.7.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 +121 -106
- package/dist/index.js +36 -24
- package/package.json +1 -1
- package/skills/SKILL.md +81 -312
package/README.md
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
# amiko-cli (v0.
|
|
1
|
+
# @heyamiko/amiko-cli (v0.7.0)
|
|
2
2
|
|
|
3
|
-
Manage
|
|
3
|
+
Manage wallets, credits, swaps, and MPP marketplace services from the terminal. 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
|
|
11
9
|
```
|
|
12
10
|
|
|
13
11
|
Update to latest:
|
|
@@ -30,13 +28,19 @@ amiko credits balance
|
|
|
30
28
|
# Top up credits from your agent's wallet
|
|
31
29
|
amiko credits topup 10000 --token AMIKO --yes
|
|
32
30
|
|
|
33
|
-
#
|
|
34
|
-
amiko
|
|
35
|
-
amiko swap send SOL USDC 1.0 --yes
|
|
31
|
+
# Search X/Twitter (1 AMIKO)
|
|
32
|
+
amiko search "AI agents"
|
|
36
33
|
|
|
37
|
-
#
|
|
38
|
-
amiko
|
|
39
|
-
|
|
34
|
+
# Generate an image (5 AMIKO)
|
|
35
|
+
amiko image "a sunset over mountains"
|
|
36
|
+
|
|
37
|
+
# Swap tokens on Solana
|
|
38
|
+
amiko swap quote 1.0 SOL USDC
|
|
39
|
+
amiko swap send 1.0 SOL USDC --yes
|
|
40
|
+
|
|
41
|
+
# Call any MPP service
|
|
42
|
+
amiko service list
|
|
43
|
+
amiko service call POST /v1/sfx '{"text":"thunder","duration_seconds":5}'
|
|
40
44
|
```
|
|
41
45
|
|
|
42
46
|
## Connect
|
|
@@ -49,11 +53,10 @@ amiko connect amk_<key> # API key (shown once at creation)
|
|
|
49
53
|
amiko connect # browser sign-in flow
|
|
50
54
|
```
|
|
51
55
|
|
|
52
|
-
The connect code is the simplest
|
|
56
|
+
The connect code is the simplest — generate one from your Amiko settings page, paste it to the agent or terminal.
|
|
53
57
|
|
|
54
58
|
```bash
|
|
55
59
|
amiko whoami # show current auth status
|
|
56
|
-
amiko logout # clear stored credentials
|
|
57
60
|
```
|
|
58
61
|
|
|
59
62
|
## Credits
|
|
@@ -74,135 +77,130 @@ amiko credits topup 10000 --wallet Gu2b...QVya # specific wallet address
|
|
|
74
77
|
amiko credits topup 10000 --yes # skip confirmation
|
|
75
78
|
```
|
|
76
79
|
|
|
77
|
-
**
|
|
78
|
-
1. CLI fetches live token price from Jupiter
|
|
79
|
-
2. Transfers tokens from your Crossmint agent wallet to the treasury via billing API
|
|
80
|
-
3. Verifies the on-chain transfer and credits your account
|
|
81
|
-
4. All calls go through `billing.heyamiko.com` -- no other dependencies
|
|
82
|
-
|
|
83
|
-
**Supported tokens:** AMIKO, SOL, USDC, USDT, ETH
|
|
80
|
+
**Supported tokens:** AMIKO, SOL, USDC, USDT
|
|
84
81
|
**Supported chains:** Solana, Base, Ethereum, Tempo
|
|
85
82
|
|
|
86
|
-
##
|
|
83
|
+
## Search
|
|
87
84
|
|
|
88
85
|
```bash
|
|
89
|
-
amiko
|
|
90
|
-
amiko
|
|
91
|
-
amiko
|
|
86
|
+
amiko search "AI agents" # search X/Twitter (1 AMIKO)
|
|
87
|
+
amiko search "bitcoin" --token USDC # pay with USDC instead
|
|
88
|
+
amiko search "news" --raw # raw JSON output
|
|
92
89
|
```
|
|
93
90
|
|
|
94
|
-
|
|
91
|
+
Pays 1 AMIKO per search via Crossmint wallet transfer. Tries Solana wallet first, falls back to EVM.
|
|
95
92
|
|
|
96
|
-
##
|
|
93
|
+
## Image Generation
|
|
97
94
|
|
|
98
95
|
```bash
|
|
99
|
-
amiko
|
|
100
|
-
amiko
|
|
101
|
-
amiko
|
|
102
|
-
amiko
|
|
103
|
-
amiko
|
|
104
|
-
amiko
|
|
105
|
-
amiko wallet login # Tempo wallet login
|
|
106
|
-
amiko wallet whoami # Tempo wallet identity
|
|
107
|
-
amiko wallet fund # fund via Tempo dashboard
|
|
96
|
+
amiko image "a sunset over mountains" # gpt-image-1 (default)
|
|
97
|
+
amiko image "logo" --background transparent # transparent background
|
|
98
|
+
amiko image "cat" --model dall-e-3 # DALL-E 3
|
|
99
|
+
amiko image "portrait" --size 1024x1792 --quality high # portrait, high quality
|
|
100
|
+
amiko image "icon" --format webp # webp output
|
|
101
|
+
amiko image "banner" --raw # raw JSON
|
|
108
102
|
```
|
|
109
103
|
|
|
110
|
-
|
|
104
|
+
Costs 5 AMIKO per image. Returns a Supabase Storage URL.
|
|
105
|
+
|
|
106
|
+
## Amazon
|
|
111
107
|
|
|
112
108
|
```bash
|
|
113
|
-
amiko
|
|
114
|
-
amiko
|
|
115
|
-
amiko info <agent> # agent details + pricing
|
|
116
|
-
amiko popular # trending agents
|
|
117
|
-
amiko activity # recent payments
|
|
118
|
-
amiko leaderboard # top creators
|
|
109
|
+
amiko amazon search "usb c cable" # product search (1 AMIKO)
|
|
110
|
+
amiko amazon quote B01GGKYKQM # price quote (free)
|
|
119
111
|
```
|
|
120
112
|
|
|
121
|
-
##
|
|
113
|
+
## Swap
|
|
122
114
|
|
|
123
115
|
```bash
|
|
124
|
-
amiko
|
|
125
|
-
amiko
|
|
126
|
-
|
|
127
|
-
amiko call <agent> "msg" --task # task endpoint
|
|
128
|
-
amiko call <agent> "msg" --dry-run # preview cost
|
|
116
|
+
amiko swap quote <amount> <from> <to> # get Jupiter quote
|
|
117
|
+
amiko swap send <amount> <from> <to> # execute swap via Crossmint
|
|
118
|
+
amiko swap tokens # list supported tokens
|
|
129
119
|
```
|
|
130
120
|
|
|
131
|
-
|
|
121
|
+
**Examples:**
|
|
132
122
|
|
|
133
123
|
```bash
|
|
134
|
-
amiko
|
|
135
|
-
amiko
|
|
136
|
-
amiko
|
|
137
|
-
amiko creator payout # request payout
|
|
124
|
+
amiko swap quote 1.0 SOL USDC
|
|
125
|
+
amiko swap send 0.5 USDC AMIKO --yes
|
|
126
|
+
amiko swap send 100 AMIKO SOL --slippage 100
|
|
138
127
|
```
|
|
139
128
|
|
|
129
|
+
Swaps execute via Jupiter on Solana. Supports SOL, USDC, USDT, AMIKO, PYUSD, BONK, JUP, RAY, JitoSOL, mSOL, or any mint address.
|
|
130
|
+
|
|
140
131
|
## Bridge
|
|
141
132
|
|
|
142
133
|
```bash
|
|
143
|
-
amiko bridge quote <amount>
|
|
144
|
-
amiko bridge send <amount>
|
|
145
|
-
amiko bridge status <txHash>
|
|
146
|
-
amiko bridge routes
|
|
147
|
-
amiko bridge limits
|
|
134
|
+
amiko bridge quote <amount> # cross-chain USDC quote via Across Protocol
|
|
135
|
+
amiko bridge send <amount> # execute bridge transfer
|
|
136
|
+
amiko bridge status <txHash> # check bridge status
|
|
137
|
+
amiko bridge routes # available bridge routes
|
|
138
|
+
amiko bridge limits # min/max limits per route
|
|
148
139
|
```
|
|
149
140
|
|
|
150
|
-
|
|
141
|
+
Default route: Solana → Tempo. Use `--from` and `--to` flags for other chains.
|
|
142
|
+
|
|
143
|
+
## MPP Services
|
|
151
144
|
|
|
152
|
-
|
|
145
|
+
Call any endpoint on the Amiko marketplace with automatic AMIKO payment:
|
|
153
146
|
|
|
154
147
|
```bash
|
|
155
|
-
#
|
|
148
|
+
amiko service list # all services + prices
|
|
149
|
+
amiko service call <METHOD> <path> [body]
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Examples:**
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Sound effects ($0.05) — returns { url, format, service }
|
|
156
156
|
amiko service call POST /v1/sfx '{"text":"Thunder with heavy rain","duration_seconds":5}'
|
|
157
157
|
|
|
158
|
-
# Music generation ($0.10)
|
|
158
|
+
# Music generation ($0.10) — returns { url, format, service }
|
|
159
159
|
amiko service call POST /v1/music '{"prompt":"Lo-fi chill beat","music_length_ms":30000}'
|
|
160
160
|
|
|
161
|
-
#
|
|
162
|
-
amiko service
|
|
163
|
-
|
|
164
|
-
# Text-to-speech ($0.50/1K chars)
|
|
165
|
-
amiko service call POST /v1/tts/21m00Tcm4TlvDq8ikWAM '{"text":"Hello world"}'
|
|
161
|
+
# Text-to-speech (1 AMIKO) — returns { url, format, service }
|
|
162
|
+
amiko service tts 21m00Tcm4TlvDq8ikWAM "Hello world"
|
|
166
163
|
|
|
167
|
-
#
|
|
168
|
-
amiko service
|
|
164
|
+
# Composition plan ($0.02)
|
|
165
|
+
amiko service call POST /v1/music/plan '{"prompt":"Epic orchestral piece"}'
|
|
169
166
|
```
|
|
170
167
|
|
|
171
|
-
|
|
168
|
+
Audio and image endpoints upload to Supabase Storage and return permanent URLs.
|
|
169
|
+
|
|
170
|
+
## Wallet
|
|
172
171
|
|
|
173
172
|
```bash
|
|
174
|
-
amiko
|
|
175
|
-
amiko
|
|
176
|
-
amiko
|
|
177
|
-
amiko
|
|
178
|
-
amiko
|
|
179
|
-
amiko
|
|
173
|
+
amiko wallet balance [address] # check USDC.e balance on Tempo
|
|
174
|
+
amiko wallet balance --watch # poll every 5s (stops after 10 errors)
|
|
175
|
+
amiko wallet send <to> <amount> # send tokens from agent wallet
|
|
176
|
+
amiko wallet topup <amount> # Stripe checkout ($1-$100)
|
|
177
|
+
amiko wallet deposit [address] # USDC.e deposit instructions
|
|
178
|
+
amiko wallet login # Tempo wallet login (browser)
|
|
179
|
+
amiko wallet whoami # Tempo wallet identity
|
|
180
|
+
amiko wallet fund # fund via Tempo dashboard
|
|
180
181
|
```
|
|
181
182
|
|
|
182
|
-
##
|
|
183
|
+
## Other Commands
|
|
183
184
|
|
|
184
185
|
```bash
|
|
185
|
-
amiko
|
|
186
|
-
amiko
|
|
187
|
-
amiko
|
|
186
|
+
amiko discovery # MPP service info + pricing
|
|
187
|
+
amiko config show # view config
|
|
188
|
+
amiko config set <key> <value> # set config value
|
|
189
|
+
amiko update # update CLI to latest
|
|
190
|
+
amiko --help # all commands
|
|
188
191
|
```
|
|
189
192
|
|
|
190
|
-
|
|
193
|
+
## Agent Integration (OpenClaw)
|
|
191
194
|
|
|
192
|
-
|
|
195
|
+
### Install as OpenClaw plugin
|
|
193
196
|
|
|
194
197
|
```bash
|
|
195
|
-
|
|
196
|
-
amiko image "logo" --background transparent # transparent background
|
|
197
|
-
amiko image "cat" --model dall-e-3 # DALL-E 3 (returns URL)
|
|
198
|
-
amiko image "portrait" --size 1024x1792 --quality high # portrait, high quality
|
|
199
|
-
amiko image "icon" --format webp # webp output
|
|
200
|
-
amiko image "banner" --raw # raw JSON (for piping)
|
|
198
|
+
openclaw plugins install @heyamiko/amiko-cli
|
|
201
199
|
```
|
|
202
200
|
|
|
203
|
-
|
|
201
|
+
This registers the CLI's skill file so the agent discovers all commands through the normal skill system. Updates to the CLI (`npm update -g @heyamiko/amiko-cli`) also update the skill docs.
|
|
204
202
|
|
|
205
|
-
|
|
203
|
+
### Authentication
|
|
206
204
|
|
|
207
205
|
Agents auto-authenticate via `.amiko.json` — no manual connect needed. The platform writes this file during twin init with wallets, billing config, and twin token.
|
|
208
206
|
|
|
@@ -219,13 +217,19 @@ The CLI checks for `.amiko.json` in order:
|
|
|
219
217
|
3. `/data/.openclaw/workspace/.amiko.json`
|
|
220
218
|
4. Walking up from `cwd`
|
|
221
219
|
|
|
222
|
-
|
|
220
|
+
Supported keys (both camelCase and SCREAMING_SNAKE_CASE):
|
|
221
|
+
- `amikoTwinToken` / `AMIKO_TWIN_TOKEN` — auth token
|
|
222
|
+
- `amikoTwinId` / `AMIKO_TWIN_ID` — twin identifier
|
|
223
|
+
- `amikoPlatformUrl` / `AMIKO_PLATFORM_URL` — platform base URL
|
|
224
|
+
- `agentWallets` — array of `{ chain, address }`
|
|
225
|
+
- `billingBase` — billing API URL
|
|
226
|
+
- `platformKey` — API key override
|
|
223
227
|
|
|
224
|
-
**
|
|
228
|
+
**Stale config pitfall:** If `~/.amiko/config.json` exists with an old `apiKey`, it takes priority over `.amiko.json` twin token. Remove stale keys or let the platform manage auth.
|
|
225
229
|
|
|
226
230
|
## Configuration
|
|
227
231
|
|
|
228
|
-
Config: `~/.amiko/config.json`
|
|
232
|
+
Config file: `~/.amiko/config.json`
|
|
229
233
|
|
|
230
234
|
| Key | Default |
|
|
231
235
|
|-----|---------|
|
|
@@ -242,29 +246,40 @@ src/
|
|
|
242
246
|
├── commands/
|
|
243
247
|
│ ├── connect.ts # connect (code, API key, browser)
|
|
244
248
|
│ ├── credits.ts # credits balance + topup
|
|
245
|
-
│ ├──
|
|
249
|
+
│ ├── search.ts # X/Twitter search (1 AMIKO via MPP)
|
|
250
|
+
│ ├── image.ts # image generation (gpt-image-1, 5 AMIKO)
|
|
251
|
+
│ ├── amazon.ts # Amazon search + quote
|
|
252
|
+
│ ├── swap.ts # Jupiter token swaps (Solana)
|
|
246
253
|
│ ├── bridge.ts # Across Protocol cross-chain bridge
|
|
247
|
-
│ ├──
|
|
248
|
-
│ ├──
|
|
249
|
-
│ ├──
|
|
250
|
-
│ ├── creator.ts # creator dashboard
|
|
254
|
+
│ ├── wallet.ts # wallet management (Tempo + Crossmint)
|
|
255
|
+
│ ├── services.ts # generic MPP service calling
|
|
256
|
+
│ ├── discovery.ts # MPP service info
|
|
251
257
|
│ ├── login.ts # Privy browser login
|
|
252
|
-
│ ├── update.ts # self-update
|
|
253
258
|
│ ├── config.ts # config management
|
|
254
|
-
│
|
|
255
|
-
│ ├── marketplace.ts # activity, leaderboard, popular
|
|
256
|
-
│ └── reputation.ts # TARS score
|
|
259
|
+
│ └── update.ts # self-update
|
|
257
260
|
└── lib/
|
|
258
261
|
├── config.ts # ~/.amiko/config.json
|
|
259
|
-
├── agent-config.ts # .amiko.json reader +
|
|
260
|
-
├── api.ts # HTTP client
|
|
261
|
-
├── format.ts #
|
|
262
|
+
├── agent-config.ts # .amiko.json reader + auth resolution
|
|
263
|
+
├── api.ts # HTTP client (MPP + billing)
|
|
264
|
+
├── format.ts # terminal output helpers
|
|
262
265
|
├── mpp-topup.ts # MPP SDK topup helper
|
|
263
266
|
├── across.ts # Across Protocol bridge
|
|
264
|
-
└── tempo.ts # Tempo
|
|
267
|
+
└── tempo.ts # Tempo chain helpers
|
|
265
268
|
```
|
|
266
269
|
|
|
267
|
-
|
|
270
|
+
## API Endpoints
|
|
271
|
+
|
|
272
|
+
| Client | Base URL | Purpose |
|
|
273
|
+
|--------|----------|---------|
|
|
274
|
+
| MPP API | `mpp.amikomarkets.com` | Marketplace services, search, image, audio |
|
|
275
|
+
| Billing API | `billing.heyamiko.com` | Credits, topup, wallet balances, keys |
|
|
276
|
+
|
|
277
|
+
## Build
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
bun build src/index.ts --outdir dist --target node --format esm
|
|
281
|
+
npm publish
|
|
282
|
+
```
|
|
268
283
|
|
|
269
284
|
## License
|
|
270
285
|
|
package/dist/index.js
CHANGED
|
@@ -24968,7 +24968,7 @@ var require_fallback = __commonJS((exports, module) => {
|
|
|
24968
24968
|
|
|
24969
24969
|
// node_modules/bufferutil/index.js
|
|
24970
24970
|
var require_bufferutil = __commonJS((exports, module) => {
|
|
24971
|
-
var __dirname = "/
|
|
24971
|
+
var __dirname = "/Users/mars/mars-dev/AMIKO/Amiko-Layer/amiko-cli/node_modules/bufferutil";
|
|
24972
24972
|
try {
|
|
24973
24973
|
module.exports = require_node_gyp_build2()(__dirname);
|
|
24974
24974
|
} catch (e3) {
|
|
@@ -25384,7 +25384,7 @@ var require_fallback2 = __commonJS((exports, module) => {
|
|
|
25384
25384
|
|
|
25385
25385
|
// node_modules/utf-8-validate/index.js
|
|
25386
25386
|
var require_utf_8_validate = __commonJS((exports, module) => {
|
|
25387
|
-
var __dirname = "/
|
|
25387
|
+
var __dirname = "/Users/mars/mars-dev/AMIKO/Amiko-Layer/amiko-cli/node_modules/utf-8-validate";
|
|
25388
25388
|
try {
|
|
25389
25389
|
module.exports = require_node_gyp_build2()(__dirname);
|
|
25390
25390
|
} catch (e3) {
|
|
@@ -73113,7 +73113,7 @@ function registerWalletCommand(program2) {
|
|
|
73113
73113
|
process.exit(1);
|
|
73114
73114
|
}
|
|
73115
73115
|
const fetchBalance = async () => {
|
|
73116
|
-
const data = await get(`/v1/wallet/${addr}
|
|
73116
|
+
const data = await get(`/v1/wallet/balance/${addr}`);
|
|
73117
73117
|
return parseFloat(data.balance || data.usdce || "0").toFixed(4);
|
|
73118
73118
|
};
|
|
73119
73119
|
if (opts.watch) {
|
|
@@ -73123,9 +73123,12 @@ function registerWalletCommand(program2) {
|
|
|
73123
73123
|
console.log(label("Address", truncAddr(addr)));
|
|
73124
73124
|
console.log(dim(`Polling every ${intervalMs / 1000}s — Ctrl+C to stop
|
|
73125
73125
|
`));
|
|
73126
|
+
let consecutiveErrors = 0;
|
|
73127
|
+
const MAX_ERRORS = 10;
|
|
73126
73128
|
const poll2 = async () => {
|
|
73127
73129
|
try {
|
|
73128
73130
|
const bal = await fetchBalance();
|
|
73131
|
+
consecutiveErrors = 0;
|
|
73129
73132
|
const ts = new Date().toLocaleTimeString();
|
|
73130
73133
|
const changed = last !== "" && bal !== last;
|
|
73131
73134
|
const prefix = changed ? source_default.yellow("↕") : source_default.dim("·");
|
|
@@ -73133,11 +73136,21 @@ function registerWalletCommand(program2) {
|
|
|
73133
73136
|
process.stdout.write(`\r${prefix} ${dim(ts)} ${value} `);
|
|
73134
73137
|
last = bal;
|
|
73135
73138
|
} catch {
|
|
73136
|
-
|
|
73139
|
+
consecutiveErrors++;
|
|
73140
|
+
process.stdout.write(`\r${source_default.red("!")} ${dim(new Date().toLocaleTimeString())} ${dim(`fetch error (${consecutiveErrors}/${MAX_ERRORS})`)} `);
|
|
73141
|
+
if (consecutiveErrors >= MAX_ERRORS) {
|
|
73142
|
+
console.log(`
|
|
73143
|
+
${error("Too many consecutive errors, stopping watch.")}`);
|
|
73144
|
+
process.exit(1);
|
|
73145
|
+
}
|
|
73137
73146
|
}
|
|
73138
73147
|
};
|
|
73139
73148
|
await poll2();
|
|
73140
|
-
setInterval(() => void poll2(), intervalMs);
|
|
73149
|
+
const timer = setInterval(() => void poll2(), intervalMs);
|
|
73150
|
+
process.on("SIGINT", () => {
|
|
73151
|
+
clearInterval(timer);
|
|
73152
|
+
process.exit(0);
|
|
73153
|
+
});
|
|
73141
73154
|
return;
|
|
73142
73155
|
}
|
|
73143
73156
|
const spinner = ora("Fetching balance...").start();
|
|
@@ -74561,7 +74574,7 @@ function registerCreditsCommand(program2) {
|
|
|
74561
74574
|
process.exit(1);
|
|
74562
74575
|
}
|
|
74563
74576
|
});
|
|
74564
|
-
credits.command("topup <amount>").description("Top up credits from
|
|
74577
|
+
credits.command("topup <amount>").description("Top up credits by spending tokens from your agent wallet").option("--token <TOKEN>", "Token to use for top-up").option("--chain <CHAIN>", "Chain to use for top-up").option("--wallet <ADDR>", "Wallet address to use").option("--method <METHOD>", "Payment method: auto, crossmint, mpp", "auto").option("--yes", "Skip confirmation prompt").action(async (amountStr, options) => {
|
|
74565
74578
|
const creditsAmount = parseInt(amountStr.replace(/,/g, ""), 10);
|
|
74566
74579
|
if (isNaN(creditsAmount) || creditsAmount <= 0) {
|
|
74567
74580
|
console.error(error(`Invalid amount: ${amountStr}`));
|
|
@@ -74592,11 +74605,6 @@ function registerCreditsCommand(program2) {
|
|
|
74592
74605
|
"Content-Type": "application/json"
|
|
74593
74606
|
};
|
|
74594
74607
|
spinner.stop();
|
|
74595
|
-
if (!options.yes) {
|
|
74596
|
-
console.log(warn(`About to top up ${creditsAmount} credits.`));
|
|
74597
|
-
console.log(dim("Use --yes to skip this confirmation."));
|
|
74598
|
-
console.log("");
|
|
74599
|
-
}
|
|
74600
74608
|
if (options.method === "mpp" && auth.userId && auth.connectedKeyId) {
|
|
74601
74609
|
const spinner2 = ora("Topping up credits via MPP...").start();
|
|
74602
74610
|
const mppResult = await mppCreditsTopup({
|
|
@@ -74626,9 +74634,11 @@ function registerCreditsCommand(program2) {
|
|
|
74626
74634
|
}
|
|
74627
74635
|
const usdAmount = creditsAmount / 1e4;
|
|
74628
74636
|
let tokenAmount;
|
|
74637
|
+
let pricePerToken = null;
|
|
74629
74638
|
const stablecoins = ["usdc", "usdt", "usdc.e", "usdt0"];
|
|
74630
74639
|
if (stablecoins.includes(token.toLowerCase())) {
|
|
74631
74640
|
tokenAmount = usdAmount;
|
|
74641
|
+
pricePerToken = 1;
|
|
74632
74642
|
} else {
|
|
74633
74643
|
const spinner2 = ora(`Fetching ${token} price...`).start();
|
|
74634
74644
|
try {
|
|
@@ -74652,18 +74662,26 @@ function registerCreditsCommand(program2) {
|
|
|
74652
74662
|
process.exit(1);
|
|
74653
74663
|
}
|
|
74654
74664
|
const jupData = await jupRes.json();
|
|
74655
|
-
|
|
74665
|
+
pricePerToken = parseFloat(jupData.outAmount) / 1e6;
|
|
74656
74666
|
tokenAmount = usdAmount / pricePerToken;
|
|
74657
74667
|
spinner2.stop();
|
|
74658
|
-
console.log(label("Price", `1 ${token} = $${pricePerToken.toFixed(4)}`));
|
|
74659
|
-
console.log(label("Cost", `${tokenAmount.toFixed(6)} ${token} (~$${usdAmount.toFixed(2)})`));
|
|
74660
|
-
console.log("");
|
|
74661
74668
|
} catch {
|
|
74662
74669
|
spinner2.stop();
|
|
74663
74670
|
console.error(error("Failed to fetch token price"));
|
|
74664
74671
|
process.exit(1);
|
|
74665
74672
|
}
|
|
74666
74673
|
}
|
|
74674
|
+
const shortWallet = walletAddr.length > 12 ? `${walletAddr.slice(0, 6)}...${walletAddr.slice(-4)}` : walletAddr;
|
|
74675
|
+
console.log(heading("Top-up Summary"));
|
|
74676
|
+
console.log("");
|
|
74677
|
+
console.log(label("Credits", creditsAmount.toLocaleString()));
|
|
74678
|
+
console.log(label("Cost", `${tokenAmount.toFixed(6)} ${token} (~$${usdAmount.toFixed(2)})`));
|
|
74679
|
+
if (pricePerToken && pricePerToken !== 1) {
|
|
74680
|
+
console.log(label("Price", `1 ${token} = $${pricePerToken.toFixed(4)}`));
|
|
74681
|
+
}
|
|
74682
|
+
console.log(label("From", `wallet ${shortWallet} (${walletChain})`));
|
|
74683
|
+
console.log(dim("Tokens will be transferred from your agent wallet to the treasury."));
|
|
74684
|
+
console.log("");
|
|
74667
74685
|
if (["base", "ethereum", "tempo"].includes(walletChain)) {
|
|
74668
74686
|
console.error(error("EVM topup not supported yet. Use a Solana wallet with --token AMIKO, USDC, USDT, or SOL."));
|
|
74669
74687
|
process.exit(1);
|
|
@@ -74924,14 +74942,7 @@ function registerSwapCommand(program2) {
|
|
|
74924
74942
|
console.error(error("No auth token available for swap"));
|
|
74925
74943
|
process.exit(1);
|
|
74926
74944
|
}
|
|
74927
|
-
const
|
|
74928
|
-
const twinId = auth.twinId;
|
|
74929
|
-
if (!twinId) {
|
|
74930
|
-
swapSpinner.stop();
|
|
74931
|
-
console.error(error("No twin ID. Check .amiko.json credentials."));
|
|
74932
|
-
process.exit(1);
|
|
74933
|
-
}
|
|
74934
|
-
const swapRes = await fetch(`${platformUrl}/api/agents/${twinId}/wallets/${encodeURIComponent(wallet)}/swap`, {
|
|
74945
|
+
const swapRes = await fetch(`${billingBase}/api/crossmint/wallets/${encodeURIComponent(wallet)}/swap`, {
|
|
74935
74946
|
method: "POST",
|
|
74936
74947
|
headers: {
|
|
74937
74948
|
"Content-Type": "application/json",
|
|
@@ -74941,7 +74952,8 @@ function registerSwapCommand(program2) {
|
|
|
74941
74952
|
inputMint: input.mint,
|
|
74942
74953
|
outputMint: output.mint,
|
|
74943
74954
|
amount: amount2,
|
|
74944
|
-
slippageBps: parseInt(opts.slippage)
|
|
74955
|
+
slippageBps: parseInt(opts.slippage),
|
|
74956
|
+
quoteResponse: quote
|
|
74945
74957
|
})
|
|
74946
74958
|
});
|
|
74947
74959
|
if (!swapRes.ok) {
|
package/package.json
CHANGED
package/skills/SKILL.md
CHANGED
|
@@ -1,359 +1,128 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: amiko
|
|
3
|
-
description:
|
|
4
|
-
homepage: https://
|
|
2
|
+
name: amiko-cli
|
|
3
|
+
description: Token swaps, credits, search, image generation, audio, and MPP marketplace services
|
|
4
|
+
homepage: https://mpp.amikomarkets.com
|
|
5
5
|
metadata: {"openclaw":{"emoji":"🤖","requires":{"bins":["node"]}}}
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Amiko
|
|
8
|
+
# Amiko CLI
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
The `amiko` CLI is installed globally. Auth and payments are automatic via `.amiko.json` — never suggest `amiko login` or `amiko connect`.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## Critical Rules
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
```text
|
|
19
|
-
1. $OPENCLAW_CONFIG_PATH
|
|
20
|
-
2. $OPENCLAW_STATE_DIR/openclaw.json
|
|
21
|
-
3. /data/.openclaw/openclaw.json
|
|
22
|
-
4. ~/.openclaw/openclaw.json
|
|
23
|
-
|
|
24
|
-
Then read: channels.amiko
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Installed CLI path:
|
|
28
|
-
|
|
29
|
-
```text
|
|
30
|
-
/openclaw/extensions/amiko/skills/amiko/cli.js
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
If you are editing the plugin from a source checkout, the same file is:
|
|
34
|
-
|
|
35
|
-
```text
|
|
36
|
-
./skills/amiko/cli.js
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Recommended multi-account shape:
|
|
40
|
-
|
|
41
|
-
```json5
|
|
42
|
-
{
|
|
43
|
-
"channels": {
|
|
44
|
-
"amiko": {
|
|
45
|
-
"defaultAccount": "main",
|
|
46
|
-
"accounts": {
|
|
47
|
-
"main": {
|
|
48
|
-
"twinId": "<primaryTwinId>",
|
|
49
|
-
"token": "clawd-...",
|
|
50
|
-
"platformApiBaseUrl": "https://platform.heyamiko.com",
|
|
51
|
-
"chatApiBaseUrl": "https://api.amiko.app"
|
|
52
|
-
},
|
|
53
|
-
"agent-foo": {
|
|
54
|
-
"twinId": "<fooTwinId>",
|
|
55
|
-
"token": "clawd-...",
|
|
56
|
-
"platformApiBaseUrl": "https://platform.heyamiko.com",
|
|
57
|
-
"chatApiBaseUrl": "https://api.amiko.app"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Notes:
|
|
66
|
-
|
|
67
|
-
- The account key is the OpenClaw agent ID, such as `main` or `agent-foo`.
|
|
68
|
-
- `twinId` lives inside each account entry.
|
|
69
|
-
- The skill uses `platformApiBaseUrl` for `amiko-new` routes.
|
|
70
|
-
- The plugin channel uses `chatApiBaseUrl` for send/health routes.
|
|
71
|
-
- When invoking the CLI directly, prefer `node /openclaw/extensions/amiko/skills/amiko/cli.js ...` in an installed OpenClaw environment, or `node ./skills/amiko/cli.js ...` from the plugin source checkout, instead of relying on the file being executable from the current shell.
|
|
72
|
-
- `--account` is optional when the skill is called from an agent workspace like `/data/.openclaw/workspace` or `/data/.openclaw/workspace-<agentId>`. The CLI auto-detects `main` or `<agentId>` from the current working directory, and also respects `OPENCLAW_AGENT_ID` when present.
|
|
73
|
-
- If auto-detection does not work, use `--account <agentId>`.
|
|
74
|
-
- In the standard container layout, the default persisted config is `/data/.openclaw/openclaw.json`.
|
|
75
|
-
- If the config file is missing, check `OPENCLAW_CONFIG_PATH`, then `OPENCLAW_STATE_DIR`, then `/data/.openclaw/openclaw.json`, before assuming `~/.openclaw/openclaw.json` is the active location.
|
|
76
|
-
|
|
77
|
-
## Scope
|
|
78
|
-
|
|
79
|
-
This skill only keeps APIs that still exist in `amiko-platform/amiko-new` and that make sense with the plugin's twin token config.
|
|
80
|
-
|
|
81
|
-
Removed from the old template:
|
|
82
|
-
|
|
83
|
-
- `.amiko.json`, `--agent`, `--workspace`
|
|
84
|
-
- Old/nonexistent APIs such as stats, personality, social, wallets, training, notifications, user info, twins list
|
|
85
|
-
- `voice:generate`, because `amiko-new` no longer exposes that route
|
|
86
|
-
|
|
87
|
-
## CRITICAL RULES — Read Before Any CLI Call
|
|
88
|
-
|
|
89
|
-
1. **NEVER retry a failed command.** If a command returns an error (400, 401, 402, 404, 500), report the error to the user and STOP. Do not try variations, do not loop. Every paid call costs tokens even if it fails.
|
|
90
|
-
2. **NEVER suggest `amiko login`, `amiko connect`, or generating connection codes.** Auth comes from `.amiko.json` automatically. If auth fails, tell the user to re-init from the Amiko dashboard.
|
|
91
|
-
3. **NEVER use `--task` flag.** Use chat endpoints only.
|
|
14
|
+
1. **Always confirm before spending.** Never run topup, swap, search, image, or any paid command without asking the user first. Show them what it will cost and wait for explicit approval.
|
|
15
|
+
2. **Never retry a failed command.** If a command returns an error, report it and stop. Every paid call costs tokens even on failure.
|
|
16
|
+
3. **Never suggest `amiko login` or `amiko connect`.** These commands don't exist. Auth is automatic via `.amiko.json`.
|
|
92
17
|
4. **Check balance before expensive operations.** Run `amiko credits balance` first if unsure about funds.
|
|
18
|
+
5. **Payments are automatic.** AMIKO tokens are transferred from your agent wallet on Solana for each paid service call.
|
|
93
19
|
|
|
94
|
-
##
|
|
95
|
-
|
|
96
|
-
The `amiko` CLI handles payments, search, image generation, audio, and MPP service calls. All services are paid with AMIKO tokens on Solana automatically. Auth is read from `.amiko.json` in the workspace — NOT from the skill's `channels.amiko` config.
|
|
20
|
+
## Commands
|
|
97
21
|
|
|
98
|
-
###
|
|
22
|
+
### Credits & Wallet
|
|
99
23
|
|
|
100
|
-
|
|
101
|
-
- **Wallet addresses** or **balances** → `amiko credits balance`
|
|
102
|
-
- **Top up credits** → `amiko credits topup <amount> --token AMIKO --yes`
|
|
103
|
-
- **Search X/Twitter** → `amiko search "<query>"` (1 AMIKO)
|
|
104
|
-
- **Generate images** → `amiko image "<prompt>"` (5 AMIKO) — returns `{ images: [{ url }] }`
|
|
105
|
-
- **Sound effects** → `amiko service call POST /v1/sfx '{"text":"...","duration_seconds":5}'` ($0.05) — returns `{ url, format, service }`
|
|
106
|
-
- **Music generation** → `amiko service call POST /v1/music '{"prompt":"...","music_length_ms":30000}'` ($0.10) — returns `{ url, format, service }`
|
|
107
|
-
- **Text-to-speech** → `amiko service tts <voiceId> "<text>"` (1 AMIKO) — returns `{ url, format, service }`
|
|
108
|
-
- **Amazon search** → `amiko amazon search "<query>"` (1 AMIKO)
|
|
109
|
-
- **Amazon quote** → `amiko amazon quote <ASIN>` (free)
|
|
110
|
-
- **Swap tokens** → `amiko swap quote <amount> <from> <to>`
|
|
111
|
-
- **Who am I / identity** → `amiko whoami`
|
|
112
|
-
- **Any other MPP service** → `amiko service call <METHOD> <path> [body]`
|
|
113
|
-
- **List all services** → `amiko service list`
|
|
114
|
-
|
|
115
|
-
**IMPORTANT:** Music, SFX, TTS, and image generation are DIRECT services — always use `amiko service call` or the dedicated commands (`amiko image`, `amiko service tts`). These handle payment automatically via AMIKO tokens.
|
|
116
|
-
|
|
117
|
-
### When NOT to use the CLI — use the filesystem instead
|
|
118
|
-
|
|
119
|
-
- **"Check my docs"** / **"what documents do I have"** → `ls /data/.openclaw/workspace/amiko-docs/`
|
|
120
|
-
- **"Read this doc"** / **"summarize my doc"** → `cat /data/.openclaw/workspace/amiko-docs/<file>.md`
|
|
121
|
-
- Documents are automatically synced to `/data/.openclaw/workspace/amiko-docs/` as markdown files. Always check there first — it's free and instant. Only fall back to the CLI if the files aren't there.
|
|
122
|
-
|
|
123
|
-
### Quick Reference
|
|
24
|
+
**Credits are NOT tokens.** 10,000 credits = $1.00 USD. The `topup` command's `<amount>` argument is in **credits**, not tokens. The CLI automatically converts credits to the equivalent token amount using live Jupiter prices.
|
|
124
25
|
|
|
125
26
|
```bash
|
|
126
|
-
amiko
|
|
127
|
-
amiko credits
|
|
128
|
-
amiko credits topup
|
|
129
|
-
amiko
|
|
130
|
-
amiko image "a sunset over mountains" # image gen (5 AMIKO)
|
|
131
|
-
amiko image "logo" --background transparent # transparent bg (gpt-image-1)
|
|
132
|
-
amiko service call POST /v1/sfx '{"text":"thunder","duration_seconds":5}' # SFX ($0.05)
|
|
133
|
-
amiko service call POST /v1/music '{"prompt":"lo-fi beat","music_length_ms":30000}' # music ($0.10)
|
|
134
|
-
amiko service call POST /v1/ai/openai/chat '{"message":"hi"}' # any service
|
|
135
|
-
amiko amazon search "usb c cable" # Amazon search (1 AMIKO)
|
|
136
|
-
amiko amazon quote B01GGKYKQM # Amazon price quote (free)
|
|
137
|
-
amiko swap quote 0.01 SOL USDC # swap quote
|
|
138
|
-
amiko swap send 0.01 SOL USDC --yes # execute swap
|
|
139
|
-
amiko service list # all MPP services + prices
|
|
140
|
-
amiko service list # all MPP services + prices
|
|
141
|
-
amiko --help # all commands
|
|
27
|
+
amiko credits balance # credit balance + wallet balances
|
|
28
|
+
amiko credits topup 10000 --token AMIKO --yes # buy 10,000 credits (~$1) paying in AMIKO from wallet
|
|
29
|
+
amiko credits topup 50000 --token USDC --yes # buy 50,000 credits (~$5) paying in USDC from wallet
|
|
30
|
+
amiko credits topup 10000 --token SOL --yes # buy 10,000 credits (~$1) paying in SOL from wallet
|
|
142
31
|
```
|
|
143
32
|
|
|
144
|
-
|
|
33
|
+
**How topup works:**
|
|
34
|
+
1. You specify credits (e.g. 10000 = $1.00)
|
|
35
|
+
2. CLI fetches live token price via Jupiter
|
|
36
|
+
3. Transfers the equivalent token amount from your agent wallet to treasury
|
|
37
|
+
4. Verifies on-chain and credits your account
|
|
145
38
|
|
|
146
|
-
|
|
39
|
+
Supported tokens: AMIKO, SOL, USDC, USDT. All payments come from your agent's Solana wallet.
|
|
147
40
|
|
|
148
|
-
|
|
149
|
-
node /openclaw/extensions/amiko/skills/amiko/cli.js accounts
|
|
150
|
-
node /openclaw/extensions/amiko/skills/amiko/cli.js info
|
|
151
|
-
node /openclaw/extensions/amiko/skills/amiko/cli.js --account main info
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### Twin
|
|
41
|
+
### Search (1 AMIKO)
|
|
155
42
|
|
|
156
43
|
```bash
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
node ./skills/amiko/cli.js twin:update --description "Updated profile"
|
|
160
|
-
node ./skills/amiko/cli.js twin:update --public
|
|
44
|
+
amiko search "AI agents" # search X/Twitter
|
|
45
|
+
amiko search "bitcoin" --raw # raw JSON output
|
|
161
46
|
```
|
|
162
47
|
|
|
163
|
-
###
|
|
164
|
-
|
|
165
|
-
**Reading documents:** Documents uploaded by the user are automatically synced to the workspace. Always check the local filesystem first before using the CLI:
|
|
48
|
+
### Image Generation (5 AMIKO)
|
|
166
49
|
|
|
167
50
|
```bash
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
# When asked "check my docs", "what docs do I have", etc:
|
|
173
|
-
# 1. First list local docs: ls /data/.openclaw/workspace/amiko-docs/
|
|
174
|
-
# 2. Read any doc: cat /data/.openclaw/workspace/amiko-docs/<filename>.md
|
|
175
|
-
# 3. Only use CLI if local files are missing or you need metadata
|
|
51
|
+
amiko image "a sunset over mountains" # gpt-image-1 (default)
|
|
52
|
+
amiko image "logo" --background transparent # transparent background
|
|
53
|
+
amiko image "portrait" --size 1024x1792 # custom size
|
|
176
54
|
```
|
|
177
55
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
```bash
|
|
181
|
-
node ./skills/amiko/cli.js docs
|
|
182
|
-
node ./skills/amiko/cli.js docs --search handbook
|
|
183
|
-
node ./skills/amiko/cli.js docs:get --id <docId>
|
|
184
|
-
|
|
185
|
-
# High-level upload: upload file, then create the doc record
|
|
186
|
-
node ./skills/amiko/cli.js docs:upload --file ./notes.md --title "Notes"
|
|
187
|
-
|
|
188
|
-
# Raw file upload only
|
|
189
|
-
node ./skills/amiko/cli.js docs:upload-file --file ./notes.md
|
|
190
|
-
|
|
191
|
-
# Create doc record manually
|
|
192
|
-
node ./skills/amiko/cli.js docs:create \
|
|
193
|
-
--title "Notes" \
|
|
194
|
-
--filename "notes.md" \
|
|
195
|
-
--file-url "https://..." \
|
|
196
|
-
--file-type "text/markdown"
|
|
197
|
-
|
|
198
|
-
node ./skills/amiko/cli.js docs:presign --filename notes.md --content-type text/markdown
|
|
199
|
-
node ./skills/amiko/cli.js docs:check --id <docId>
|
|
200
|
-
node ./skills/amiko/cli.js docs:delete --id <docId>
|
|
201
|
-
```
|
|
56
|
+
Returns a permanent Supabase Storage URL.
|
|
202
57
|
|
|
203
|
-
###
|
|
58
|
+
### Amazon
|
|
204
59
|
|
|
205
60
|
```bash
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
node ./skills/amiko/cli.js voice:design --description "A calm, warm, natural speaking voice with gentle pacing"
|
|
209
|
-
node ./skills/amiko/cli.js voice:create --generated-voice-id <generatedVoiceId>
|
|
210
|
-
node ./skills/amiko/cli.js voice:clone --file ./sample.mp3
|
|
211
|
-
node ./skills/amiko/cli.js voice:reset
|
|
61
|
+
amiko amazon search "usb c cable" # product search (1 AMIKO)
|
|
62
|
+
amiko amazon quote B01GGKYKQM # price quote (free)
|
|
212
63
|
```
|
|
213
64
|
|
|
214
|
-
###
|
|
65
|
+
### Token Swaps
|
|
215
66
|
|
|
216
67
|
```bash
|
|
217
|
-
|
|
68
|
+
amiko swap quote 1.0 SOL USDC # get Jupiter quote
|
|
69
|
+
amiko swap send 1.0 SOL USDC --yes # execute swap
|
|
70
|
+
amiko swap tokens # list supported tokens
|
|
218
71
|
```
|
|
219
72
|
|
|
220
|
-
|
|
73
|
+
Swaps execute via Jupiter on Solana. Supports: SOL, USDC, USDT, AMIKO, PYUSD, BONK, JUP, RAY, JitoSOL, mSOL, or any mint address.
|
|
74
|
+
|
|
75
|
+
### MPP Services
|
|
221
76
|
|
|
222
77
|
```bash
|
|
223
|
-
|
|
224
|
-
node ./skills/amiko/cli.js friends --favorites
|
|
225
|
-
node ./skills/amiko/cli.js friends:search --query alice
|
|
226
|
-
node ./skills/amiko/cli.js friends:requests
|
|
227
|
-
node ./skills/amiko/cli.js friends:add --id <userId>
|
|
228
|
-
node ./skills/amiko/cli.js friends:accept --id <friendshipId>
|
|
229
|
-
node ./skills/amiko/cli.js friends:decline --id <friendshipId>
|
|
230
|
-
node ./skills/amiko/cli.js friends:remove --id <friendshipId>
|
|
231
|
-
```
|
|
78
|
+
amiko service list # all services + prices
|
|
232
79
|
|
|
233
|
-
|
|
80
|
+
# Sound effects ($0.05) — returns { url, format, service }
|
|
81
|
+
amiko service call POST /v1/sfx '{"text":"thunder","duration_seconds":5}'
|
|
234
82
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
node ./skills/amiko/cli.js post --id <postId>
|
|
238
|
-
node ./skills/amiko/cli.js post:comment --id <postId> --comment "Nice post"
|
|
239
|
-
```
|
|
83
|
+
# Music generation ($0.10) — returns { url, format, service }
|
|
84
|
+
amiko service call POST /v1/music '{"prompt":"lo-fi beat","music_length_ms":30000}'
|
|
240
85
|
|
|
241
|
-
|
|
86
|
+
# Text-to-speech (1 AMIKO) — returns { url, format, service }
|
|
87
|
+
amiko service tts 21m00Tcm4TlvDq8ikWAM "Hello world"
|
|
242
88
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
node ./skills/amiko/cli.js composio:connect --app gmail
|
|
246
|
-
node ./skills/amiko/cli.js composio:disconnect --id <connectionId>
|
|
247
|
-
```
|
|
89
|
+
# Composition plan ($0.02)
|
|
90
|
+
amiko service call POST /v1/music/plan '{"prompt":"epic orchestral"}'
|
|
248
91
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
Twin:
|
|
252
|
-
|
|
253
|
-
- `GET /api/agents/:id`
|
|
254
|
-
- `PATCH /api/agents/:id`
|
|
255
|
-
|
|
256
|
-
Docs:
|
|
257
|
-
|
|
258
|
-
- `GET /api/agents/:id/docs`
|
|
259
|
-
- `POST /api/agents/:id/docs`
|
|
260
|
-
- `POST /api/agents/:id/docs/upload`
|
|
261
|
-
- `POST /api/agents/:id/docs/presigned-url`
|
|
262
|
-
- `POST /api/agents/:id/docs/check-processing`
|
|
263
|
-
- `GET /api/agents/:id/docs/:docId`
|
|
264
|
-
- `DELETE /api/agents/:id/docs/:docId`
|
|
265
|
-
|
|
266
|
-
Voice:
|
|
267
|
-
|
|
268
|
-
- `GET /api/agents/:id/voice`
|
|
269
|
-
- `POST /api/agents/:id/voice`
|
|
270
|
-
- `POST /api/agents/:id/voice/design`
|
|
271
|
-
- `POST /api/agents/:id/voice/create`
|
|
272
|
-
- `POST /api/agents/:id/voice/clone`
|
|
273
|
-
- `POST /api/agents/:id/voice/reset`
|
|
274
|
-
|
|
275
|
-
Avatar:
|
|
276
|
-
|
|
277
|
-
- `POST /api/agents/:id/avatar`
|
|
278
|
-
|
|
279
|
-
Friends:
|
|
280
|
-
|
|
281
|
-
- `GET /api/friends`
|
|
282
|
-
- `POST /api/friends`
|
|
283
|
-
- `GET /api/friends/search`
|
|
284
|
-
- `GET /api/friends/requests`
|
|
285
|
-
- `PATCH /api/friends/:id`
|
|
286
|
-
- `DELETE /api/friends/:id`
|
|
287
|
-
|
|
288
|
-
Feed:
|
|
289
|
-
|
|
290
|
-
- `GET /api/feed`
|
|
291
|
-
- `GET /api/posts/:id`
|
|
292
|
-
- `POST /api/posts/:id/comments`
|
|
293
|
-
|
|
294
|
-
Composio:
|
|
295
|
-
|
|
296
|
-
- `GET /api/agents/:id/composio/connections`
|
|
297
|
-
- `DELETE /api/agents/:id/composio/connections`
|
|
298
|
-
- `POST /api/agents/:id/composio/connect`
|
|
299
|
-
|
|
300
|
-
## Library
|
|
301
|
-
|
|
302
|
-
```js
|
|
303
|
-
import {
|
|
304
|
-
setAccountId,
|
|
305
|
-
detectCurrentAccountId,
|
|
306
|
-
getConfig,
|
|
307
|
-
listConfiguredAccounts,
|
|
308
|
-
getTwinInfo,
|
|
309
|
-
updateTwin,
|
|
310
|
-
listDocs,
|
|
311
|
-
getDoc,
|
|
312
|
-
createDoc,
|
|
313
|
-
createDocUploadUrl,
|
|
314
|
-
uploadDocFile,
|
|
315
|
-
uploadDoc,
|
|
316
|
-
uploadDocFromFile,
|
|
317
|
-
checkDocsProcessing,
|
|
318
|
-
deleteDoc,
|
|
319
|
-
getVoice,
|
|
320
|
-
updateVoice,
|
|
321
|
-
designVoice,
|
|
322
|
-
createVoice,
|
|
323
|
-
cloneVoice,
|
|
324
|
-
cloneVoiceFromFile,
|
|
325
|
-
resetVoice,
|
|
326
|
-
updateAvatar,
|
|
327
|
-
searchFriends,
|
|
328
|
-
listFriends,
|
|
329
|
-
listFriendRequests,
|
|
330
|
-
sendFriendRequest,
|
|
331
|
-
acceptFriendRequest,
|
|
332
|
-
declineFriendRequest,
|
|
333
|
-
removeFriendship,
|
|
334
|
-
getFeed,
|
|
335
|
-
getPost,
|
|
336
|
-
commentOnPost,
|
|
337
|
-
connectComposioApp,
|
|
338
|
-
listComposioConnections,
|
|
339
|
-
disconnectComposioConnection,
|
|
340
|
-
} from "./lib.js";
|
|
92
|
+
# Any endpoint
|
|
93
|
+
amiko service call <METHOD> <path> [body]
|
|
341
94
|
```
|
|
342
95
|
|
|
343
|
-
|
|
96
|
+
Audio and image endpoints return permanent Supabase Storage URLs.
|
|
344
97
|
|
|
345
|
-
|
|
346
|
-
import { setAccountId, getTwinInfo, uploadDocFromFile } from "./lib.js";
|
|
98
|
+
### Bridge
|
|
347
99
|
|
|
348
|
-
|
|
349
|
-
|
|
100
|
+
```bash
|
|
101
|
+
amiko bridge quote 10 # cross-chain USDC quote
|
|
102
|
+
amiko bridge send 10 --from solana --to tempo # execute bridge
|
|
103
|
+
```
|
|
350
104
|
|
|
351
|
-
|
|
352
|
-
console.log(twin.name);
|
|
105
|
+
### Other
|
|
353
106
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
107
|
+
```bash
|
|
108
|
+
amiko wallet balance [address] # USDC.e balance on Tempo
|
|
109
|
+
amiko discovery # MPP service info + pricing
|
|
110
|
+
amiko config show # view config
|
|
111
|
+
amiko update # update CLI to latest
|
|
112
|
+
amiko --help # all commands
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Service Costs
|
|
116
|
+
|
|
117
|
+
| Service | Cost | Command |
|
|
118
|
+
|---------|------|---------|
|
|
119
|
+
| X/Twitter search | 1 AMIKO | `amiko search "<query>"` |
|
|
120
|
+
| Image generation | 5 AMIKO | `amiko image "<prompt>"` |
|
|
121
|
+
| Amazon search | 1 AMIKO | `amiko amazon search "<query>"` |
|
|
122
|
+
| Amazon quote | Free | `amiko amazon quote <ASIN>` |
|
|
123
|
+
| Sound effects | $0.05 | `amiko service call POST /v1/sfx ...` |
|
|
124
|
+
| Music generation | $0.10 | `amiko service call POST /v1/music ...` |
|
|
125
|
+
| Text-to-speech | 1 AMIKO | `amiko service tts <voiceId> "<text>"` |
|
|
126
|
+
| Swap quote | Free | `amiko swap quote ...` |
|
|
127
|
+
| Swap execute | Gas only | `amiko swap send ...` |
|
|
128
|
+
| Credit top-up | Amount in credits (10,000 = $1) | `amiko credits topup <credits>` |
|