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

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

云原生架构 0 次安装 0 次浏览 更新于 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: “<存储桶名称> <文件名>” metadata: command: “agentuity cloud storage upload” tags: “write requires-auth”

云存储上传

上传文件到存储桶

前提条件

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

使用方法

agentuity cloud storage upload <存储桶名称> <文件名> [选项]

参数

参数 类型 是否必需 描述
<存储桶名称> 字符串 -
<文件名> 字符串 -

选项

选项 类型 是否必需 默认值 描述
--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 数字 文件大小(字节)