name: agentuity-cli-cloud-storage-download description: 从存储桶下载文件。需要身份验证。用于Agentuity云平台操作 version: “0.0.103” license: Apache-2.0 allowed-tools: “Bash(agentuity:*)” argument-hint: “<name> <filename> [output]” metadata: command: “agentuity cloud storage download” tags: “read-only requires-auth”
云存储下载
从存储桶下载文件
前提条件
- 已通过
agentuity auth login进行身份验证 - 需要组织上下文(
--org-id或默认组织)
使用方法
agentuity cloud storage download <name> <filename> [output] [options]
参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
<name> |
字符串 | 是 | - |
<filename> |
字符串 | 是 | - |
<output> |
字符串 | 否 | - |
选项
| 选项 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
--metadata |
布尔值 | 是 | - | 仅下载元数据(不下载文件内容) |
示例
从存储桶下载文件:
bunx @agentuity/cli cloud storage download my-bucket file.txt
下载文件到指定路径:
bunx @agentuity/cli cloud storage download my-bucket file.txt output.txt
下载文件到标准输出:
bunx @agentuity/cli cloud storage download my-bucket file.txt - > output.txt
仅下载元数据:
bunx @agentuity/cli cloud storage download my-bucket file.txt --metadata
输出
返回JSON对象:
{
"success": "boolean",
"bucket": "string",
"filename": "string",
"size": "number",
"contentType": "string",
"lastModified": "string"
}
| 字段 | 类型 | 描述 |
|---|---|---|
success |
布尔值 | 下载是否成功 |
bucket |
字符串 | 存储桶名称 |
filename |
字符串 | 下载的文件名 |
size |
数字 | 文件大小(字节) |
contentType |
字符串 | 内容类型 |
lastModified |
字符串 | 最后修改时间戳 |