Skip to content

jomeswang/agnes-ai-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agnes-ai-cli

CLI and JS API for Agnes text, image, and video workflows.

Install

Install globally:

npm install -g agnes-ai-cli

Run without installing:

npx -y agnes-ai-cli --help

CLI

agnes --help
agnes auth check
agnes media url ./input.png
agnes text chat --prompt "say pong"
agnes image text2img --prompt "a polished product photo of a perfume bottle"
agnes image img2img --image ./input.png --prompt "turn this into a clean editorial poster"
agnes video text2video --prompt "a cinematic drone shot of waves at dusk"
agnes video img2video --image ./frame.png --prompt "animate subtle rain and drifting fog"
agnes video multivideo --image ./frame-a.png --image ./frame-b.png --prompt "blend these references into one motion concept"
agnes video keyframes --image ./frame-a.png --image ./frame-b.png --prompt "morph between the two scenes"
agnes video poll <video-or-task-id>

Local media inputs are uploaded to a temporary public URL automatically. The default bridge tries Litterbox first, then falls back to tmpfiles, Uguu, and x0.at. Video creation is asynchronous. Create commands print both taskId and videoId when Agnes returns them; use videoId with agnes video poll. Passing an older taskId still works through the legacy polling endpoint.

JS API

import { createAgnesClient } from "agnes-ai-cli";

const agnes = createAgnesClient({ apiKey: process.env.AGNES_API_KEY });

const image = await agnes.image.generate({
  mode: "text2img",
  prompt: "A cinematic product shot of a silver watch on black stone."
});

console.log(image.url);

You can override the temporary upload provider order when a specific host works better for your Agnes workflow:

const agnes = createAgnesClient({
  apiKey: process.env.AGNES_API_KEY,
  temporaryMediaProviderOrder: ["tmpfiles", "litterbox", "uguu", "x0"]
});

About

No description, website, or topics provided.

Resources

License

Stars

4 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors