{"id":28522009,"url":"https://github.com/siliconflow/bizyair-cli","last_synced_at":"2026-01-31T10:02:49.704Z","repository":{"id":288053230,"uuid":"961825183","full_name":"siliconflow/bizyair-cli","owner":"siliconflow","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-04T02:50:18.000Z","size":8172,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-11-04T04:28:18.874Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siliconflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-07T08:17:15.000Z","updated_at":"2025-10-30T09:15:43.000Z","dependencies_parsed_at":"2025-10-24T11:26:29.714Z","dependency_job_id":"76495013-bb2d-462d-ac92-b99bf84dbbc3","html_url":"https://github.com/siliconflow/bizyair-cli","commit_stats":null,"previous_names":["siliconflow/bizyair-cli"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/siliconflow/bizyair-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siliconflow%2Fbizyair-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siliconflow%2Fbizyair-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siliconflow%2Fbizyair-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siliconflow%2Fbizyair-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siliconflow","download_url":"https://codeload.github.com/siliconflow/bizyair-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siliconflow%2Fbizyair-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28937815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T08:53:31.997Z","status":"ssl_error","status_checked_at":"2026-01-31T08:51:38.521Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-09T08:30:38.411Z","updated_at":"2026-01-31T10:02:49.699Z","avatar_url":"https://github.com/siliconflow.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eBizyAir CLI\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cp\u003e\n\nBizyAir CLI 是一个开源命令行工具，您可以从 [GitHub](https://github.com/siliconflow/bizyair-cli) 获取最新版本。\n\n## 简介\n\nBizyAir CLI 是用于管理 BizyAir 上模型文件的命令行工具。它提供了**交互式界面（TUI）**和**命令行（CLI）**两种使用模式，让您可以轻松上传和管理 BizyAir 模型。\n\n### ✨ 核心特性\n\n- 🎨 **交互式 TUI 界面** - 友好的图形化交互体验，无需记忆命令\n- 🚀 **断点续传** - 上传中断后自动从断点继续，节省时间\n- ⚡ **并发上传** - 最多 3 个并发，显著提升上传速度\n- 📦 **分片上传** - 大文件（\u003e100MB）自动分片上传，更稳定\n- 🖼️ **智能封面处理** - 自动转换为 WebP 格式，支持图片和视频\n- 📝 **灵活的介绍输入** - 支持直接输入或从文件导入（.txt/.md）\n- 📋 **YAML 批量上传** - 通过配置文件一次上传多个模型\n- 🌐 **VPN 检测** - 自动检测 VPN 并给出友好提示\n- 📊 **实时进度显示** - 上传速率、进度条实时更新\n- 🔄 **自动升级** - 一键升级到最新版本，支持版本检查和安全回滚\n\n## 发布版本\n\n所有发布版本请[点击这里查看](https://github.com/siliconflow/bizyair-cli/releases)。\n\n## 安装\n\nBizyAir CLI 支持 Linux、macOS 和 Windows 平台。所有平台的二进制文件都可以从 [GitHub Release 页面](https://github.com/siliconflow/bizyair-cli/releases) 下载。\n\n### Linux 安装\n\n1. 从 [Release 页面](https://github.com/siliconflow/bizyair-cli/releases) 下载最新版本：\n\n   ```bash\n   # 设置版本号（请替换为最新版本）\n   VERSION=0.2.1\n\n   # 下载 Linux amd64 版本\n   wget https://github.com/siliconflow/bizyair-cli/releases/download/v${VERSION}/bizyair-v${VERSION}-linux-amd64.tar.gz\n\n   # 或下载 Linux arm64 版本\n   # wget https://github.com/siliconflow/bizyair-cli/releases/download/v${VERSION}/bizyair-v${VERSION}-linux-arm64.tar.gz\n   ```\n\n2. 解压并安装：\n\n   ```bash\n   # 解压文件\n   tar -xzvf bizyair-v${VERSION}-linux-amd64.tar.gz\n\n   # 安装到系统路径\n   sudo install bizyair /usr/local/bin/bizyair\n\n   # 或者安装到用户目录（无需 sudo）\n   # mkdir -p ~/.local/bin\n   # install bizyair ~/.local/bin/bizyair\n   # 确保 ~/.local/bin 在您的 PATH 中\n   ```\n\n3. 验证安装：\n\n   ```bash\n   bizyair --version\n   ```\n\n### macOS 安装\n\n1. 从 [Release 页面](https://github.com/siliconflow/bizyair-cli/releases) 下载最新版本：\n\n   ```bash\n   # 设置版本号（请替换为最新版本）\n   VERSION=0.2.1\n\n   # 下载 macOS arm64 版本（Apple Silicon，如 M1/M2/M3）\n   curl -LO https://github.com/siliconflow/bizyair-cli/releases/download/v${VERSION}/bizyair-v${VERSION}-macos-arm64.tar.gz\n\n   # 或下载 macOS amd64 版本（Intel 芯片）\n   # curl -LO https://github.com/siliconflow/bizyair-cli/releases/download/v${VERSION}/bizyair-v${VERSION}-macos-amd64.tar.gz\n   ```\n\n2. 解压并安装：\n\n   ```bash\n   # 解压文件\n   tar -xzvf bizyair-v${VERSION}-macos-arm64.tar.gz\n\n   # 添加执行权限\n   chmod +x bizyair\n\n   # 安装到系统路径\n   sudo install bizyair /usr/local/bin/bizyair\n\n   # 或者安装到用户目录（无需 sudo）\n   # mkdir -p ~/.local/bin\n   # install bizyair ~/.local/bin/bizyair\n   # 确保 ~/.local/bin 在您的 PATH 中\n   ```\n\n3. 首次运行时，macOS 可能会提示安全警告，请按以下步骤操作：\n\n   ```bash\n   # 移除隔离属性\n   xattr -d com.apple.quarantine /usr/local/bin/bizyair\n   ```\n\n   或者在系统设置中允许运行：\n\n   - 打开 **系统设置** → **隐私与安全性**\n   - 找到被阻止的 `bizyair` 并点击 **仍要打开**\n\n4. 验证安装：\n\n   ```bash\n   bizyair --version\n   ```\n\n### Windows 安装\n\n1. 从 [Release 页面](https://github.com/siliconflow/bizyair-cli/releases) 下载最新版本：\n\n   - 下载 `bizyair-v{VERSION}-windows-amd64.zip` 文件\n\n2. 解压文件：\n\n   - 右键点击下载的 `.zip` 文件\n   - 选择 **解压全部** 或使用解压工具（如 7-Zip）\n   - 将 `bizyair.exe` 解压到您选择的目录（例如 `C:\\Program Files\\BizyAir\\`）\n\n3. 添加到系统 PATH（推荐）：\n\n   - 右键点击 **此电脑** → **属性** → **高级系统设置**\n   - 点击 **环境变量**\n   - 在 **系统变量** 中找到 `Path`，点击 **编辑**\n   - 点击 **新建**，添加 `bizyair.exe` 所在的目录路径\n   - 点击 **确定** 保存\n\n4. 验证安装：\n\n   打开 **命令提示符** 或 **PowerShell**：\n\n   ```powershell\n   bizyair --version\n   ```\n\n   如果没有添加到 PATH，可以使用完整路径运行：\n\n   ```powershell\n   C:\\Program Files\\BizyAir\\bizyair.exe --version\n   ```\n\n## 从源码构建\n\nBizyAir CLI 当前使用 GO v1.22.X 或更高版本。\n要从源码构建，您需要：\n\n1. 克隆仓库\n2. 构建并运行可执行文件\n\n   ```shell\n   make build \u0026\u0026 ./execs/bizyair\n   ```\n\n- Windows 系统运行：`make build_windows`\n- MacOS 系统运行：`make build_mac`\n- Linux 系统运行：`make build_linux` 或 `make build_linux_arm64`\n\n---\n\n## 使用模式\n\nBizyAir CLI 提供两种使用模式，您可以根据自己的喜好选择：\n\n### 🎨 交互式界面（TUI）- 推荐新手使用\n\n直接运行 `bizyair` 命令即可进入友好的交互式界面：\n\n```bash\nbizyair\n```\n\nTUI 模式特点：\n\n- ✅ 图形化界面，操作直观\n- ✅ 逐步引导，不易出错\n- ✅ 实时反馈和进度显示\n- ✅ 支持文件选择器\n- ✅ 自动 VPN 检测和提示\n\n### ⌨️ 命令行模式（CLI）- 适合脚本和自动化\n\n使用命令行参数直接执行操作：\n\n```bash\nbizyair upload -n mymodel -t LoRA -p /path/to/model.safetensors -b \"Flux.1 D\" -cover /path/to/cover.jpg\n```\n\nCLI 模式特点：\n\n- ✅ 快速执行，适合脚本\n- ✅ 支持 YAML 批量上传\n- ✅ 可集成到 CI/CD 流程\n- ✅ 支持环境变量配置\n\n---\n\n## 升级到最新版本\n\nBizyAir CLI 支持一键升级到最新版本：\n\n```bash\n# 检查更新\nbizyair upgrade --check\n\n# 执行升级\nbizyair upgrade\n```\n\n---\n\n## 快速开始\n\n### 方式一：使用交互式界面（推荐）\n\n1. **启动 TUI**\n\n```bash\nbizyair\n```\n\n2. **首次使用需要登录**\n\n   - 输入您的 API Key（从 [BizyAir](https://bizyair.cn) 获取）\n   - 按 Enter 确认\n\n3. **选择功能**\n\n   - 上传模型：交互式收集参数并上传\n   - 我的模型：在浏览器中查看已上传的模型\n   - 退出登录：清除本地 API Key\n   - 退出程序\n\n4. **上传模型**\n   - 按照界面提示逐步输入信息\n   - 支持文件选择器或手动输入路径\n   - 支持多版本上传\n   - 自动显示上传进度和速率\n\n### 方式二：使用命令行\n\n#### 1. 登录\n\nBizyAir CLI 使用 API Key 进行身份验证。要登录您的设备，运行以下命令：\n\n```bash\n# 如果您已设置环境变量 SF_API_KEY\nbizyair login\n\n# 或使用 --key/-k 选项指定\nbizyair login -k $SF_API_KEY\n```\n\n#### 2. 上传模型\n\n**单版本上传示例：**\n\n```bash\nbizyair upload -n mymodel -t LoRA \\\n  -p /local/path/model.safetensors \\\n  -b \"Flux.1 D\" \\\n  -cover \"/path/to/cover.jpg\" \\\n  --intro \"这是一个动漫风格的 LoRA 模型\"\n```\n\n**多版本上传示例：**\n\n```bash\nbizyair upload -n mymodel -t Checkpoint \\\n  -v \"v1.0\" -p /path/file1.safetensors -b SDXL --intro \"第一版\" -cover \"/path/cover1.jpg\" \\\n  -v \"v2.0\" -p /path/file2.safetensors -b \"SD 1.5\" --intro \"第二版\" -cover \"/path/cover2.jpg\"\n```\n\n**核心参数说明：**\n\n- `-n, --name`: 模型名称（必填）\n- `-t, --type`: 模型类型（必填，如 LoRA、Checkpoint、Controlnet 等）\n- `-p, --path`: 模型文件路径（必填，可多次指定）\n- `-b, --base`: 基础模型（必填，如 \"Flux.1 D\"、SDXL、\"SD 1.5\" 等）\n- `-cover`: 封面文件或 URL（必填）\n- `-i, --intro`: 模型介绍文本（必填）\n- `--intro-path`: 从文件导入介绍（与 `-i` 二选一）\n- `-v, --version`: 版本名称（可选，默认 v1.0）\n- `--public`: 是否公开版本（可选，默认 false）\n\n#### 3. 封面上传（必填）\n\n封面支持**本地文件**和 **URL** 两种方式，会自动上传到 OSS 并转换为 WebP 格式：\n\n```bash\n# 使用本地文件\nbizyair upload -n mymodel -t LoRA -p model.safetensors -b \"Flux.1 D\" \\\n  -cover \"/path/to/cover.jpg\" --intro \"介绍文本\"\n\n# 使用 URL\nbizyair upload -n mymodel -t LoRA -p model.safetensors -b \"Flux.1 D\" \\\n  -cover \"https://example.com/cover.jpg\" --intro \"介绍文本\"\n```\n\n**支持的格式：**\n\n- 图片：`.jpg`、`.jpeg`、`.png`、`.gif`、`.webp`\n- 视频：`.mp4`、`.webm`、`.mov`（最大 100MB）\n\n**WebP 转换：** 图片封面会自动转换为 WebP 格式以优化加载速度。如果转换失败，会自动回退到原始格式。\n\n#### 4. 介绍文本输入\n\n支持两种方式输入模型介绍（最多 5000 字）：\n\n```bash\n# 方式1：直接输入文本\nbizyair upload -n mymodel -t LoRA -p model.safetensors -b \"Flux.1 D\" \\\n  -cover cover.jpg --intro \"这是模型的详细介绍...\"\n\n# 方式2：从文件导入（支持 .txt 和 .md）\nbizyair upload -n mymodel -t LoRA -p model.safetensors -b \"Flux.1 D\" \\\n  -cover cover.jpg --intro-path intro.md\n```\n\n#### 5. YAML 批量上传\n\n使用 YAML 配置文件可以一次上传多个模型：\n\n```bash\nbizyair upload -f config.yaml\n```\n\n**YAML 配置示例：**\n\n```yaml\nmodels:\n  - name: \"anime_style_lora\"\n    type: \"LoRA\"\n    versions:\n      - name: \"v1.0\"\n        base_model: \"Flux.1 D\"\n        model_path: \"models/anime_v1.safetensors\"\n        cover_path: \"covers/anime_v1.jpg\"\n        intro: \"第一版动漫风格模型\"\n        public: true\n\n      - name: \"v2.0\"\n        base_model: \"Flux.1 D\"\n        model_path: \"models/anime_v2.safetensors\"\n        cover_url: \"https://example.com/cover.jpg\"\n        intro_path: \"descriptions/v2_intro.txt\"\n        public: false\n\n  - name: \"realistic_checkpoint\"\n    type: \"Checkpoint\"\n    versions:\n      - base_model: \"SD 1.5\"\n        model_path: \"checkpoints/realistic.ckpt\"\n        cover_path: \"covers/realistic.webp\"\n        intro_path: \"descriptions/realistic.md\"\n```\n\n**YAML 配置说明：**\n\n- `model_path`: 模型文件路径（相对于 YAML 文件）\n- `cover_path` / `cover_url`: 封面文件或 URL（二选一）\n- `intro` / `intro_path`: 介绍文本或文件（二选一）\n- `name`: 版本名称（可选，自动递增）\n- `public`: 是否公开（可选，默认 false）\n\n详细配置说明请参考 [example.yaml](./example.yaml)\n\n#### 6. 断点续传\n\n上传中断后，重新运行相同命令会自动从断点继续：\n\n```bash\n# 第一次上传（中断）\nbizyair upload -n mymodel -t Checkpoint -p large-model.safetensors -b SDXL \\\n  -cover cover.jpg --intro \"介绍\"\n# ^C (中断)\n\n# 重新运行相同命令，自动续传\nbizyair upload -n mymodel -t Checkpoint -p large-model.safetensors -b SDXL \\\n  -cover cover.jpg --intro \"介绍\"\n# ✓ 从断点继续上传\n```\n\nCheckpoint 文件保存在 `~/.bizyair/uploads/` 目录。\n\n#### 7. 查看和管理模型\n\n```bash\n# 查看我的模型（在浏览器中打开）\nbizyair model ls\n\n# 删除模型\nbizyair model rm -n mymodel -t Checkpoint\n```\n\n#### 8. 退出登录\n\n```bash\nbizyair logout\n```\n\n---\n\n## 支持的模型类型和基础模型\n\n### 模型类型\n\n- `Checkpoint` - 完整模型检查点\n- `LoRA` - 低秩适应模型\n- `Controlnet` - 控制网络\n- `VAE` - 变分自编码器\n- `UNet` - U-Net 模型\n- `CLIP` - CLIP 模型\n- `Upscaler` - 超分辨率模型\n- `Detection` - 检测模型\n- `Other` - 其他类型\n\n### 基础模型\n\n- `Flux.1 D` - Flux.1 D 模型\n- `Flux.1 Kontext` - Flux.1 Kontext 模型\n- `SDXL` - Stable Diffusion XL\n- `SD 1.5` - Stable Diffusion 1.5\n- `SD 3.5` - Stable Diffusion 3.5\n- `Pony` - Pony Diffusion\n- `Kolors` - Kolors 模型\n- `Hunyuan 1` - 混元 1\n- `WAN Video` - WAN Video 模型\n- `Qwen-Image` - Qwen 图像模型\n- `Other` - 其他基础模型\n\n---\n\n## 详细文档\n\n- [example.yaml](./example.yaml) - YAML 配置示例\n\n---\n\n## 常见问题\n\n### 如何获取 API Key？\n\n访问 [BizyAir](https://bizyair.cn) 注册并在个人设置中获取 API Key。\n\n### 上传失败怎么办？\n\n1. 检查网络连接\n2. 确认 API Key 是否有效\n3. 查看是否使用了 VPN（可能影响上传速度）\n4. 尝试重新运行命令（支持断点续传）\n\n### 如何清除 Checkpoint 文件？\n\nCheckpoint 文件保存在 `~/.bizyair/uploads/` 目录，可以手动删除。\n\n### 封面转换失败怎么办？\n\n如果 WebP 转换失败，系统会自动回退到原始格式，不影响上传。\n\n---\n\n## 贡献\n\n欢迎提交 Issue 和 Pull Request！\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiliconflow%2Fbizyair-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiliconflow%2Fbizyair-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiliconflow%2Fbizyair-cli/lists"}