Loading...
Loading...
S3-compatible object storage CLI (upload, list, find, download, delete, public URL) via scripts/s3-cli.js with env-backed config aligned to this repo. Use when uploading files to S3/Kodo/MinIO, listing or searching objects by prefix, verifying S3 env, or when the user mentions /s3-upload, s3-cli, or object storage operations.
npx skill4agent add liuhuapiaoyuan/shuangyuan-skills s3-uploadscripts/s3-cli.jssrc/app-agent/lib/server/s3-storage.ts.env-template.envnode --env-file-if-exists=.env .cursor/skills/s3-upload/scripts/s3-cli.js configuploadlistfindurl--json@aws-sdk/client-s3node_modules--yes--jsoncodeerrorhinterrorcodehint--no-acl | Meaning | Agent Action |
|---|---|---|
| Missing environment variables | List the |
| Invalid credentials | Ask the user to check AK/SK, do not blindly retry with the same invalid credentials |
| Permission denied | Explain insufficient permissions; if the hint mentions |
| ACL not supported | Retry upload with |
| Bucket does not exist | Check if |
| Object does not exist | Suggest using |
| Local file does not exist | Check the path and whether cwd is in the repository root |
| | Confirm with the user before adding |
| Missing parameters | Correct the command according to the hint, do not guess parameters |
| Network/endpoint unreachable | Check endpoint, region, and proxy |
| Missing SDK | Retry after running |
| Other S3 errors | Report |
Command failed (exit 1)
├─ Re-run with --json, read code
├─ CONFIG_* / INVALID_CREDENTIALS → config
├─ OBJECT_NOT_FOUND → list/find to locate key
├─ ACCESS_DENIED + upload → try --no-acl
└─ Still failed → Report error/hint/details as is, do not modify credentials without permissionS3 is not fully configured, missing. Please complete it in theS3_SECRET_ACCESS_KEYfile at the project root (refer to.env), and I will verify it after saving..env-template
The storage does not support ACL. Has re-uploaded successfully using. Public URL: …--no-acl
The objectdoes not exist in the bucket. There are 3 files under currentassets/demo/missing.png: …assets/demo/
node --env-file-if-exists=.env .cursor/skills/s3-upload/scripts/s3-cli.js --help
node --env-file-if-exists=.env .cursor/skills/s3-upload/scripts/s3-cli.js confignode --env-file-if-exists=.env .cursor/skills/s3-upload/scripts/s3-cli.js upload ./local.png --prefix assets/demo/node --env-file-if-exists=.env .cursor/skills/s3-upload/scripts/s3-cli.js list --prefix uploads/ --max 50
node --env-file-if-exists=.env .cursor/skills/s3-upload/scripts/s3-cli.js find "photo" --prefix assets/
node --env-file-if-exists=.env .cursor/skills/s3-upload/scripts/s3-cli.js find "*.png" --prefix assets/node --env-file-if-exists=.env .cursor/skills/s3-upload/scripts/s3-cli.js download assets/demo/photo.png --output ./photo.png
node --env-file-if-exists=.env .cursor/skills/s3-upload/scripts/s3-cli.js url assets/demo/photo.png
node --env-file-if-exists=.env .cursor/skills/s3-upload/scripts/s3-cli.js delete assets/demo/old.png --yes| Variable | Required | Description |
|---|---|---|
| Yes | Storage bucket |
| Yes | Access Key |
| Yes | Secret Key |
| Yes | Service endpoint (e.g., |
| No | Defaults to |
| No | CDN domain name; |
| No | Provider identifier ( |
.envprocess.envnode --env-file-if-exists=.env.envS3_PROVIDER=aliyunS3_BUCKET_NAME=<bucket>
S3_ACCESS_KEY_ID=<RAM AccessKey ID>
S3_SECRET_ACCESS_KEY=<RAM AccessKey Secret>
S3_ENDPOINT=https://<bucket>.s3.oss-<region>.aliyuncs.com
S3_REGION=cn-hangzhou
S3_CDN=https://<your-cdn-domain>
S3_PROVIDER=aliyunhttps://<bucket>.s3.oss-cn-hangzhou.aliyuncs.comS3_BUCKET_NAMEhttps://s3.oss-cn-hangzhou.aliyuncs.comcn-hangzhou<your-region>aliyun--no-aclS3_CDNhttps://cdn.example.com/<objectKey>oss:PutObjectoss:GetObjectoss:ListObjectsoss:DeleteObject| Command | Purpose |
|---|---|
| Verify configuration, output credentials in desensitized format |
| Upload; options: |
| List by |
| Substring or wildcard ( |
| Check existence and metadata |
| Download; |
| Delete object |
| Output public URL |
--json-h--helpsrc/app-agent/lib/server/s3-storage.tss3-storage.tsnode --env-file-if-exists=.env .cursor/skills/s3-upload/scripts/s3-cli.js upload ./dist/bundle.zip --key releases/v1.2.0/bundle.zip --jsonpublicUrlnode --env-file-if-exists=.env .cursor/skills/s3-upload/scripts/s3-cli.js list --prefix static/_next/ --max 100 --jsonobjectKeyFromPublicUrlheadCONFIG_MISSINGmissing.env-templateconfigok: true{
"ok": false,
"code": "ACL_NOT_SUPPORTED",
"error": "Current storage does not support ACL field",
"hint": "Retry: upload <file> ... --no-acl",
"details": "…"
}S3_*.envS3_BUCKET_NAME--env-file