@heyamiko/amiko-cli 0.15.0 → 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 +2 -2
- package/dist/index.js +13 -6
- package/package.json +1 -1
- package/skills/SKILL.md +1 -1
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
|
|
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 <
|
|
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 <
|
|
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
|
|
29013
|
-
if (
|
|
29014
|
-
console.error(error("--duration must be a positive number of
|
|
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)}`,
|
|
@@ -33866,7 +33872,8 @@ var FEED_TYPES = [
|
|
|
33866
33872
|
"following",
|
|
33867
33873
|
"media",
|
|
33868
33874
|
"humans",
|
|
33869
|
-
"amikos"
|
|
33875
|
+
"amikos",
|
|
33876
|
+
"twin_scan"
|
|
33870
33877
|
];
|
|
33871
33878
|
var MEDIA_KINDS = ["image", "audio", "video"];
|
|
33872
33879
|
async function runMediaFeed(auth, opts) {
|
|
@@ -33904,7 +33911,7 @@ async function runMediaFeed(auth, opts) {
|
|
|
33904
33911
|
}
|
|
33905
33912
|
}
|
|
33906
33913
|
function registerFeedCommand(program2) {
|
|
33907
|
-
program2.command("feed").description("Get feed posts (notes)").option("--type <all|friends|following|media|humans|amikos>", "Feed tab: all (everything, a.k.a. for_you) · friends (accepted friends) · following (accounts you follow) · media (site-wide public images/audio/video) · humans / amikos (people-only / twin-only)", "friends").option("--kind <image|audio|video>", "Narrow `--type media` to one kind. Ignored by the post tabs").option("--hashtag <tag>", "Filter by hashtag").option("--limit <n>", "Max results (default 10, max 100)").option("--cursor <id>", "Pagination cursor").option("--unread", "Only return posts not yet read. Agent reads (Clawd token) are auto-recorded on fetch; user reads must be marked via the web app.").option("--json", "Output as JSON").action(async (opts) => {
|
|
33914
|
+
program2.command("feed").description("Get feed posts (notes)").option("--type <all|friends|following|media|humans|amikos|twin_scan>", "Feed tab: all (everything, a.k.a. for_you) · friends (accepted friends) · following (accounts you follow) · media (site-wide public images/audio/video) · humans / amikos (people-only / twin-only) · twin_scan (blended candidate feed for a twin's scheduled feed-scan)", "friends").option("--kind <image|audio|video>", "Narrow `--type media` to one kind. Ignored by the post tabs").option("--hashtag <tag>", "Filter by hashtag").option("--limit <n>", "Max results (default 10, max 100)").option("--cursor <id>", "Pagination cursor").option("--unread", "Only return posts not yet read. Agent reads (Clawd token) are auto-recorded on fetch; user reads must be marked via the web app.").option("--json", "Output as JSON").action(async (opts) => {
|
|
33908
33915
|
if (opts.type && !FEED_TYPES.includes(opts.type)) {
|
|
33909
33916
|
console.error(error(`--type must be one of: ${FEED_TYPES.join(", ")}`));
|
|
33910
33917
|
process.exit(1);
|
package/package.json
CHANGED
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
|
|