AgentSkillsCN

agentuity-cli-cloud-storage-upload

将文件上传至存储桶。需要身份验证。适用于 Agentuity 云平台运维。

SKILL.md
--- frontmatter
name: agentuity-cli-cloud-storage-upload
description: Upload a file to storage bucket. Requires authentication. Use for Agentuity cloud platform operations
version: "0.1.24"
license: Apache-2.0
allowed-tools: "Bash(agentuity:*)"
argument-hint: "<name> <filename>"
metadata:
  command: "agentuity cloud storage upload"
  tags: "write requires-auth uses-stdin"

Cloud Storage Upload

Upload a file to storage bucket

Prerequisites

  • Authenticated with agentuity auth login

Usage

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

Arguments

ArgumentTypeRequiredDescription
<name>stringYes-
<filename>stringYes-

Options

OptionTypeRequiredDefaultDescription
--keystringYes-Remote object key (defaults to basename or "stdin" for piped uploads)
--contentTypestringYes-Content type (auto-detected if not provided)

Examples

Upload file to bucket:

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

Upload file with content type:

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

Upload file with custom object key:

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

Upload from stdin:

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

Upload from stdin with custom key:

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

Output

Returns JSON object:

json
{
  "success": "boolean",
  "bucket": "string",
  "filename": "string",
  "size": "number"
}
FieldTypeDescription
successbooleanWhether upload succeeded
bucketstringBucket name
filenamestringUploaded filename
sizenumberFile size in bytes