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
| Flag | Required | Description |
|---|---|---|
--name | Yes | Globally unique bucket name |
--region | Yes | Region for the bucket (e.g., fsn1, nbg1) |
--versioning | No | Enable object versioning (default: false) |
--lifecycle | No | Lifecycle rule in format prefix:days (repeatable) |
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
| Field | Type | Description |
|---|---|---|
region | string | Storage region identifier |
versioning | bool | Enable version history for objects |
lifecycle_rules | array | List of lifecycle rules with prefix and expiration |