Inference Sh Cli
通過 inference.sh CLI (infsh) 運行 150+ 個 AI 應用 — 圖像生成、視頻創作、LLM、搜索、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 |
| 標籤 | AI, image-generation, video, LLM, search, inference, FLUX, Veo, Claude |
參考:完整 SKILL.md
信息
以下是 Hermes 在觸發此技能時加載的完整技能定義。這是技能激活時代理看到的指令。
inference.sh CLI
通過簡單的 CLI 在雲端運行 150+ 個 AI 應用。無需 GPU。
所有命令均使用 terminal tool 來運行 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> 將這些 URL 呈現給用戶,以便內聯顯示。
常用命令
圖像生成
# Search for image apps
infsh app list --search image
# FLUX Dev with LoRA
infsh app run falai/flux-dev-lora --input '{"prompt": "sunset over mountains", "num_images": 1}' --json
# Gemini image generation
infsh app run google/gemini-2-5-flash-image --input '{"prompt": "futuristic city", "num_images": 1}' --json
# Seedream (ByteDance)
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
視頻生成
# Search for video apps
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 (ByteDance)
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 會自動上傳本地文件:
# Upscale a local image
infsh app run falai/topaz-image-upscaler --input '{"image": "/path/to/photo.jpg", "upscale_factor": 2}' --json
# Image-to-video from local file
infsh app run falai/wan-2-5-i2v --input '{"image": "/path/to/image.png", "prompt": "make it move"}' --json
# Avatar with audio
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 generation
infsh app list --search 3d
# Audio / TTS
infsh app list --search tts
# Twitter/X automation
infsh app list --search twitter
常見陷阱
- 切勿猜測應用 ID — 始終先運行
infsh app list --search <term>。應用 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 命令參考