CLI: Bucket Management

Manage object storage buckets with the agentmetal bucket subcommand.

CLI: Bucket Management

Overview

The agentmetal bucket subcommand manages object storage buckets for storing unstructured data such as backups, assets, logs, and artifacts. Buckets provide S3-compatible object storage.

Operations

Create a Bucket

agentmetal bucket create --name my-assets --region fsn1
FlagRequiredDescription
--nameYesGlobally unique bucket name
--regionYesRegion for the bucket (e.g., fsn1, nbg1)
--versioningNoEnable object versioning (default: false)
--lifecycleNoLifecycle rule in format prefix:days (repeatable)
### List Buckets
agentmetal bucket list
ID            NAME          REGION   VERSIONING   STATE
bkt-a1b2c3    my-assets     fsn1     disabled     active
bkt-d4e5f6    backups       nbg1     enabled      active

Get Bucket Details

agentmetal bucket get bkt-a1b2c3

Delete a Bucket

agentmetal bucket delete bkt-a1b2c3

The bucket must be empty before deletion. Use --force to delete all objects first.

Examples

Create a bucket with versioning and lifecycle rules:

agentmetal bucket create \
  --name production-backups \
  --region fsn1 \
  --versioning \
  --lifecycle "logs/:30" \
  --lifecycle "tmp/:7"

This creates a bucket where objects under logs/ are deleted after 30 days and objects under tmp/ after 7 days.

BucketSpec Fields

FieldTypeDescription
regionstringStorage region identifier
versioningboolEnable version history for objects
lifecycle_rulesarrayList of lifecycle rules with prefix and expiration