跳到主要内容

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

信息

以下是当此技能被触发时 Hermes 加载的完整技能定义。这是技能激活时智能体所看到的指示。

inference.sh CLI

通过简单的 CLI 在云端运行 150+ 个 AI 应用。无需 GPU。

所有命令都使用 终端工具 来运行 infsh 命令。

何时使用

  • 用户请求生成图像 (FLUX, Reve, Seedream, Grok, Gemini image)
  • 用户请求生成视频 (Veo, Wan, Seedance, OmniHuman)
  • 用户询问 inference.sh 或 infsh
  • 用户希望在无需管理各个供应商 API 的情况下运行 AI 应用
  • 用户请求 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

# 带 LoRA 的 FLUX Dev
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": "make it move"}' --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": "latest AI news"}' --json
infsh app run exa/exa-search --input '{"query": "machine learning papers"}' --json

其他类别

# 3D 生成
infsh app list --search 3d

# 音频 / TTS
infsh app list --search tts

# Twitter/X 自动化
infsh app list --search twitter

注意事项

  1. 切勿猜测应用 ID — 始终先运行 infsh app list --search <term>。应用 ID 会变化,且新应用会频繁添加。
  2. 始终使用 --json — 原始输出难以解析。--json 标志提供包含 URL 的结构化输出。
  3. 检查身份验证 — 如果命令因身份验证错误而失败,请运行 infsh login 或验证是否设置了 INFSH_API_KEY
  4. 长时间运行的应用 — 视频生成可能需要 30-120 秒。终端工具超时时间应足够,但请提醒用户可能需要一些时间。
  5. 输入格式--input 标志接受 JSON 字符串。确保正确转义引号。

参考文档

  • references/authentication.md — 设置、登录、API 密钥
  • references/app-discovery.md — 搜索和浏览应用目录
  • references/running-apps.md — 运行应用、输入格式、输出处理
  • references/cli-reference.md — 完整的 CLI 命令参考