@heyamiko/amiko-cli 0.6.5 → 0.6.6
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 +52 -6
- package/dist/index.js +10 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# amiko-cli (v0.6.6)
|
|
2
2
|
|
|
3
3
|
Manage agents, wallets, credits, and the MPP marketplace from your terminal. Works for both human users and AI agents running on OpenClaw.
|
|
4
4
|
|
|
@@ -147,6 +147,27 @@ amiko bridge routes # available bridge routes
|
|
|
147
147
|
amiko bridge limits # min/max limits per route
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
+
## Audio & Voice
|
|
151
|
+
|
|
152
|
+
All audio endpoints return binary audio streams. Use `amiko service call` for direct access:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Sound effects ($0.05)
|
|
156
|
+
amiko service call POST /v1/sfx '{"text":"Thunder with heavy rain","duration_seconds":5}'
|
|
157
|
+
|
|
158
|
+
# Music generation ($0.10)
|
|
159
|
+
amiko service call POST /v1/music '{"prompt":"Lo-fi chill beat","music_length_ms":30000}'
|
|
160
|
+
|
|
161
|
+
# Composition plan ($0.02) — get JSON plan before generating
|
|
162
|
+
amiko service call POST /v1/music/plan '{"prompt":"Epic orchestral piece"}'
|
|
163
|
+
|
|
164
|
+
# Text-to-speech ($0.50/1K chars)
|
|
165
|
+
amiko service call POST /v1/tts/21m00Tcm4TlvDq8ikWAM '{"text":"Hello world"}'
|
|
166
|
+
|
|
167
|
+
# List all available services + prices
|
|
168
|
+
amiko service list
|
|
169
|
+
```
|
|
170
|
+
|
|
150
171
|
## Other Commands
|
|
151
172
|
|
|
152
173
|
```bash
|
|
@@ -158,24 +179,49 @@ amiko config set <key> <value> # set config value
|
|
|
158
179
|
amiko update # update CLI to latest
|
|
159
180
|
```
|
|
160
181
|
|
|
182
|
+
## X Search
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
amiko search "AI agents" # search X (pays 1 AMIKO from Solana wallet)
|
|
186
|
+
amiko search "bitcoin" --token USDC # pay with USDC instead
|
|
187
|
+
amiko search "news" --raw # raw JSON output
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Pays via Crossmint server-signed transfer from the agent's wallet. Tries Solana wallet first, falls back to EVM (Base/Tempo).
|
|
191
|
+
|
|
192
|
+
## Image Generation
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
amiko image "a sunset over mountains" # gpt-image-1 (default, base64)
|
|
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)
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Costs 5 AMIKO per image. Default model is `gpt-image-1` which returns base64 data (permanent, no expiring URLs).
|
|
204
|
+
|
|
161
205
|
## Agent Integration (OpenClaw)
|
|
162
206
|
|
|
163
|
-
Agents
|
|
207
|
+
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.
|
|
164
208
|
|
|
165
209
|
```bash
|
|
166
|
-
|
|
167
|
-
amiko connect <CODE>
|
|
210
|
+
# Agent environment — just works
|
|
168
211
|
amiko credits balance
|
|
212
|
+
amiko search "trending topics"
|
|
169
213
|
amiko credits topup 10000 --token AMIKO --yes
|
|
170
214
|
```
|
|
171
215
|
|
|
172
|
-
The CLI
|
|
216
|
+
The CLI checks for `.amiko.json` in order:
|
|
173
217
|
1. `$OPENCLAW_WORKSPACE_DIR/.amiko.json`
|
|
174
218
|
2. `$OPENCLAW_HOME/.openclaw/workspace/.amiko.json`
|
|
175
219
|
3. `/data/.openclaw/workspace/.amiko.json`
|
|
176
220
|
4. Walking up from `cwd`
|
|
177
221
|
|
|
178
|
-
|
|
222
|
+
The `.amiko.json` provides: `AMIKO_TWIN_TOKEN` (auth), `agentWallets` (Solana + Base addresses), `billingBase`, and optionally `platformKey`.
|
|
223
|
+
|
|
224
|
+
**Important:** If `~/.amiko/config.json` exists with a stale `apiKey`, it takes priority over `.amiko.json` twin token. Remove stale keys or let the platform manage auth.
|
|
179
225
|
|
|
180
226
|
## Configuration
|
|
181
227
|
|
package/dist/index.js
CHANGED
|
@@ -75913,7 +75913,7 @@ function registerSearchCommand(program2) {
|
|
|
75913
75913
|
// src/commands/image.ts
|
|
75914
75914
|
var TREASURY2 = "FPiZAf3jEnNfCwfvbv46jdPfHbmSepD4Q6iHiLJDQXvb";
|
|
75915
75915
|
function registerImageCommand(program2) {
|
|
75916
|
-
program2.command("image <prompt>").alias("img").description("Generate an image
|
|
75916
|
+
program2.command("image <prompt>").alias("img").description("Generate an image — costs 5 AMIKO").option("--size <size>", "Image size: 1024x1024, 1024x1792, 1792x1024", "1024x1024").option("--quality <q>", "Quality: auto, low, medium, high (gpt-image-1) or standard, hd (dall-e-3)", "auto").option("--model <model>", "Model: gpt-image-1 or dall-e-3", "gpt-image-1").option("--background <bg>", "Background: transparent, opaque, auto (gpt-image-1 only)").option("--format <fmt>", "Output: png, webp, jpeg (gpt-image-1 only)", "png").option("--raw", "Output raw JSON").action(async (prompt2, opts) => {
|
|
75917
75917
|
const spinner = ora("Generating image...").start();
|
|
75918
75918
|
try {
|
|
75919
75919
|
const config2 = loadConfig();
|
|
@@ -75971,7 +75971,9 @@ function registerImageCommand(program2) {
|
|
|
75971
75971
|
prompt: prompt2,
|
|
75972
75972
|
size: opts.size,
|
|
75973
75973
|
quality: opts.quality,
|
|
75974
|
-
model: opts.model
|
|
75974
|
+
model: opts.model,
|
|
75975
|
+
...opts.background && { background: opts.background },
|
|
75976
|
+
...opts.model === "gpt-image-1" && { output_format: opts.format || "png" }
|
|
75975
75977
|
})
|
|
75976
75978
|
});
|
|
75977
75979
|
spinner.stop();
|
|
@@ -75994,9 +75996,12 @@ function registerImageCommand(program2) {
|
|
|
75994
75996
|
console.log("");
|
|
75995
75997
|
const images = data.images || data.data || [];
|
|
75996
75998
|
for (const img of images) {
|
|
75997
|
-
|
|
75998
|
-
|
|
75999
|
-
|
|
75999
|
+
if (img.url) {
|
|
76000
|
+
console.log(label("URL", img.url));
|
|
76001
|
+
} else if (img.b64_json) {
|
|
76002
|
+
console.log(label("Format", "base64 (inline image data)"));
|
|
76003
|
+
console.log(dim(` ${img.b64_json.length.toLocaleString()} chars — save with: amiko image "..." --raw | jq -r '.images[0].b64_json' | base64 -d > image.png`));
|
|
76004
|
+
}
|
|
76000
76005
|
if (img.revised_prompt && img.revised_prompt !== prompt2) {
|
|
76001
76006
|
console.log(label("Revised", dim(img.revised_prompt)));
|
|
76002
76007
|
}
|