From dfe109c90394bc6dcacc6048961958d432b3569b Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 7 Apr 2026 15:00:38 -0700 Subject: [PATCH] docs: update shell examples to show JSON output format --- weed-shell.md | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/weed-shell.md b/weed-shell.md index 9580ddf..c4947b5 100644 --- a/weed-shell.md +++ b/weed-shell.md @@ -243,22 +243,17 @@ The shell provides a set of composable commands for managing S3 users, policies, ``` > s3.policy -put -name=photos-rw -file=photos-policy.json > s3.user.create -name alice -Created user "alice" -Access Key: AKID... -Secret Key: ... - +{"name":"alice","access_key":"AKID..."} > s3.policy.attach -policy photos-rw -user alice -Attached policy "photos-rw" to user "alice" +{"policy":"photos-rw","user":"alice"} ``` +The secret key is printed to stderr only (not in the JSON output). + Or use the one-step convenience command: ``` > s3.user.provision -name alice -bucket photos -role readwrite -Created policy "photos-alice-readwrite" -Created user "alice" with policy "photos-alice-readwrite" attached - -Access Key: AKID... -Secret Key: ... +{"name":"alice","access_key":"AKID...","policy":"photos-alice-readwrite"} ``` Roles: `readonly`, `readwrite`, `admin`. The bucket must be a literal name (no wildcards).