Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/commands/content/createCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const createCommand = new Command("create")
.option("--caption-length <length>", "Caption length: short, medium, long", "short")
.option("--upscale", "Upscale image and video for higher quality")
.option("--batch <count>", "Generate multiple videos in parallel", "1")
.option("--songs <slugs>", "Comma-separated song slugs to pick from (e.g. hiccups,adhd)")
.option("--json", "Output as JSON")
.action(async opts => {
try {
Expand All @@ -22,13 +23,18 @@ export const createCommand = new Command("create")
throw new Error("--caption-length must be one of: short, medium, long");
}

const songs: string[] | undefined = opts.songs
? (opts.songs as string).split(",").map((s: string) => s.trim()).filter(Boolean)
: undefined;

const data = await post("/api/content/create", {
artist_account_id: opts.artist,
template: opts.template,
lipsync: !!opts.lipsync,
caption_length: opts.captionLength,
upscale: !!opts.upscale,
batch,
...(songs && { songs }),
});

if (opts.json) {
Expand Down
Loading