Private Preview
This feature is in private preview: it's not ready for production use, and it may be briefly unavailable as we deploy updates. To get access, sign up here.
The buckets command manages branch object-storage buckets and their objects. Buckets belong to a branch; the object subcommands work with the objects inside a bucket.
neon buckets create
Creates a bucket on a branch.
neon bucket create <name> [options]Create a private bucket on a branch:
neon buckets create my-bucket --access-level privateneon buckets list
Lists the buckets on a branch.
neon bucket list [options]List the buckets on a branch with json output:
neon buckets list --output jsonneon buckets delete
Deletes a bucket from a branch.
neon bucket delete <name> [options]neon buckets delete my-bucketBucket objects
Lists, downloads, uploads, or deletes objects in a bucket.
neon buckets object list
Lists objects in a bucket.
neon bucket object list <bucket>[/<prefix>] [options]List the objects under a prefix, collapsing keys into folders:
neon buckets object list my-bucket/images --delimiter /neon buckets object get
Downloads an object from a bucket to a local file.
neon bucket object get <bucket>/<key> [options]neon buckets object get my-bucket/images/logo.png --file ./logo.pngneon buckets object put
Uploads a local file to a bucket as an object.
neon bucket object put <bucket>/<key> [options]Upload a file, optionally setting the Content-Type to store it with:
neon buckets object put my-bucket/images/logo.png --file ./logo.png
neon buckets object put my-bucket/notes/readme.txt --file ./readme.txt --content-type text/plainneon buckets object delete
Deletes an object, or every object under a prefix.
neon bucket object delete <bucket>/<key> [options]With --recursive, the target is treated as a prefix, which must end with /.
Delete a single object, or every object under a prefix:
neon buckets object delete my-bucket/images/logo.png
neon buckets object delete my-bucket/images/ --recursive







