@heyamiko/amiko-cli 0.14.2 → 0.15.1
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/dist/index.js +30 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28694,7 +28694,7 @@ import { randomUUID } from "node:crypto";
|
|
|
28694
28694
|
var ETA = {
|
|
28695
28695
|
IMAGE: "~15–60s",
|
|
28696
28696
|
VIDEO: "~2–9 min",
|
|
28697
|
-
MUSIC: "~
|
|
28697
|
+
MUSIC: "~1–5 min",
|
|
28698
28698
|
TTS: "~5–20s",
|
|
28699
28699
|
SFX: "~5–20s"
|
|
28700
28700
|
};
|
|
@@ -28994,24 +28994,44 @@ function registerCreateCommand(create2) {
|
|
|
28994
28994
|
}
|
|
28995
28995
|
});
|
|
28996
28996
|
});
|
|
28997
|
-
create2.command("music [prompt]").description("Generate music (Create Studio)").option("--model <model>", "
|
|
28998
|
-
|
|
28999
|
-
|
|
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
|
+
const isCover = String(opts.model ?? "").startsWith("music-cover");
|
|
28999
|
+
if (isCover) {
|
|
29000
|
+
if (!opts.audioUrl) {
|
|
29001
|
+
console.error(error("--model music-cover requires --audio-url."));
|
|
29002
|
+
process.exit(1);
|
|
29003
|
+
}
|
|
29004
|
+
if (!prompt && !opts.lyrics) {
|
|
29005
|
+
console.error(error("--model music-cover requires a prompt or --lyrics describing the cover."));
|
|
29006
|
+
process.exit(1);
|
|
29007
|
+
}
|
|
29008
|
+
} else if (!prompt) {
|
|
29009
|
+
console.error(error("Provide a prompt. --lyrics alone is not enough — the prompt carries the style."));
|
|
29010
|
+
process.exit(1);
|
|
29011
|
+
}
|
|
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."));
|
|
29000
29015
|
process.exit(1);
|
|
29001
29016
|
}
|
|
29002
29017
|
await submitCreateJob({
|
|
29003
29018
|
mode: "MUSIC",
|
|
29004
|
-
summary: `Create music: ${(prompt ?? opts.lyrics ?? "").slice(0, 80)}`,
|
|
29019
|
+
summary: `Create music: ${(prompt ?? opts.audioUrl ?? opts.lyrics ?? "").slice(0, 80)}`,
|
|
29005
29020
|
raw: opts.raw,
|
|
29006
29021
|
pay: opts.pay,
|
|
29007
29022
|
yes: opts.yes,
|
|
29008
|
-
quoteBody: {
|
|
29023
|
+
quoteBody: {
|
|
29024
|
+
mode: "MUSIC",
|
|
29025
|
+
model: opts.model,
|
|
29026
|
+
...durationMs ? { durationMs } : {}
|
|
29027
|
+
},
|
|
29009
29028
|
jobBody: {
|
|
29010
29029
|
mode: "MUSIC",
|
|
29011
29030
|
model: opts.model,
|
|
29012
29031
|
...prompt ? { prompt } : {},
|
|
29013
29032
|
...opts.lyrics ? { lyrics: opts.lyrics } : {},
|
|
29014
|
-
...
|
|
29033
|
+
...durationMs ? { durationMs } : {},
|
|
29034
|
+
...opts.audioUrl ? { audioUrl: opts.audioUrl } : {},
|
|
29015
29035
|
...opts.instrumental ? { isInstrumental: true } : {},
|
|
29016
29036
|
...opts.lyricsOptimizer ? { lyricsOptimizer: true } : {},
|
|
29017
29037
|
...opts.token ? { preferredToken: opts.token } : {}
|
|
@@ -33846,7 +33866,8 @@ var FEED_TYPES = [
|
|
|
33846
33866
|
"following",
|
|
33847
33867
|
"media",
|
|
33848
33868
|
"humans",
|
|
33849
|
-
"amikos"
|
|
33869
|
+
"amikos",
|
|
33870
|
+
"twin_scan"
|
|
33850
33871
|
];
|
|
33851
33872
|
var MEDIA_KINDS = ["image", "audio", "video"];
|
|
33852
33873
|
async function runMediaFeed(auth, opts) {
|
|
@@ -33884,7 +33905,7 @@ async function runMediaFeed(auth, opts) {
|
|
|
33884
33905
|
}
|
|
33885
33906
|
}
|
|
33886
33907
|
function registerFeedCommand(program2) {
|
|
33887
|
-
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) => {
|
|
33908
|
+
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) => {
|
|
33888
33909
|
if (opts.type && !FEED_TYPES.includes(opts.type)) {
|
|
33889
33910
|
console.error(error(`--type must be one of: ${FEED_TYPES.join(", ")}`));
|
|
33890
33911
|
process.exit(1);
|