ergon

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ergon - AI Media Generation CLI

ergon - AI媒体生成CLI

Note: Run with
npx ergon
if not installed globally.
注意: 如果未全局安装,请使用
npx ergon
运行。

Quick Reference

快速参考

bash
npx ergon image gen "<prompt>" -t <style> -a <ratio>   # Image generation
npx ergon image edit <file> "<instruction>"            # Image editing
npx ergon video gen "<prompt>" [-i <image>]            # Video with audio
npx ergon narration gen "<text>" -c "<character>"      # Voice generation
bash
npx ergon image gen "<prompt>" -t <style> -a <ratio>   # 图片生成
npx ergon image edit <file> "<instruction>"            # 图片编辑
npx ergon video gen "<prompt>" [-i <image>]            # 带音频的视频生成
npx ergon narration gen "<text>" -c "<character>"      # 语音生成

Image Generation

图片生成

bash
npx ergon image gen [options] <theme>
bash
npx ergon image gen [options] <theme>

Style Selection Guide

风格选择指南

Use CaseStyle (
-t
)
Aspect (
-a
)
Product photo, landscape
realistic
16:9, 4:3
Character, mascot
anime
,
illustration
1:1, 3:4
Icon, logo
flat
,
minimal
1:1
Art, poster
watercolor
,
oil-painting
,
pop-art
varies
Game asset
pixel-art
,
3d-render
1:1
Business, presentation
corporate
16:9
Concept sketch
sketch
varies
使用场景风格 (
-t
)
宽高比 (
-a
)
产品照片、风景
realistic
16:9, 4:3
角色、吉祥物
anime
,
illustration
1:1, 3:4
图标、Logo
flat
,
minimal
1:1
艺术作品、海报
watercolor
,
oil-painting
,
pop-art
多种可选
游戏资产
pixel-art
,
3d-render
1:1
商务、演示
corporate
16:9
概念草图
sketch
多种可选

Options

选项

OptionValuesDefault
-t, --type
realistic, illustration, flat, anime, watercolor, oil-painting, pixel-art, sketch, 3d-render, corporate, minimal, pop-artflat
-a, --aspect-ratio
16:9, 4:3, 1:1, 9:16, 3:416:9
-s, --size
tiny, hd, fullhd, 2k, 4kfullhd
-e, --engine
imagen4, imagen4-fast, imagen4-ultraimagen4
Examples:
bash
npx ergon image gen "cute cat mascot for tech startup" -t anime -a 1:1
npx ergon image gen "professional team meeting in modern office" -t corporate -a 16:9
npx ergon image gen "abstract geometric logo" -t minimal -a 1:1 -o logo.png
选项可选值默认值
-t, --type
realistic, illustration, flat, anime, watercolor, oil-painting, pixel-art, sketch, 3d-render, corporate, minimal, pop-artflat
-a, --aspect-ratio
16:9, 4:3, 1:1, 9:16, 3:416:9
-s, --size
tiny, hd, fullhd, 2k, 4kfullhd
-e, --engine
imagen4, imagen4-fast, imagen4-ultraimagen4
示例:
bash
npx ergon image gen "cute cat mascot for tech startup" -t anime -a 1:1
npx ergon image gen "professional team meeting in modern office" -t corporate -a 16:9
npx ergon image gen "abstract geometric logo" -t minimal -a 1:1 -o logo.png

Image Editing

图片编辑

bash
npx ergon image edit [options] <file> <prompt>
Edit instructions in natural language:
  • Background change: "change background to sunset beach"
  • Style transfer: "make it look like watercolor painting"
  • Object removal: "remove the person on the left"
  • Color adjustment: "make colors more vibrant"
bash
npx ergon image edit photo.jpg "change background to blue sky"
npx ergon image edit portrait.png "convert to anime style"
bash
npx ergon image edit [options] <file> <prompt>
使用自然语言输入编辑指令:
  • 背景更换:"change background to sunset beach"
  • 风格迁移:"make it look like watercolor painting"
  • 对象移除:"remove the person on the left"
  • 色彩调整:"make colors more vibrant"
bash
npx ergon image edit photo.jpg "change background to blue sky"
npx ergon image edit portrait.png "convert to anime style"

Video Generation (with Audio)

视频生成(含音频)

Veo 3.1 generates videos with synchronized audio. Include audio/sound instructions directly in the prompt.
bash
npx ergon video gen [options] <theme>
Veo 3.1可生成带同步音频的视频。可在提示词中直接包含音频/音效说明。
bash
npx ergon video gen [options] <theme>

Prompt Structure for Audio-Video

音视频提示词结构

Include sound descriptions in your prompt:
bash
undefined
在提示词中包含音效描述:
bash
undefined

Sound effects included

包含音效

npx ergon video gen "cat meowing and playing with a ball, soft purring sounds"
npx ergon video gen "cat meowing and playing with a ball, soft purring sounds"

Music/ambient audio

音乐/环境音

npx ergon video gen "sunset timelapse over ocean, with calming wave sounds and soft piano music"
npx ergon video gen "sunset timelapse over ocean, with calming wave sounds and soft piano music"

Dialogue/voice

对话/语音

npx ergon video gen "person saying 'welcome to our channel' with friendly tone, waving at camera"
undefined
npx ergon video gen "person saying 'welcome to our channel' with friendly tone, waving at camera"
undefined

Image-to-Video

图片转视频

Animate a static image with motion and sound:
bash
npx ergon video gen "character starts dancing to upbeat music" -i character.png
npx ergon video gen "logo reveals with whoosh sound effect" -i logo.png
为静态图片添加动画效果和音效:
bash
npx ergon video gen "character starts dancing to upbeat music" -i character.png
npx ergon video gen "logo reveals with whoosh sound effect" -i logo.png

Options

选项

OptionValuesDefault
-i, --input
image file-
-d, --duration
5-8 seconds8
-a, --aspect-ratio
16:9, 9:1616:9
--fast
use Veo 3.1 Fastfalse
Vertical video for TikTok/Reels:
-a 9:16
选项可选值默认值
-i, --input
图片文件-
-d, --duration
5-8秒8
-a, --aspect-ratio
16:9, 9:1616:9
--fast
使用Veo 3.1 Fastfalse
适用于TikTok/Reels的竖版视频:
-a 9:16

Narration Generation

旁白语音生成

For voice-only audio without video, use narration command.
bash
npx ergon narration gen [options] <text>
若仅需语音音频无需视频,请使用旁白命令。
bash
npx ergon narration gen [options] <text>

Character and Acting Direction

角色与表演风格设置

Use
-c
(character) and
-d
(direction) for expressive voice:
bash
undefined
使用
-c
(角色)和
-d
(风格)参数生成富有表现力的语音:
bash
undefined

Character defines WHO is speaking

角色定义说话者身份

npx ergon narration gen "Let's go on an adventure!" -c "energetic young girl"
npx ergon narration gen "Let's go on an adventure!" -c "energetic young girl"

Direction defines HOW they speak

风格定义说话方式

npx ergon narration gen "The results are in..." -c "news anchor" -d "serious, building suspense"
npx ergon narration gen "The results are in..." -c "news anchor" -d "serious, building suspense"

Combined for full expression

组合参数实现完整表达

npx ergon narration gen "Yay! We did it!" -c "excited child" -d "jumping with joy, high energy"
undefined
npx ergon narration gen "Yay! We did it!" -c "excited child" -d "jumping with joy, high energy"
undefined

Voice Selection

语音选择

VoiceCharacter
KoreFemale, versatile (default)
AoedeFemale, warm
CharonMale, deep
FenrirMale, strong
PuckNeutral, playful
语音名称角色设定
Kore女性,多风格(默认)
Aoede女性,温暖
Charon男性,低沉
Fenrir男性,有力
Puck中性,活泼

Options

选项

OptionValuesDefault
-v, --voice
Kore, Aoede, Charon, Fenrir, PuckKore
-c, --character
character description-
-d, --direction
acting direction-
--speed
0.25-4.01.0
-l, --lang
ja, en, zh, ko, etc.ja
选项可选值默认值
-v, --voice
Kore, Aoede, Charon, Fenrir, PuckKore
-c, --character
角色描述-
-d, --direction
表演风格-
--speed
0.25-4.01.0
-l, --lang
ja, en, zh, ko, etc.ja

Workflow Patterns

工作流模式

Generate, then Edit

先生成再编辑

bash
npx ergon image gen "product photo of headphones" -t realistic
npx ergon image edit headphones.png "add soft shadow, white background"
bash
npx ergon image gen "product photo of headphones" -t realistic
npx ergon image edit headphones.png "add soft shadow, white background"

Image to Animated Video

图片转动画视频

bash
npx ergon image gen "mascot character standing" -t anime -a 1:1
npx ergon video gen "mascot waves and says hello cheerfully" -i mascot.png
bash
npx ergon image gen "mascot character standing" -t anime -a 1:1
npx ergon video gen "mascot waves and says hello cheerfully" -i mascot.png

Preview Before Generation

生成前预览

bash
npx ergon image gen "complex scene" --dry-run  # Check settings
npx ergon video gen "expensive render" --dry-run  # Verify before API call
bash
npx ergon image gen "complex scene" --dry-run  # 检查设置
npx ergon video gen "expensive render" --dry-run  # API调用前验证

Common Options

通用选项

All commands support:
  • --json
    - JSON output for scripting
  • --dry-run
    - Preview settings without API call
  • -o, --output <path>
    - Specify output path
所有命令均支持:
  • --json
    - 输出JSON格式用于脚本编写
  • --dry-run
    - 预览设置而不调用API
  • -o, --output <path>
    - 指定输出路径