@heyamiko/amiko-cli 0.9.0-beta.1 → 0.9.0-beta.5
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 +16 -19
- package/dist/index.js +108 -25
- package/package.json +1 -1
- package/skills/SKILL.md +123 -166
package/README.md
CHANGED
|
@@ -41,8 +41,8 @@ amiko market search "AI agents" --wallet <solana-address>
|
|
|
41
41
|
amiko market image "a sunset over mountains" --wallet <solana-address>
|
|
42
42
|
|
|
43
43
|
# Swap tokens on Solana
|
|
44
|
-
amiko swap quote 1.0 SOL USDC
|
|
45
|
-
amiko swap send 1.0 SOL USDC --yes
|
|
44
|
+
amiko wallets swap quote 1.0 SOL USDC
|
|
45
|
+
amiko wallets swap send 1.0 SOL USDC --yes
|
|
46
46
|
|
|
47
47
|
# Call any MPP service
|
|
48
48
|
amiko market service list
|
|
@@ -125,17 +125,17 @@ amiko market amazon quote B01GGKYKQM # price quote (free)
|
|
|
125
125
|
## Swap
|
|
126
126
|
|
|
127
127
|
```bash
|
|
128
|
-
amiko swap quote <amount> <from> <to> # get Jupiter quote
|
|
129
|
-
amiko swap send <amount> <from> <to> # execute swap via Crossmint
|
|
130
|
-
amiko swap tokens # list supported tokens
|
|
128
|
+
amiko wallets swap quote <amount> <from> <to> # get Jupiter quote
|
|
129
|
+
amiko wallets swap send <amount> <from> <to> # execute swap via Crossmint
|
|
130
|
+
amiko wallets swap tokens # list supported tokens
|
|
131
131
|
```
|
|
132
132
|
|
|
133
133
|
**Examples:**
|
|
134
134
|
|
|
135
135
|
```bash
|
|
136
|
-
amiko swap quote 1.0 SOL USDC
|
|
137
|
-
amiko swap send 0.5 USDC AMIKO --yes
|
|
138
|
-
amiko swap send 100 AMIKO SOL --slippage 100
|
|
136
|
+
amiko wallets swap quote 1.0 SOL USDC
|
|
137
|
+
amiko wallets swap send 0.5 USDC AMIKO --yes
|
|
138
|
+
amiko wallets swap send 100 AMIKO SOL --slippage 100
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
Swaps execute via Jupiter on Solana. Supports SOL, USDC, USDT, AMIKO, PYUSD, BONK, JUP, RAY, JitoSOL, mSOL, or any mint address. `swap send` is hard-gated: in a non-interactive shell you must pass `--yes` after quoting the cost to the user (`Solana gas + 10bps platform fee`).
|
|
@@ -143,12 +143,12 @@ Swaps execute via Jupiter on Solana. Supports SOL, USDC, USDT, AMIKO, PYUSD, BON
|
|
|
143
143
|
## Bridge
|
|
144
144
|
|
|
145
145
|
```bash
|
|
146
|
-
amiko bridge quote <amount> # cross-chain USDC quote via Across Protocol
|
|
147
|
-
amiko bridge send <amount> # execute bridge transfer (gated — requires --yes in non-TTY)
|
|
148
|
-
amiko bridge send <amount> --raw # print transaction JSON without sending (no gate)
|
|
149
|
-
amiko bridge status <txHash> # check bridge status
|
|
150
|
-
amiko bridge routes # available bridge routes
|
|
151
|
-
amiko bridge limits # min/max limits per route
|
|
146
|
+
amiko wallets bridge quote <amount> # cross-chain USDC quote via Across Protocol
|
|
147
|
+
amiko wallets bridge send <amount> # execute bridge transfer (gated — requires --yes in non-TTY)
|
|
148
|
+
amiko wallets bridge send <amount> --raw # print transaction JSON without sending (no gate)
|
|
149
|
+
amiko wallets bridge status <txHash> # check bridge status
|
|
150
|
+
amiko wallets bridge routes # available bridge routes
|
|
151
|
+
amiko wallets bridge limits # min/max limits per route
|
|
152
152
|
```
|
|
153
153
|
|
|
154
154
|
Default route: Solana → Tempo. Use `--from` and `--to` flags for other chains. Like `swap send`, `bridge send` refuses to run in a non-interactive shell without `--yes` so agents must quote the Across fee + gas to the user before executing.
|
|
@@ -265,7 +265,6 @@ Supported keys (both camelCase and SCREAMING_SNAKE_CASE):
|
|
|
265
265
|
- `amikoTwinId` / `AMIKO_TWIN_ID` — twin identifier (needed for paid ops)
|
|
266
266
|
- `amikoUserId` / `AMIKO_USER_ID` — user identifier (optional, for MPP topup)
|
|
267
267
|
- `amikoPlatformUrl` / `AMIKO_PLATFORM_URL` — platform base URL override
|
|
268
|
-
- `billingBase` — billing API URL override
|
|
269
268
|
- `apiBase` — MPP service URL override
|
|
270
269
|
|
|
271
270
|
## Configuration
|
|
@@ -274,7 +273,6 @@ Defaults (no config file needed — override in `.amiko.json` if needed):
|
|
|
274
273
|
|
|
275
274
|
| Key | Default |
|
|
276
275
|
|-----|---------|
|
|
277
|
-
| `billingBase` | `https://billing.heyamiko.com` |
|
|
278
276
|
| `apiBase` | `https://mpp.amikomarkets.com` |
|
|
279
277
|
| `platformUrl` | `https://platform.heyamiko.com` |
|
|
280
278
|
|
|
@@ -372,9 +370,8 @@ Every new command accepts `--json` for structured output and `--twin <id>` where
|
|
|
372
370
|
|
|
373
371
|
| Client | Base URL | Purpose |
|
|
374
372
|
|--------|----------|---------|
|
|
375
|
-
|
|
|
376
|
-
| MPP API | `mpp.amikomarkets.com` | Marketplace services
|
|
377
|
-
| Billing API | `billing.heyamiko.com` | Credits, topup, wallet transfers/swaps, keys |
|
|
373
|
+
| Platform | `platform.heyamiko.com` | Twin identity, wallets, credits, transfers/swaps, docs, voice, avatar, friends, feed, Composio |
|
|
374
|
+
| MPP API | `mpp.amikomarkets.com` | Marketplace services: search, image, amazon, audio |
|
|
378
375
|
|
|
379
376
|
## Build
|
|
380
377
|
|
package/dist/index.js
CHANGED
|
@@ -17287,7 +17287,6 @@ function resolveAuth() {
|
|
|
17287
17287
|
twinId: asString(parsed.amikoTwinId) ?? asString(parsed.AMIKO_TWIN_ID),
|
|
17288
17288
|
userId: asString(parsed.amikoUserId) ?? asString(parsed.AMIKO_USER_ID),
|
|
17289
17289
|
platformUrl: asString(parsed.amikoPlatformUrl) ?? asString(parsed.AMIKO_PLATFORM_URL),
|
|
17290
|
-
billingBase: asString(parsed.billingBase),
|
|
17291
17290
|
apiBase: asString(parsed.apiBase)
|
|
17292
17291
|
};
|
|
17293
17292
|
}
|
|
@@ -17305,7 +17304,6 @@ function requireAuth() {
|
|
|
17305
17304
|
// src/lib/config.ts
|
|
17306
17305
|
var DEFAULTS = {
|
|
17307
17306
|
apiBase: "https://mpp.amikomarkets.com",
|
|
17308
|
-
billingBase: "https://billing.heyamiko.com",
|
|
17309
17307
|
platformUrl: "https://platform.heyamiko.com",
|
|
17310
17308
|
siteBase: "https://platform.heyamiko.com"
|
|
17311
17309
|
};
|
|
@@ -17313,7 +17311,6 @@ function loadConfig() {
|
|
|
17313
17311
|
const auth = resolveAuth();
|
|
17314
17312
|
return {
|
|
17315
17313
|
apiBase: auth.apiBase ?? DEFAULTS.apiBase,
|
|
17316
|
-
billingBase: auth.billingBase ?? DEFAULTS.billingBase,
|
|
17317
17314
|
platformUrl: auth.platformUrl ?? DEFAULTS.platformUrl,
|
|
17318
17315
|
siteBase: DEFAULTS.siteBase,
|
|
17319
17316
|
twinToken: auth.twinToken,
|
|
@@ -17385,7 +17382,6 @@ function registerConfigCommand(program2) {
|
|
|
17385
17382
|
console.log("");
|
|
17386
17383
|
console.log(heading("Endpoints"));
|
|
17387
17384
|
console.log(label(" MPP service", config.apiBase));
|
|
17388
|
-
console.log(label(" Billing API", config.billingBase));
|
|
17389
17385
|
console.log(label(" Platform", config.platformUrl));
|
|
17390
17386
|
console.log("");
|
|
17391
17387
|
console.log(heading("Identity"));
|
|
@@ -18698,8 +18694,8 @@ function registerBridgeCommand(program2) {
|
|
|
18698
18694
|
}
|
|
18699
18695
|
if (quote.swapTx) {
|
|
18700
18696
|
console.log("");
|
|
18701
|
-
console.log(dim('Transaction ready. Run "amiko bridge send" to execute.'));
|
|
18702
|
-
console.log(dim(` amiko bridge send ${amountStr} --from ${opts.from} --to ${opts.to}`));
|
|
18697
|
+
console.log(dim('Transaction ready. Run "amiko wallets bridge send" to execute.'));
|
|
18698
|
+
console.log(dim(` amiko wallets bridge send ${amountStr} --from ${opts.from} --to ${opts.to}`));
|
|
18703
18699
|
}
|
|
18704
18700
|
} catch (err) {
|
|
18705
18701
|
spinner.stop();
|
|
@@ -18752,7 +18748,7 @@ function registerBridgeCommand(program2) {
|
|
|
18752
18748
|
cost: quote.fees?.total ? `${formatUsdcAmount(quote.fees.total.amount)} USDC bridge fee + gas` : "gas + Across fee",
|
|
18753
18749
|
summary: `bridge ${formatUsdcAmount(quote.inputAmount)} USDC ${originName} → ${destName}`,
|
|
18754
18750
|
yes: opts.yes,
|
|
18755
|
-
commandExample: `amiko bridge send ${amountStr} --from ${opts.from} --to ${opts.to}`
|
|
18751
|
+
commandExample: `amiko wallets bridge send ${amountStr} --from ${opts.from} --to ${opts.to}`
|
|
18756
18752
|
});
|
|
18757
18753
|
}
|
|
18758
18754
|
if (opts.raw) {
|
|
@@ -18831,7 +18827,7 @@ function registerBridgeCommand(program2) {
|
|
|
18831
18827
|
console.log(dim(output.trim()));
|
|
18832
18828
|
console.log("");
|
|
18833
18829
|
console.log(dim("Track status:"));
|
|
18834
|
-
console.log(dim(` amiko bridge status <txHash> --chain ${originChainId}`));
|
|
18830
|
+
console.log(dim(` amiko wallets bridge status <txHash> --chain ${originChainId}`));
|
|
18835
18831
|
} catch (err) {
|
|
18836
18832
|
bridgeSpinner.fail("Bridge transaction failed");
|
|
18837
18833
|
console.error(error(err instanceof Error ? err.message : "Transaction failed"));
|
|
@@ -19057,15 +19053,9 @@ function formatError(status, body, path) {
|
|
|
19057
19053
|
async function fetchCreditsBalance(auth) {
|
|
19058
19054
|
if (!auth.twinToken)
|
|
19059
19055
|
return null;
|
|
19060
|
-
const base = (auth.billingBase || "https://billing.heyamiko.com").replace(/\/$/, "");
|
|
19061
19056
|
try {
|
|
19062
|
-
const
|
|
19063
|
-
|
|
19064
|
-
});
|
|
19065
|
-
if (!res.ok)
|
|
19066
|
-
return null;
|
|
19067
|
-
const data = await res.json();
|
|
19068
|
-
const raw = data.displayBalance ?? Number(data.credits?.balance ?? 0);
|
|
19057
|
+
const data = await amikoWebFetch(auth, `/api/proxy/service/api/credits`);
|
|
19058
|
+
const raw = data.displayBalance;
|
|
19069
19059
|
return typeof raw === "number" && isFinite(raw) ? Math.round(raw) : null;
|
|
19070
19060
|
} catch {
|
|
19071
19061
|
return null;
|
|
@@ -19077,8 +19067,7 @@ async function printBalanceRemaining(auth) {
|
|
|
19077
19067
|
console.log(dim("Balance: (could not fetch)"));
|
|
19078
19068
|
return;
|
|
19079
19069
|
}
|
|
19080
|
-
|
|
19081
|
-
console.log(label("Balance", `${balance.toLocaleString()} credits (~$${usd2})`));
|
|
19070
|
+
console.log(label("Balance", `${balance.toLocaleString()} credits`));
|
|
19082
19071
|
}
|
|
19083
19072
|
|
|
19084
19073
|
// src/lib/mpp-topup.ts
|
|
@@ -19170,8 +19159,7 @@ function registerCreditsCommand(program2) {
|
|
|
19170
19159
|
console.log(dim(" Could not fetch credit balance"));
|
|
19171
19160
|
return;
|
|
19172
19161
|
}
|
|
19173
|
-
|
|
19174
|
-
console.log(label("Balance", `${source_default.bold(balance.toLocaleString())} credits (~$${usd2})`));
|
|
19162
|
+
console.log(label("Balance", source_default.bold(`${balance.toLocaleString()} credits`)));
|
|
19175
19163
|
});
|
|
19176
19164
|
credits.command("topup [amount]").description("Top up credits by spending tokens from your agent wallet. <amount> is in credits (10,000 = $1.00). Use --usd <n> to specify dollars, or --spend <n> to specify a token amount (e.g. 1 SOL worth).").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("--key-id <ID>", "Platform API key ID (required for --method mpp)").option("--usd <amount>", "Amount in USD instead of credits (e.g. --usd 1 = 10,000 credits)").option("--spend <amount>", "Spend this many units of --token and convert to credits at current price").option("--yes", "Skip the interactive Proceed? prompt").action(async (amountStr, options) => {
|
|
19177
19165
|
const inputs = [amountStr, options.usd, options.spend].filter((v) => v != null && v !== "");
|
|
@@ -19465,7 +19453,7 @@ function registerSwapCommand(program2) {
|
|
|
19465
19453
|
console.log(label("Route", dim(route)));
|
|
19466
19454
|
}
|
|
19467
19455
|
console.log("");
|
|
19468
|
-
console.log(dim(`To execute: amiko swap send ${amountStr} ${fromToken} ${toToken}`));
|
|
19456
|
+
console.log(dim(`To execute: amiko wallets swap send ${amountStr} ${fromToken} ${toToken}`));
|
|
19469
19457
|
} catch (err) {
|
|
19470
19458
|
spinner.stop();
|
|
19471
19459
|
console.error(error(err instanceof Error ? err.message : "Failed to get quote"));
|
|
@@ -19514,7 +19502,7 @@ function registerSwapCommand(program2) {
|
|
|
19514
19502
|
cost: "Solana gas + 10bps platform fee",
|
|
19515
19503
|
summary: `swap ${amountStr} ${fromToken.toUpperCase()} → ~${(Number(quote.outAmount) / 10 ** output.decimals).toFixed(6)} ${output.symbol}`,
|
|
19516
19504
|
yes: opts.yes,
|
|
19517
|
-
commandExample: `amiko swap send ${amountStr} ${fromToken} ${toToken}`
|
|
19505
|
+
commandExample: `amiko wallets swap send ${amountStr} ${fromToken} ${toToken}`
|
|
19518
19506
|
});
|
|
19519
19507
|
const swapSpinner = ora("Executing swap via platform...").start();
|
|
19520
19508
|
let swapData;
|
|
@@ -19561,7 +19549,7 @@ function registerSwapCommand(program2) {
|
|
|
19561
19549
|
console.log(` ${source_default.cyan(t.symbol.padEnd(10))} ${t.name.padEnd(25)} ${dim(truncAddr(t.address))}`);
|
|
19562
19550
|
}
|
|
19563
19551
|
console.log("");
|
|
19564
|
-
console.log(dim("Use symbol or mint address: amiko swap quote 5 usdt usdc"));
|
|
19552
|
+
console.log(dim("Use symbol or mint address: amiko wallets swap quote 5 usdt usdc"));
|
|
19565
19553
|
} catch (err) {
|
|
19566
19554
|
spinner.stop();
|
|
19567
19555
|
console.error(error(err instanceof Error ? err.message : "Failed to fetch tokens"));
|
|
@@ -21145,6 +21133,98 @@ function registerComposioCommand(program2) {
|
|
|
21145
21133
|
});
|
|
21146
21134
|
}
|
|
21147
21135
|
|
|
21136
|
+
// src/commands/wallets.ts
|
|
21137
|
+
function formatBalance(b) {
|
|
21138
|
+
const n = Number(b.amount) / 10 ** b.decimals;
|
|
21139
|
+
if (!isFinite(n))
|
|
21140
|
+
return b.amount;
|
|
21141
|
+
return n.toLocaleString(undefined, { maximumFractionDigits: 6 });
|
|
21142
|
+
}
|
|
21143
|
+
function registerWalletsBalanceCommand(program2) {
|
|
21144
|
+
program2.command("balance <address>").description("Sync and show balance for a single wallet").option("--json", "Output raw JSON").action(async (address2, opts) => {
|
|
21145
|
+
let auth;
|
|
21146
|
+
try {
|
|
21147
|
+
auth = requireAuth();
|
|
21148
|
+
} catch (e) {
|
|
21149
|
+
console.error(error(e instanceof Error ? e.message : String(e)));
|
|
21150
|
+
process.exit(1);
|
|
21151
|
+
}
|
|
21152
|
+
const spinner = opts.json ? null : ora("Syncing wallet balance...").start();
|
|
21153
|
+
try {
|
|
21154
|
+
const data = await amikoWebFetch(auth, `/api/agents/${encodeURIComponent(auth.twinId)}/wallets/${encodeURIComponent(address2)}/balance`);
|
|
21155
|
+
spinner?.stop();
|
|
21156
|
+
if (opts.json) {
|
|
21157
|
+
console.log(JSON.stringify(data, null, 2));
|
|
21158
|
+
return;
|
|
21159
|
+
}
|
|
21160
|
+
console.log(heading("Wallet Balance"));
|
|
21161
|
+
console.log("");
|
|
21162
|
+
console.log(label("Address", data.walletAddress));
|
|
21163
|
+
console.log(label("Chain", data.chain_type));
|
|
21164
|
+
if (data.last_synced_at) {
|
|
21165
|
+
console.log(label("Synced", data.last_synced_at));
|
|
21166
|
+
}
|
|
21167
|
+
const entries = Object.entries(data.balances || {});
|
|
21168
|
+
if (entries.length === 0) {
|
|
21169
|
+
console.log(dim(" No balances."));
|
|
21170
|
+
return;
|
|
21171
|
+
}
|
|
21172
|
+
console.log("");
|
|
21173
|
+
const rows = entries.map(([key, v]) => [` ${key}`, formatBalance(v)]);
|
|
21174
|
+
console.log(table(rows));
|
|
21175
|
+
} catch (e) {
|
|
21176
|
+
spinner?.stop();
|
|
21177
|
+
console.error(error(e instanceof Error ? e.message : "Failed to fetch balance"));
|
|
21178
|
+
process.exit(1);
|
|
21179
|
+
}
|
|
21180
|
+
});
|
|
21181
|
+
}
|
|
21182
|
+
function registerWalletsListCommand(program2) {
|
|
21183
|
+
program2.command("list").alias("ls").description("List wallets for the authenticated twin").option("--json", "Output raw JSON").action(async (opts) => {
|
|
21184
|
+
let auth;
|
|
21185
|
+
try {
|
|
21186
|
+
auth = requireAuth();
|
|
21187
|
+
} catch (e) {
|
|
21188
|
+
console.error(error(e instanceof Error ? e.message : String(e)));
|
|
21189
|
+
process.exit(1);
|
|
21190
|
+
}
|
|
21191
|
+
const spinner = opts.json ? null : ora("Fetching wallets...").start();
|
|
21192
|
+
try {
|
|
21193
|
+
const data = await amikoWebFetch(auth, `/api/agents/${encodeURIComponent(auth.twinId)}/wallets`);
|
|
21194
|
+
spinner?.stop();
|
|
21195
|
+
if (opts.json) {
|
|
21196
|
+
console.log(JSON.stringify(data, null, 2));
|
|
21197
|
+
return;
|
|
21198
|
+
}
|
|
21199
|
+
const wallets = data.wallets || [];
|
|
21200
|
+
if (wallets.length === 0) {
|
|
21201
|
+
console.log(dim("No wallets found."));
|
|
21202
|
+
return;
|
|
21203
|
+
}
|
|
21204
|
+
console.log(heading("Wallets"));
|
|
21205
|
+
console.log("");
|
|
21206
|
+
for (const w of wallets) {
|
|
21207
|
+
console.log(label("Chain", `${w.chain} (${w.chain_type})`));
|
|
21208
|
+
if (w.name)
|
|
21209
|
+
console.log(label("Name", w.name));
|
|
21210
|
+
console.log(label("Address", w.wallet_address));
|
|
21211
|
+
console.log(label("Short", truncAddr(w.wallet_address)));
|
|
21212
|
+
const balances = Object.entries(w.balance || {}).filter(([, v]) => Number(v.amount) > 0);
|
|
21213
|
+
if (balances.length > 0) {
|
|
21214
|
+
console.log(dim(" Balances:"));
|
|
21215
|
+
const rows = balances.map(([key, v]) => [` ${key}`, formatBalance(v)]);
|
|
21216
|
+
console.log(table(rows));
|
|
21217
|
+
}
|
|
21218
|
+
console.log("");
|
|
21219
|
+
}
|
|
21220
|
+
} catch (e) {
|
|
21221
|
+
spinner?.stop();
|
|
21222
|
+
console.error(error(e instanceof Error ? e.message : "Failed to list wallets"));
|
|
21223
|
+
process.exit(1);
|
|
21224
|
+
}
|
|
21225
|
+
});
|
|
21226
|
+
}
|
|
21227
|
+
|
|
21148
21228
|
// src/index.ts
|
|
21149
21229
|
var require2 = createRequire2(import.meta.url);
|
|
21150
21230
|
var { version: PKG_VERSION } = require2("../package.json");
|
|
@@ -21154,12 +21234,15 @@ if (didOnboard)
|
|
|
21154
21234
|
var program2 = new Command;
|
|
21155
21235
|
program2.name("amiko").description("Amiko CLI — swap tokens, manage credits, bridge cross-chain, and call marketplace services").version(PKG_VERSION);
|
|
21156
21236
|
var market = program2.command("market").description("MPP marketplace — discover and call paid AMIKO services");
|
|
21237
|
+
var wallets = program2.command("wallets").description("Manage twin wallets — list, swap, bridge");
|
|
21157
21238
|
registerCreditsCommand(program2);
|
|
21158
21239
|
registerSearchCommand(market);
|
|
21159
21240
|
registerImageCommand(market);
|
|
21160
21241
|
registerAmazonCommand(market);
|
|
21161
|
-
|
|
21162
|
-
|
|
21242
|
+
registerWalletsListCommand(wallets);
|
|
21243
|
+
registerWalletsBalanceCommand(wallets);
|
|
21244
|
+
registerSwapCommand(wallets);
|
|
21245
|
+
registerBridgeCommand(wallets);
|
|
21163
21246
|
registerConfigCommand(program2);
|
|
21164
21247
|
registerServicesCommand(market);
|
|
21165
21248
|
registerDiscoveryCommand(market);
|
package/package.json
CHANGED
package/skills/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: amiko-cli
|
|
3
|
-
description: Token swaps, credits, search
|
|
4
|
-
homepage: https://
|
|
3
|
+
description: Token swaps, credits, marketplace (search/image/amazon/audio), and twin/social operations on Amiko
|
|
4
|
+
homepage: https://platform.heyamiko.com
|
|
5
5
|
metadata: {"openclaw":{"emoji":"🤖","requires":{"bins":["node"]}}}
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -9,238 +9,195 @@ metadata: {"openclaw":{"emoji":"🤖","requires":{"bins":["node"]}}}
|
|
|
9
9
|
|
|
10
10
|
## How to invoke
|
|
11
11
|
|
|
12
|
-
Run `amiko <command>` via your **shell execution tool** (e.g. `bash`). This skill is
|
|
12
|
+
Run `amiko <command>` via your **shell execution tool** (e.g. `bash`). This skill is documentation, not a callable tool. **Do NOT** try to call `amiko_cli`, `amiko-cli`, `amiko`, or this skill's name as a tool — no such tool exists. The only working invocation is the shell command `amiko`.
|
|
13
13
|
|
|
14
|
-
The `amiko` CLI is installed globally. Auth
|
|
14
|
+
The `amiko` CLI is installed globally. Auth is automatic via `.amiko.json` (walking up from cwd, falling back to `/data/.openclaw/workspace/.amiko.json`) — never suggest `amiko login` or `amiko connect`.
|
|
15
|
+
|
|
16
|
+
## Command layout (v0.9+)
|
|
17
|
+
|
|
18
|
+
The top level has three groups:
|
|
19
|
+
|
|
20
|
+
- `amiko market <cmd>` — paid MPP services (search, image, amazon, service, discover)
|
|
21
|
+
- `amiko wallets <cmd>` — wallet operations (list, balance, swap, bridge)
|
|
22
|
+
- `amiko credits <cmd>` — credit balance and topup
|
|
23
|
+
|
|
24
|
+
Plus flat commands: `config`, `update`, `accounts`, `info`, `twin:*`, `docs*`, `voice:*`, `avatar:*`, `friends*`, `feed`, `post:*`, `composio:*`.
|
|
15
25
|
|
|
16
26
|
## Critical Rules
|
|
17
27
|
|
|
18
|
-
1. **Every paid / value-moving command is hard-gated on `--yes` in a non-interactive shell.** The CLI
|
|
19
|
-
2. **After every paid command, report the remaining balance
|
|
20
|
-
3. **Never retry a failed command.**
|
|
21
|
-
4. **Never suggest `amiko login` or `amiko connect`.** These
|
|
22
|
-
5. **Check balance before expensive operations.** Run `amiko credits balance` first if unsure
|
|
23
|
-
6. **Payments are automatic.**
|
|
28
|
+
1. **Every paid / value-moving command is hard-gated on `--yes` in a non-interactive shell.** The CLI *refuses* to run `market image`, `market search`, `market amazon search`, `market service call`, `market service tts`, `market service stt`, `market service chat`, `credits topup`, `wallets swap send`, or `wallets bridge send` unless `--yes` is passed. The refusal is loud: it prints the cost and the command you should re-run. **Quote the cost to the user, get explicit approval, THEN append `--yes`**. Same for destructive non-paid commands (`twin:update --public`, `docs:delete`, `friends:remove`, `avatar:update`, `voice:reset`, `composio:disconnect`).
|
|
29
|
+
2. **After every paid command, report the remaining balance.** The CLI prints a `Balance: N credits` line at the end of every paid command — include that figure in your reply.
|
|
30
|
+
3. **Never retry a failed command.** Report the error and stop. Every paid call costs tokens even on failure.
|
|
31
|
+
4. **Never suggest `amiko login` or `amiko connect`.** These don't exist. Auth is automatic via `.amiko.json`.
|
|
32
|
+
5. **Check balance before expensive operations.** Run `amiko credits balance` first if unsure.
|
|
33
|
+
6. **Payments are automatic.** The platform signs and moves tokens from the twin's wallet for each paid call — the CLI never holds keys.
|
|
24
34
|
|
|
25
35
|
### Pricing cheat sheet (quote this to the user before running)
|
|
26
36
|
|
|
27
37
|
| Command | Cost |
|
|
28
38
|
|---------|------|
|
|
29
|
-
| `amiko search "<query>"` | 1 AMIKO |
|
|
30
|
-
| `amiko image "<prompt>"` | 5 AMIKO |
|
|
31
|
-
| `amiko amazon search "<query>"` | 1 AMIKO |
|
|
32
|
-
| `amiko amazon quote <ASIN>` | Free |
|
|
33
|
-
| `amiko service tts <voiceId> "<text>"` | 1 AMIKO |
|
|
34
|
-
| `amiko service call POST /v1/sfx ...` | $0.05 |
|
|
35
|
-
| `amiko service call POST /v1/music ...` | $0.10 |
|
|
36
|
-
| `amiko service call POST /v1/music/plan ...` | $0.02 |
|
|
37
|
-
| `amiko swap quote ...` | Free |
|
|
38
|
-
| `amiko swap send ...` | Solana gas
|
|
39
|
+
| `amiko market search "<query>"` | 1 AMIKO |
|
|
40
|
+
| `amiko market image "<prompt>"` | 5 AMIKO |
|
|
41
|
+
| `amiko market amazon search "<query>"` | 1 AMIKO |
|
|
42
|
+
| `amiko market amazon quote <ASIN>` | Free |
|
|
43
|
+
| `amiko market service tts <voiceId> "<text>"` | 1 AMIKO |
|
|
44
|
+
| `amiko market service call POST /v1/sfx ...` | $0.05 |
|
|
45
|
+
| `amiko market service call POST /v1/music ...` | $0.10 |
|
|
46
|
+
| `amiko market service call POST /v1/music/plan ...` | $0.02 |
|
|
47
|
+
| `amiko wallets swap quote ...` | Free |
|
|
48
|
+
| `amiko wallets swap send ...` | Solana gas + 10bps |
|
|
39
49
|
| `amiko credits topup ...` | Whatever amount you top up |
|
|
40
50
|
|
|
41
|
-
##
|
|
42
|
-
|
|
43
|
-
### Credits & Wallet
|
|
44
|
-
|
|
45
|
-
**Credits are NOT tokens.** 10,000 credits = $1.00 USD.
|
|
46
|
-
|
|
47
|
-
The `topup` command accepts **one** of three amount forms:
|
|
48
|
-
|
|
49
|
-
| Form | Meaning | Example |
|
|
50
|
-
|------|---------|---------|
|
|
51
|
-
| `<amount>` (positional) | credits | `amiko credits topup 10000 --token AMIKO` → 10,000 credits = $1 |
|
|
52
|
-
| `--usd <n>` | US dollars | `amiko credits topup --usd 5 --token USDC` → $5 = 50,000 credits |
|
|
53
|
-
| `--spend <n>` | spend N of `--token` | `amiko credits topup --spend 1 --token SOL` → "1 SOL worth of credits" |
|
|
51
|
+
## Credits
|
|
54
52
|
|
|
55
|
-
**
|
|
56
|
-
|
|
57
|
-
- "top up 1 SOL of credits" → `amiko credits topup --spend 1 --token SOL`
|
|
58
|
-
- "top up 1 USDC worth of credits" → `amiko credits topup --spend 1 --token USDC`
|
|
59
|
-
- "top up 1 AMIKO" → `amiko credits topup --spend 1 --token AMIKO`
|
|
60
|
-
- "top up $5 in USDC" → `amiko credits topup --usd 5 --token USDC`
|
|
61
|
-
- "top up 10000 credits with AMIKO" → `amiko credits topup 10000 --token AMIKO`
|
|
62
|
-
|
|
63
|
-
**Always confirm with the user before running.** The CLI prints a `Top-up Summary` (credits, cost in tokens, USD, wallet) and then prompts `Proceed? [y/N]`. Do NOT pass `--yes` unless the user has explicitly approved the summary.
|
|
53
|
+
**Display credits: 10,000 credits = $1.00 USD.**
|
|
64
54
|
|
|
65
55
|
```bash
|
|
66
|
-
amiko credits balance #
|
|
67
|
-
amiko credits topup --spend 1 --token SOL
|
|
68
|
-
amiko credits topup --usd 5 --token USDC
|
|
69
|
-
amiko credits topup 10000 --token AMIKO --yes #
|
|
56
|
+
amiko credits balance # show balance as "N credits"
|
|
57
|
+
amiko credits topup --spend 1 --token SOL --yes # "1 SOL worth of credits"
|
|
58
|
+
amiko credits topup --usd 5 --token USDC --yes # $5 paying in USDC
|
|
59
|
+
amiko credits topup 10000 --token AMIKO --yes # 10,000 credits = $1
|
|
70
60
|
```
|
|
71
61
|
|
|
72
|
-
**
|
|
73
|
-
1. You specify credits (e.g. 10000 = $1.00)
|
|
74
|
-
2. CLI fetches live token price via Jupiter
|
|
75
|
-
3. Transfers the equivalent token amount from your agent wallet to treasury
|
|
76
|
-
4. Verifies on-chain and credits your account
|
|
77
|
-
|
|
78
|
-
Supported tokens: AMIKO, SOL, USDC, USDT. All payments come from your agent's Solana wallet.
|
|
62
|
+
`topup` accepts **one** of three amount forms:
|
|
79
63
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
amiko
|
|
84
|
-
amiko
|
|
85
|
-
```
|
|
64
|
+
| Form | Meaning | Example |
|
|
65
|
+
|------|---------|---------|
|
|
66
|
+
| `<amount>` (positional) | credits | `amiko credits topup 10000 --token AMIKO` |
|
|
67
|
+
| `--usd <n>` | US dollars | `amiko credits topup --usd 5 --token USDC` |
|
|
68
|
+
| `--spend <n>` | spend N of `--token` | `amiko credits topup --spend 1 --token SOL` |
|
|
86
69
|
|
|
87
|
-
|
|
70
|
+
Map user intent directly — no manual price math:
|
|
88
71
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
amiko image "portrait" --size 1024x1792 # custom size
|
|
93
|
-
```
|
|
72
|
+
- "top up 1 SOL of credits" → `--spend 1 --token SOL`
|
|
73
|
+
- "top up $5 in USDC" → `--usd 5 --token USDC`
|
|
74
|
+
- "top up 10000 credits with AMIKO" → `10000 --token AMIKO`
|
|
94
75
|
|
|
95
|
-
|
|
76
|
+
Supported tokens: AMIKO, SOL, USDC, USDT. The CLI fetches the live price, the platform transfers from the twin's wallet, and on-chain verification credits the account.
|
|
96
77
|
|
|
97
|
-
|
|
78
|
+
## Wallets
|
|
98
79
|
|
|
99
80
|
```bash
|
|
100
|
-
amiko
|
|
101
|
-
amiko
|
|
81
|
+
amiko wallets list # all twin wallets + cached balances
|
|
82
|
+
amiko wallets balance <address> # force-sync one wallet; returns fresh balances
|
|
83
|
+
amiko wallets swap quote 1.0 SOL USDC # Jupiter quote (free)
|
|
84
|
+
amiko wallets swap send 1.0 SOL USDC --wallet <addr> --yes
|
|
85
|
+
amiko wallets swap tokens # supported tokens list
|
|
86
|
+
amiko wallets bridge quote 10 --from solana --to tempo
|
|
87
|
+
amiko wallets bridge send 10 --from solana --to tempo --yes
|
|
88
|
+
amiko wallets bridge status <txHash>
|
|
89
|
+
amiko wallets bridge routes
|
|
90
|
+
amiko wallets bridge limits
|
|
102
91
|
```
|
|
103
92
|
|
|
104
|
-
|
|
93
|
+
`wallets list` returns cached balances (platform doesn't auto-sync). If balances look stale, run `wallets balance <address>` to force a sync for that wallet.
|
|
105
94
|
|
|
106
|
-
|
|
107
|
-
amiko swap quote 1.0 SOL USDC # get Jupiter quote
|
|
108
|
-
amiko swap send 1.0 SOL USDC --yes # execute swap
|
|
109
|
-
amiko swap tokens # list supported tokens
|
|
110
|
-
```
|
|
95
|
+
Swaps run via Jupiter on Solana. Supported: SOL, USDC, USDT, AMIKO, PYUSD, BONK, JUP, RAY, JitoSOL — or any mint address. Bridging goes through Across Protocol.
|
|
111
96
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
### MPP Services
|
|
97
|
+
## Market (paid MPP services)
|
|
115
98
|
|
|
116
99
|
```bash
|
|
117
|
-
amiko
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
amiko
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
amiko service
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
amiko service tts 21m00Tcm4TlvDq8ikWAM "Hello world"
|
|
127
|
-
|
|
128
|
-
#
|
|
129
|
-
amiko
|
|
130
|
-
|
|
131
|
-
# Any endpoint
|
|
132
|
-
amiko service call <METHOD> <path> [body]
|
|
100
|
+
amiko market search "AI agents" # 1 AMIKO — X/Twitter search
|
|
101
|
+
amiko market image "a sunset over mountains" --yes # 5 AMIKO — gpt-image-1 by default
|
|
102
|
+
amiko market image "logo" --background transparent # transparent bg
|
|
103
|
+
amiko market image "portrait" --size 1024x1792 # custom size
|
|
104
|
+
amiko market amazon search "usb c cable" # 1 AMIKO — product search
|
|
105
|
+
amiko market amazon quote B01GGKYKQM # free — price quote
|
|
106
|
+
amiko market service list # all services + prices
|
|
107
|
+
amiko market service call POST /v1/sfx '{"text":"thunder","duration_seconds":5}'
|
|
108
|
+
amiko market service call POST /v1/music '{"prompt":"lo-fi beat","music_length_ms":30000}'
|
|
109
|
+
amiko market service tts 21m00Tcm4TlvDq8ikWAM "Hello world"
|
|
110
|
+
amiko market service call POST /v1/music/plan '{"prompt":"epic orchestral"}'
|
|
111
|
+
amiko market service call <METHOD> <path> [body] # any MPP endpoint
|
|
112
|
+
amiko market discover # service info + pricing
|
|
133
113
|
```
|
|
134
114
|
|
|
135
|
-
Audio and image endpoints return permanent Supabase Storage URLs.
|
|
115
|
+
Paid market commands require `--wallet <address>` (the Solana wallet that pays) unless one can be resolved from `.amiko.json`. Audio and image endpoints return permanent Supabase Storage URLs.
|
|
136
116
|
|
|
137
|
-
|
|
117
|
+
## Account & Twin
|
|
138
118
|
|
|
139
119
|
```bash
|
|
140
|
-
amiko
|
|
141
|
-
amiko
|
|
120
|
+
amiko accounts # resolved identity (authenticated, userId, twinId, platform)
|
|
121
|
+
amiko info # twin info (name, description, public, voice, avatar)
|
|
122
|
+
amiko twin:update --name "New Name"
|
|
123
|
+
amiko twin:update --description "..."
|
|
124
|
+
amiko twin:update --public true --yes # destructive — requires --yes in non-TTY
|
|
142
125
|
```
|
|
143
126
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
amiko discovery # MPP service info + pricing
|
|
148
|
-
amiko config show # view config
|
|
149
|
-
amiko update # update CLI to latest (on twins: also refreshes /data, symlink, skill)
|
|
150
|
-
amiko --help # all commands
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
Agent wallet balances are surfaced by `amiko credits balance` (shows credit balance + wallet balances across all chains in one call). There is no standalone `wallet` command.
|
|
127
|
+
All twin-scoped commands accept `--twin <id>` to target a non-default twin.
|
|
154
128
|
|
|
155
|
-
|
|
129
|
+
## Documents (RAG)
|
|
156
130
|
|
|
157
131
|
```bash
|
|
158
|
-
amiko
|
|
159
|
-
amiko
|
|
160
|
-
amiko
|
|
161
|
-
amiko
|
|
162
|
-
amiko
|
|
132
|
+
amiko docs # list
|
|
133
|
+
amiko docs:upload ./notes.pdf # path
|
|
134
|
+
amiko docs:upload https://example.com/x.pdf # URL
|
|
135
|
+
cat file.pdf | amiko docs:upload - --stdin --name file.pdf
|
|
136
|
+
amiko docs:delete <docId> --yes # destructive
|
|
137
|
+
amiko docs:presign ./file.pdf # presigned S3 URL only
|
|
163
138
|
```
|
|
164
139
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
### Documents (RAG)
|
|
140
|
+
## Voice
|
|
168
141
|
|
|
169
142
|
```bash
|
|
170
|
-
amiko
|
|
171
|
-
amiko
|
|
172
|
-
amiko
|
|
173
|
-
|
|
174
|
-
amiko docs:delete <docId> --yes # delete (destructive)
|
|
175
|
-
amiko docs:presign ./file.pdf # get a presigned S3 URL (no upload)
|
|
143
|
+
amiko voice:design --description "warm, low, male, confident, measured" # min 20 chars
|
|
144
|
+
amiko voice:create --sample <generated_voice_id>
|
|
145
|
+
amiko voice:clone ./me.mp3 # path | URL | -
|
|
146
|
+
amiko voice:reset --yes # destructive
|
|
176
147
|
```
|
|
177
148
|
|
|
178
|
-
|
|
149
|
+
## Avatar
|
|
179
150
|
|
|
180
151
|
```bash
|
|
181
|
-
amiko
|
|
182
|
-
amiko voice:create --sample <generated_voice_id> # commit a designed preview
|
|
183
|
-
amiko voice:clone ./me.mp3 # clone from an audio file (path | URL | -)
|
|
184
|
-
amiko voice:reset --yes # revert to default (destructive)
|
|
152
|
+
amiko avatar:update --file ./portrait.png --yes # max 5 MB, destructive
|
|
185
153
|
```
|
|
186
154
|
|
|
187
|
-
|
|
155
|
+
## Friends
|
|
188
156
|
|
|
189
157
|
```bash
|
|
190
|
-
amiko
|
|
158
|
+
amiko friends # list all
|
|
159
|
+
amiko friends --type user # filter
|
|
160
|
+
amiko friends:add --id <userId>
|
|
161
|
+
amiko friends:accept <friendshipId>
|
|
162
|
+
amiko friends:remove <friendshipId> --yes # destructive
|
|
191
163
|
```
|
|
192
164
|
|
|
193
|
-
|
|
165
|
+
## Feed & Posts
|
|
194
166
|
|
|
195
167
|
```bash
|
|
196
|
-
amiko
|
|
197
|
-
amiko
|
|
198
|
-
amiko
|
|
199
|
-
amiko
|
|
200
|
-
amiko
|
|
168
|
+
amiko feed # friends feed (default)
|
|
169
|
+
amiko feed --type for_you --limit 20
|
|
170
|
+
amiko feed --hashtag ai
|
|
171
|
+
amiko post:create --content "hello from the CLI"
|
|
172
|
+
amiko post:create --content "private note" --visibility private
|
|
173
|
+
amiko post:create --content "look" --media https://...jpg
|
|
174
|
+
amiko post:comment --id <postId> --comment "great post"
|
|
175
|
+
amiko post:comment --id <postId> --comment "look" --media https://...jpg
|
|
176
|
+
amiko post:comment --id <postId> --comment "..." --twin <id>
|
|
201
177
|
```
|
|
202
178
|
|
|
203
|
-
|
|
179
|
+
## Composio
|
|
204
180
|
|
|
205
181
|
```bash
|
|
206
|
-
amiko
|
|
207
|
-
amiko
|
|
208
|
-
amiko feed --hashtag ai # filter by hashtag
|
|
209
|
-
amiko post:create --content "hello from the CLI" # public post (default)
|
|
210
|
-
amiko post:create --content "private note" --visibility private # private post
|
|
211
|
-
amiko post:create --content "look" --media https://...jpg # attach media URL(s)
|
|
212
|
-
amiko post:comment --id <postId> --comment "great post" # comment as user
|
|
213
|
-
amiko post:comment --id <postId> --comment "look" --media https://...jpg # comment with attached media
|
|
214
|
-
amiko post:comment --id <postId> --comment "..." --twin <id> # comment as the twin
|
|
182
|
+
amiko composio:connect --app gmail # prints OAuth URL
|
|
183
|
+
amiko composio:disconnect --app gmail --yes # destructive
|
|
215
184
|
```
|
|
216
185
|
|
|
217
|
-
|
|
186
|
+
## Other
|
|
218
187
|
|
|
219
188
|
```bash
|
|
220
|
-
amiko
|
|
221
|
-
amiko
|
|
189
|
+
amiko config show # resolved config
|
|
190
|
+
amiko update # self-update
|
|
191
|
+
amiko --help # top-level help
|
|
192
|
+
amiko <group> --help # e.g. `amiko wallets --help`
|
|
222
193
|
```
|
|
223
194
|
|
|
224
|
-
|
|
195
|
+
## JSON output
|
|
225
196
|
|
|
226
|
-
|
|
197
|
+
Most commands support `--json` for structured output:
|
|
227
198
|
|
|
228
199
|
```bash
|
|
200
|
+
amiko wallets list --json | jq '.wallets[].wallet_address'
|
|
229
201
|
amiko friends --json | jq '.items[] | .friend.name'
|
|
230
202
|
amiko info --json | jq -r '.name'
|
|
231
203
|
```
|
|
232
|
-
|
|
233
|
-
## Service Costs
|
|
234
|
-
|
|
235
|
-
| Service | Cost | Command |
|
|
236
|
-
|---------|------|---------|
|
|
237
|
-
| X/Twitter search | 1 AMIKO | `amiko search "<query>"` |
|
|
238
|
-
| Image generation | 5 AMIKO | `amiko image "<prompt>"` |
|
|
239
|
-
| Amazon search | 1 AMIKO | `amiko amazon search "<query>"` |
|
|
240
|
-
| Amazon quote | Free | `amiko amazon quote <ASIN>` |
|
|
241
|
-
| Sound effects | $0.05 | `amiko service call POST /v1/sfx ...` |
|
|
242
|
-
| Music generation | $0.10 | `amiko service call POST /v1/music ...` |
|
|
243
|
-
| Text-to-speech | 1 AMIKO | `amiko service tts <voiceId> "<text>"` |
|
|
244
|
-
| Swap quote | Free | `amiko swap quote ...` |
|
|
245
|
-
| Swap execute | Gas only | `amiko swap send ...` |
|
|
246
|
-
| Credit top-up | Amount in credits (10,000 = $1) | `amiko credits topup <credits>` |
|