Managing Buckets
Buckets are the top-level containers in g7. Each bucket holds objects identified by string keys. Buckets are scoped to your account — two users can both have a bucket named uploads without conflict.
Create a bucket
ribo bucket create <name>
Bucket names must be lowercase alphanumeric with optional hyphens. A bucket with the same name already existing is not an error — create is idempotent.
ribo bucket create avatars
ribo bucket create raw-uploads
ribo bucket create processed-images
List buckets
ribo bucket list
avatars
raw-uploads
processed-images
List objects in a bucket
ribo bucket ls <name>
List the objects stored in a bucket with their sizes.
ribo bucket ls avatars
portraits/alice.jpg 24601
portraits/bob.png 38912
thumbnails/alice.jpg 4096
Delete a bucket
ribo bucket drop <name>
This removes the bucket and all objects inside it. This is irreversible.
ribo bucket drop old-uploads
Binding a bucket to a Cell
Once a bucket exists, declare it in ribo.toml:
[[bindings]]
type = "g7"
binding = "AVATARS"
bucket = "avatars"
The binding name becomes a property on env inside the Cell (env.AVATARS). See the g7 API Reference for how to use it.
Automatic bucket creation for FILES bindings
When you use a files binding, ribo automatically creates a dedicated bucket during ribo deploy. You do not need to create it manually:
[[bindings]]
type = "files"
binding = "ASSETS"
dir = "./public"
ribo creates a bucket named after your Cell's address and the binding name, then uploads the directory contents. The bucket is owned by your account and persists across redeploys.