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

Agentuity云存储上传工具是一个命令行技能,用于将本地文件或标准输入流上传到指定的云存储桶。该工具支持身份验证、组织上下文管理、自定义对象键和内容类型设置,适用于自动化脚本和DevOps工作流中的文件存储操作。关键词:云存储上传、Agentuity CLI、文件上传、存储桶管理、命令行工具、DevOps自动化。

云原生架构 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: “<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 数字 文件大小(字节)