mcpField
I
infsh-cli

infsh-cli

github.com/inference-sh创意与媒体789212.9k 次安装2 周前更新
代码仓库

关于 infsh-cli

infsh-cli 是使用 inference.sh 的 belt 命令行工具运行云端 AI 应用的技能,面向 Agent 和命令行工作流,可调用图像、视频、LLM、搜索等应用,无需本地 GPU。

主要功能

  1. 01浏览和搜索应用目录
  2. 02通过 belt 运行云端 AI 应用
  3. 03自动上传本地输入文件
  4. 04查询任务状态并异步运行

适用场景

  1. 01根据提示词生成图像或视频
  2. 02调用托管的 LLM 应用
  3. 03处理本地图像、音频或视频文件

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/inference-sh/skills --skill infsh-cli

安装后在 Claude Code 中输入/infsh-cli确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/
app-discovery.md
authentication.md
cli-reference.md
running-apps.md

详细介绍

安装 belt CLI 技能: npx skills add belt-sh/cli

inference.sh

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

inference.sh

安装 CLI

curl -fsSL https://cli.inference.sh | sh
belt login

Agent / 非交互式 Shell:使用 printf %s "$KEY" | belt login --key-stdin,或设置 INFERENCE_API_KEY(每次执行命令时读取,无需登录;旧版 belt 读取 INFSH_API_KEY,现已弃用)。 如果没有 TTY,belt login 会打印一个 URL;然后浏览器会显示一个认领码。请在同一台机器上于 5 分钟内运行 belt login --code <code>。

安装程序会做什么? 安装脚本 会检测你的操作系统和架构,从 dist.inference.sh 下载正确的二进制文件,验证其 SHA-256 校验和,并将其放入你的 PATH。就是这样——无需提升权限,不会运行后台进程,也没有遥测。如果你安装了 cosign,安装程序还会自动验证 Sigstore 签名。

手动安装(如果你不想通过管道传给 sh):

# 下载二进制文件和校验和
curl -LO https://dist.inference.sh/cli/checksums.txt
curl -LO $(curl -fsSL https://dist.inference.sh/cli/manifest.json | grep -o '"url":"[^"]*"' | grep $(uname -s | tr A-Z a-z)-$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') | head -1 | cut -d'"' -f4)
# 验证校验和
sha256sum -c checksums.txt --ignore-missing
# 解压并安装
tar -xzf inferencesh-cli-*.tar.gz
mv inferencesh-cli-* ~/.local/bin/inferencesh

快速示例

# Generate an image
belt app run falai/flux-dev-lora --input '{"prompt": "a cat astronaut"}'

# Generate a video
belt app run google/veo-3-1-fast --input '{"prompt": "drone over mountains"}'

# Call Claude
belt app run openrouter/claude-sonnet-45 --input '{"prompt": "Explain quantum computing"}'

# Web search
belt app run tavily/search-assistant --input '{"query": "latest AI news"}'

# Post to Twitter
belt app run x/post-create --input '{"text": "Hello from AI!"}'

# Generate 3D model
belt app run infsh/rodin-3d-generator --input '{"prompt": "a wooden chair"}'

本地文件上传

提供路径而非 URL 时,CLI 会自动上传本地文件:

# Upscale a local image
belt app run falai/topaz-image-upscaler --input '{"image": "/path/to/photo.jpg", "upscale_factor": 2}'

# Image-to-video from local file
belt app run falai/wan-2-5-i2v --input '{"image": "./my-image.png", "prompt": "make it move"}'

# Avatar with local audio and image
belt app run bytedance/omnihuman-1-5 --input '{"audio": "/path/to/speech.mp3", "image": "/path/to/face.jpg"}'

# Post tweet with local media
belt app run x/post-create --input '{"text": "Check this out!", "media": ["./screenshot.png"]}'

命令

任务命令
浏览应用商店belt app list
搜索商店belt app search "flux"
按类别筛选belt app list --category image
列出你的应用belt app list
获取应用详情belt app get google/veo-3-1-fast
生成示例输入belt app sample google/veo-3-1-fast --save input.json
运行应用belt app run google/veo-3-1-fast --input input.json
运行应用但不等待belt app run <app> --input input.json --no-wait
检查任务状态belt task get <task-id>

可用内容

类别示例
图像FLUX、Gemini 3 Pro、Grok Imagine、Seedream 4.5、Reve、Topaz Upscaler
视频Veo 3.1、Seedance 2.0、Wan 2.5、OmniHuman、Fabric、MMAudio
大模型Claude Opus/Sonnet/Haiku、Gemini 3 Pro、Kimi K2、GLM-4、任意 OpenRouter 模型
搜索Tavily Search、Tavily Extract、Exa Search、Exa Answer、Exa Extract
3DRodin 3D Generator
Twitter/Xpost-create、dm-send、user-follow、post-like、post-retweet
实用工具媒体合并、视频添加字幕、图像拼接、音频提取

相关技能

# Image generation (FLUX, Gemini, Grok, Seedream)
npx skills add inference-sh/skills@ai-image-generation

# Video generation (Veo, Seedance, Wan, OmniHuman)
npx skills add inference-sh/skills@ai-video-generation

# LLMs (Claude, Gemini, Kimi, GLM via OpenRouter)
npx skills add inference-sh/skills@llm-models

# Web search (Tavily, Exa)
npx skills add inference-sh/skills@web-search

# AI avatars & lipsync (OmniHuman, Fabric, PixVerse)
npx skills add inference-sh/skills@ai-avatar-video

# Twitter/X automation
npx skills add inference-sh/skills@twitter-automation

# Model-specific
npx skills add inference-sh/skills@flux-image
npx skills add inference-sh/skills@google-veo

# Utilities
npx skills add inference-sh/skills@image-upscaling
npx skills add inference-sh/skills@background-removal

参考文件

文档

评论

支持 Markdown