@heyamiko/amiko-cli 0.15.1 → 0.15.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 CHANGED
@@ -135,7 +135,7 @@ amiko create tts "Hello world" --provider minimax --model speech-2.8-turbo
135
135
  amiko create tts "Hello" --provider minimax --voice English_expressive_narrator --yes
136
136
  amiko voice clone ./me.mp3 --provider minimax
137
137
  amiko voice clone ./me.mp3 --provider elevenlabs
138
- amiko create music "lo-fi chill beat" --duration 30000
138
+ amiko create music "lo-fi chill beat" --duration 30 # seconds
139
139
  amiko create music --lyrics "..." --instrumental # instrumental
140
140
  amiko create sfx "thunder and heavy rain" --duration 5
141
141
  amiko create image "banner" --raw # raw JSON
@@ -203,7 +203,7 @@ Examples: `amiko create tts "Hi" --provider minimax --yes` · `amiko create tts
203
203
  |------|---------|-------------|
204
204
  | `--model <model>` | `music-2.6` | `music_v1`, `music-2.6`, `music-cover` |
205
205
  | `--lyrics <lyrics>` | — | Lyrics (optional) |
206
- | `--duration <ms>` | — | Length in milliseconds |
206
+ | `--duration <seconds>` | — | Track length in seconds, 1–300. `music-3.0` bills per second, so this sets the price |
207
207
  | `--instrumental` | — | Instrumental (no vocals) |
208
208
 
209
209
  **`amiko create sfx <text>`**
package/dist/index.js CHANGED
@@ -28691,6 +28691,7 @@ function registerImageCommand(program2) {
28691
28691
 
28692
28692
  // src/commands/create.ts
28693
28693
  import { randomUUID } from "node:crypto";
28694
+ var MUSIC_MAX_SECONDS = 300;
28694
28695
  var ETA = {
28695
28696
  IMAGE: "~15–60s",
28696
28697
  VIDEO: "~2–9 min",
@@ -28994,7 +28995,7 @@ function registerCreateCommand(create2) {
28994
28995
  }
28995
28996
  });
28996
28997
  });
28997
- create2.command("music [prompt]").description("Generate music (Create Studio)").option("--model <model>", "music-3.0 (default), music-cover, music_v1. The retired MiniMax ids (music-2.0/2.5/2.6, -free) still resolve to music-3.0", "music-3.0").option("--lyrics <lyrics>", "Lyrics (optional; a prompt is still required for the style). Needs section tags on their own lines, e.g. [verse] / [chorus] — plain lyrics are rejected").option("--duration <ms>", "Length in ms — music-3.0 bills per second, so this sets the price").option("--audio-url <url>", "Public audio URL to cover (required by --model music-cover)").option("--instrumental", "Instrumental (no vocals)").option("--lyrics-optimizer", "Auto-write lyrics from the prompt. Only affects music_v1 — the fal models always write their own when no --lyrics is given").option("--token <symbol>", "Preferred charge token: AMIKO, USDC, USDT, SOL").option("--pay <method>", "Payment method: credits (Amiko account credits, default) or wallet (twin wallet)", "credits").option("--raw", "Output raw JSON").option("--yes", "Skip the pre-spend confirmation (required in non-interactive shells)").action(async (prompt, opts) => {
28998
+ create2.command("music [prompt]").description("Generate music (Create Studio)").option("--model <model>", "music-3.0 (default), music-cover, music_v1. The retired MiniMax ids (music-2.0/2.5/2.6, -free) still resolve to music-3.0", "music-3.0").option("--lyrics <lyrics>", "Lyrics (optional; a prompt is still required for the style). Needs section tags on their own lines, e.g. [verse] / [chorus] — plain lyrics are rejected").option("--duration <seconds>", "Track length in seconds, 1-300 — music-3.0 bills per second, so this sets the price").option("--audio-url <url>", "Public audio URL to cover (required by --model music-cover)").option("--instrumental", "Instrumental (no vocals)").option("--lyrics-optimizer", "Auto-write lyrics from the prompt. Only affects music_v1 — the fal models always write their own when no --lyrics is given").option("--token <symbol>", "Preferred charge token: AMIKO, USDC, USDT, SOL").option("--pay <method>", "Payment method: credits (Amiko account credits, default) or wallet (twin wallet)", "credits").option("--raw", "Output raw JSON").option("--yes", "Skip the pre-spend confirmation (required in non-interactive shells)").action(async (prompt, opts) => {
28998
28999
  const isCover = String(opts.model ?? "").startsWith("music-cover");
28999
29000
  if (isCover) {
29000
29001
  if (!opts.audioUrl) {
@@ -29009,11 +29010,16 @@ function registerCreateCommand(create2) {
29009
29010
  console.error(error("Provide a prompt. --lyrics alone is not enough — the prompt carries the style."));
29010
29011
  process.exit(1);
29011
29012
  }
29012
- const durationMs = opts.duration ? Number(opts.duration) : undefined;
29013
- if (durationMs !== undefined && (!Number.isFinite(durationMs) || durationMs <= 0)) {
29014
- console.error(error("--duration must be a positive number of milliseconds."));
29013
+ const durationSeconds = opts.duration ? Number(opts.duration) : undefined;
29014
+ if (durationSeconds !== undefined && (!Number.isFinite(durationSeconds) || durationSeconds <= 0)) {
29015
+ console.error(error("--duration must be a positive number of seconds."));
29015
29016
  process.exit(1);
29016
29017
  }
29018
+ if (durationSeconds !== undefined && durationSeconds > MUSIC_MAX_SECONDS) {
29019
+ console.error(error(`--duration is in SECONDS (1-${MUSIC_MAX_SECONDS}); got ${durationSeconds}.` + (durationSeconds >= 1000 ? ` That looks like milliseconds — use ${Math.round(durationSeconds / 1000)}.` : "")));
29020
+ process.exit(1);
29021
+ }
29022
+ const durationMs = durationSeconds !== undefined ? Math.round(durationSeconds * 1000) : undefined;
29017
29023
  await submitCreateJob({
29018
29024
  mode: "MUSIC",
29019
29025
  summary: `Create music: ${(prompt ?? opts.audioUrl ?? opts.lyrics ?? "").slice(0, 80)}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyamiko/amiko-cli",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "description": "Amiko CLI — swap tokens, manage credits, bridge cross-chain, and call marketplace agents",
5
5
  "type": "module",
6
6
  "bin": {
package/skills/SKILL.md CHANGED
@@ -148,7 +148,7 @@ This twin has **two** optional TTS ids. They are **not** the same:
148
148
 
149
149
  ## Create Studio — behavior notes
150
150
 
151
- `amiko create <image|video|tts|music|sfx>` is the CLI half of the platform Create Studio. It generates through Amiko's own authenticated endpoints (not raw MPP), runs **async**, and is **charged on success** from the twin's custodial wallet — a failed or timed-out generation is **never billed**, and there is no pre-pay. **The command returns immediately** with a `jobId` and `status: PENDING` — it does NOT block for the whole generation (so you're not held for 60s–9min). It prints how to check + a rough ETA. **Do NOT sit in a tight polling loop** (it burns turns/tokens). After submitting, **tell the user roughly how long to wait and stop** — image ~15–60s, video ~2–9min, music ~30–120s, tts/sfx ~5–20s (e.g. "your video's generating — check back in a few minutes"). Then retrieve it **once** later — when the user next asks, or after the ETA — with `amiko create status <jobId>` (re-query that job, ~24h) or `amiko create media` (list recent generations; `--service`/`--limit`/`--raw`). Result is a permanent Supabase Storage URL. **Every successful generation is also auto-saved to the drive** (folder "Create Studio Files", with the prompt as title/description) — so `amiko drive search "<prompt words>"` finds past creations, and `drive share <docId>` can hand out a link; no manual re-upload. **Do NOT use `--wait`** — there's no such option; `create` is always non-blocking, so submit then check later with `amiko create status <jobId>`. `--token <AMIKO|USDC|USDT|SOL>` selects the charge token (default auto, AMIKO-first). `--pay credits` pays from the owner's **Amiko account credits** instead of the twin wallet (unified-billing accounts only — reserved at submit, captured only on success, released on failure; the server rejects it for legacy accounts, so fall back to the default `--pay wallet` if it errors). Prefer `create` over `markets image` for media generation — it doesn't lose money on timeouts. `markets image` remains the raw MPP pre-pay path. For **music**, a plain prompt is enough — `create music "a triumphant orchestral ballad"` sings from the prompt (lyrics auto-written); add `--lyrics "…"` to set exact words, or `--instrumental` for no vocals. Don't paste long lyrics into the prompt itself. **Image models** (`--model`): `nano-banana-2` (default), `nano-banana`, `nano-banana-lite`, `nano-banana-pro` (Google Gemini — when the owner says "nano banana", pass it verbatim; `-pro` is the premium/priciest tier at ~$0.17); `gpt-image-2` and `gpt-image-1.5/-1/-1-mini` (OpenAI); `grok-imagine-image-quality` (xAI); `image-01` (MiniMax).
151
+ `amiko create <image|video|tts|music|sfx>` is the CLI half of the platform Create Studio. It generates through Amiko's own authenticated endpoints (not raw MPP), runs **async**, and is **charged on success** from the twin's custodial wallet — a failed or timed-out generation is **never billed**, and there is no pre-pay. **The command returns immediately** with a `jobId` and `status: PENDING` — it does NOT block for the whole generation (so you're not held for 60s–9min). It prints how to check + a rough ETA. **Do NOT sit in a tight polling loop** (it burns turns/tokens). After submitting, **tell the user roughly how long to wait and stop** — image ~15–60s, video ~2–9min, music ~30–120s, tts/sfx ~5–20s (e.g. "your video's generating — check back in a few minutes"). Then retrieve it **once** later — when the user next asks, or after the ETA — with `amiko create status <jobId>` (re-query that job, ~24h) or `amiko create media` (list recent generations; `--service`/`--limit`/`--raw`). Result is a permanent Supabase Storage URL. **Every successful generation is also auto-saved to the drive** (folder "Create Studio Files", with the prompt as title/description) — so `amiko drive search "<prompt words>"` finds past creations, and `drive share <docId>` can hand out a link; no manual re-upload. **Do NOT use `--wait`** — there's no such option; `create` is always non-blocking, so submit then check later with `amiko create status <jobId>`. `--token <AMIKO|USDC|USDT|SOL>` selects the charge token (default auto, AMIKO-first). `--pay credits` pays from the owner's **Amiko account credits** instead of the twin wallet (unified-billing accounts only — reserved at submit, captured only on success, released on failure; the server rejects it for legacy accounts, so fall back to the default `--pay wallet` if it errors). Prefer `create` over `markets image` for media generation — it doesn't lose money on timeouts. `markets image` remains the raw MPP pre-pay path. For **music**, a plain prompt is enough — `create music "a triumphant orchestral ballad"` sings from the prompt (lyrics auto-written); add `--lyrics "…"` to set exact words, or `--instrumental` for no vocals. Don't paste long lyrics into the prompt itself. **Track length is `--duration <seconds>`** (1–300, same unit as `sfx --duration` and `video --seconds`) — e.g. a 3.5-minute track is `--duration 210`. On `music-3.0` this is the **price input**: it bills per second, so `--duration 210` costs 210× the per-second rate. Omit it for the 60s default; never put the length in the prompt text instead (the model can't act on it). **Image models** (`--model`): `nano-banana-2` (default), `nano-banana`, `nano-banana-lite`, `nano-banana-pro` (Google Gemini — when the owner says "nano banana", pass it verbatim; `-pro` is the premium/priciest tier at ~$0.17); `gpt-image-2` and `gpt-image-1.5/-1/-1-mini` (OpenAI); `grok-imagine-image-quality` (xAI); `image-01` (MiniMax).
152
152
 
153
153
  ### Video — critical agent rules (read before claiming failure)
154
154