Inference Sh Cli
通过 inference.sh CLI(infsh)运行 150 多种 AI 应用 — 图像生成、视频创作、大语言模型、搜索、3D、社交自动化。使用终端工具。触发词:inference.sh, infsh, ai apps, flux, veo, image generation, video generation, seedream, seedance, tavily
技能元数据
| 来源 | 可选 — 使用 hermes skills install official/devops/cli 安装 |
| 路径 | optional-skills/devops/cli |
| 版本 | 1.0.0 |
| 作者 | okaris |
| 许可证 | MIT |
| 平台 | linux, macos, windows |
| 标签 | AI, image-generation, video, LLM, search, inference, FLUX, Veo, Claude |
参考:完整 SKILL.md
info
以下是完整的技能定义,当此技能被触发时,Hermes 会加载该定义。这是技能激活时 Agent 看到的指令。
inference.sh CLI
通过简单的 CLI 在云端运行 150 多种 AI 应用。无需 GPU。
所有命令均使用终端工具运行 infsh 命令。
何时使用
- 用户要求生成图像(FLUX、Reve、Seedream、Grok、Gemini image)
- 用户要求生成视频(Veo、Wan、Seedance、OmniHuman)
- 用户询问关于 inference.sh 或 infsh
- 用户希望运行 AI 应用,而不需要管理各个提供商的 API
- 用户要求 AI 驱动的搜索(Tavily、Exa)
- 用户需要生成头像 / 口型同步
前提条件
必须安装并认证 infsh CLI。检查方式:
infsh me
如果未安装:
curl -fsSL https://cli.inference.sh | sh
infsh login
完整设置详情请参见 references/authentication.md。
工作流程
1. 总是先搜索
永远不要猜测应用名称 — 始终搜索以找到正确的应用 ID:
infsh app list --search flux
infsh app list --search video
infsh app list --search image
2. 运行应用
使用搜索结果中的确切应用 ID。始终使用 --json 获取机器可读的输出:
infsh app run <app-id> --input '{"prompt": "your prompt here"}' --json
3. 解析输出
JSON 输出中包含生成的媒体文件 URL。使用 MEDIA:<url> 将其呈现给用户,以便内联展示。
常用命令
图像生成
# 搜索图像应用
infsh app list --search image
# FLUX Dev 搭配 LoRA
infsh app run falai/flux-dev-lora --input '{"prompt": "sunset over mountains", "num_images": 1}' --json
# Gemini 图像生成
infsh app run google/gemini-2-5-flash-image --input '{"prompt": "futuristic city", "num_images": 1}' --json
# Seedream(字节跳动)
infsh app run bytedance/seedream-5-lite --input '{"prompt": "nature scene"}' --json
# Grok Imagine(xAI)
infsh app run xai/grok-imagine-image --input '{"prompt": "abstract art"}' --json
视频生成
# 搜索视频应用
infsh app list --search video
# Veo 3.1(Google)
infsh app run google/veo-3-1-fast --input '{"prompt": "drone shot of coastline"}' --json
# Seedance(字节跳动)
infsh app run bytedance/seedance-1-5-pro --input '{"prompt": "dancing figure", "resolution": "1080p"}' --json
# Wan 2.5
infsh app run falai/wan-2-5 --input '{"prompt": "person walking through city"}' --json
本地文件上传
CLI 会自动上传你提供的本地文件路径:
# 放大本地图片
infsh app run falai/topaz-image-upscaler --input '{"image": "/path/to/photo.jpg", "upscale_factor": 2}' --json
# 从本地图片生成视频
infsh app run falai/wan-2-5-i2v --input '{"image": "/path/to/image.png", "prompt": "让它动起来"}' --json
# 带音频的头像生成
infsh app run bytedance/omnihuman-1-5 --input '{"audio": "/path/to/audio.mp3", "image": "/path/to/face.jpg"}' --json
搜索与研究
infsh app list --search search
infsh app run tavily/tavily-search --input '{"query": "最新AI新闻"}' --json
infsh app run exa/exa-search --input '{"query": "机器学习论文"}' --json
其他类别
# 3D 生成
infsh app list --search 3d
# 音频 / TTS
infsh app list --search tts
# Twitter/X 自动化
infsh app list --search twitter
注意事项
- 不要猜测应用 ID — 始终先运行
infsh app list --search <关键词>。应用 ID 会变更,新应用也会频繁添加。 - 始终使用
--json— 原始输出难以解析。--json标志会给出带有 URL 的结构化输出。 - 检查身份认证 — 如果命令因认证错误失败,请运行
infsh login或确认已设置INFSH_API_KEY。 - 长时间运行的应用 — 视频生成可能需要 30–120 秒。终端工具的超时时间通常足够,但要提醒用户可能需要等待一会儿。
- 输入格式 —
--input标志接受 JSON 字符串。请确保正确转义引号。
参考文档
references/authentication.md— 设置、登录、API 密钥references/app-discovery.md— 搜索和浏览应用目录references/running-apps.md— 运行应用、输入格式、输出处理references/cli-reference.md— 完整的 CLI 命令参考