Agentuity云存储上传工具Skill agentuity-cli-cloud-storage-upload

Agentuity云存储上传工具是一个命令行接口技能,专门用于将本地文件或标准输入流上传到指定的云存储桶中。该工具支持身份验证、自定义对象键、内容类型设置和管道操作,适用于云平台文件管理、数据备份和自动化部署等场景。关键词:云存储上传、Agentuity CLI、文件管理、云平台操作、存储桶、命令行工具、DevOps自动化。

CI/CD 0 次安装 12 次浏览 更新于 2/28/2026

name: agentuity-cli-cloud-storage-upload description: 上传文件到存储桶。需要身份验证。用于Agentuity云平台操作 version: “0.0.103” license: Apache-2.0 allowed-tools: “Bash(agentuity:*)” argument-hint: “<name> <filename>” metadata: command: “agentuity cloud storage upload” tags: “write requires-auth”

云存储上传

上传文件到存储桶

前提条件

  • 已通过 agentuity auth login 完成身份验证
  • 需要组织上下文(--org-id 或默认组织)

使用方法

agentuity cloud storage upload <name> <filename> [options]

参数

参数 类型 必填 描述
<name> 字符串 -
<filename> 字符串 -

选项

选项 类型 必填 默认值 描述
--key 字符串 - 远程对象键(默认为文件名基名,管道上传时默认为"stdin")
--contentType 字符串 - 内容类型(未提供时自动检测)

示例

上传文件到存储桶:

bunx @agentuity/cli cloud storage upload my-bucket file.txt

指定内容类型上传文件:

bunx @agentuity/cli cloud storage put my-bucket file.txt --content-type text/plain

使用自定义对象键上传文件:

bunx @agentuity/cli cloud storage upload my-bucket file.txt --key custom-name.txt

从标准输入上传:

cat file.txt | bunx @agentuity/cli cloud storage upload my-bucket -

从标准输入上传并指定自定义键:

cat data.json | bunx @agentuity/cli cloud storage upload my-bucket - --key data.json

输出

返回JSON对象:

{
  "success": "boolean",
  "bucket": "string",
  "filename": "string",
  "size": "number"
}
字段 类型 描述
success 布尔值 上传是否成功
bucket 字符串 存储桶名称
filename 字符串 上传的文件名
size 数字 文件大小(字节)