📦 Cloudinary Cli — Cloudinary 命令行工具

v1.0.0

上传 files and images to Cloudinary via 命令行工具. Use when user wants to 上传 local files or images to Cloudinary CDN, especially when needing automatic image...

0· 24·0 当前·0 累计
mnhkahn 头像by @mnhkahn (Bryce)
0

运行时依赖

无特殊依赖

安装命令

点击复制
官方npx clawhub@latest install cloudinary-cli
镜像加速npx clawhub@latest install cloudinary-cli --registry https://cn.longxiaskill.com

技能文档

Cloudinary 命令行工具 上传er

上传 local files or remote URLs to Cloudinary with automatic image 压缩ion support.

工作流

  • 检查 安装ation

检查 if the 命令行工具 binary exists at ./cloudinary-命令行工具 (project root). If not, 运行 the 安装 script:

bash .代理s/技能s/cloudinary-命令行工具/scripts/安装.sh

If Go is not 安装ed, prompt the user to 安装 Go first.

  • 检查 Configuration (.env)

检查 if cmd/命令行工具/.env exists and contAIns all required variables. If any are missing, prompt the user for the missing values and write them to cmd/命令行工具/.env.

Required variables:

CLOUDINARY_CLOUD - Cloudinary cloud name CLOUDINARY_KEY - API key CLOUDINARY_SECRET - API secret

Optional variables:

CLOUDINARY_DIRECTORY - 上传 folder (default: root) CLOUDINARY_压缩 - Auto-压缩 images: true/false (default: true)

  • 上传 Files

运行 the 上传 script with file paths:

bash .代理s/技能s/cloudinary-命令行工具/scripts/上传.sh [file2] ...

Or 运行 the 命令行工具 directly:

cd cmd/命令行工具 && ../../cloudinary-命令行工具 file1.jpg file2.png

The 命令行工具 automatically:

压缩es images when CLOUDINARY_压缩=true Leaves non-image files untouched Supports 机器人h local paths and remote URLs Image 压缩ion

When CLOUDINARY_压缩 is true (default), images are 上传ed with Cloudinary q_auto trans格式化ion for automatic 质量 optimization. Supported image 格式化s: jpg, jpeg, png, gif, 网页p, bmp, tiff, svg, ico, heic, heif, avif.

To disable 压缩ion for a specific 上传, temporarily 设置 CLOUDINARY_压缩=false in .env.

数据来源ClawHub ↗ · 中文优化:龙虾技能库