carlos / platform Public

docs: services --json and the secrets set stdin form (#1056)

The CLI reference says create and rotate take --json, that the secret
alone is 43 characters without CARLOS_SERVICE_TOKEN= in front, how to
pipe a value into secrets set with a lone -, and that a value starting
with its own key and = is refused. Copy not yet through a copy pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 98f65992222e437b877f3deba00c42030bc7da79 parent e1ee3f7
1 file changed, +22 −0
  • docs/site/cli.md +22 −0
diff --git a/docs/site/cli.md b/docs/site/cli.md
index c6d966605..20bb9b057 100644
--- a/docs/site/cli.md
+++ b/docs/site/cli.md
@@ -1065,6 +1065,19 @@ values.
carlos secrets set --app hello STRIPE_KEY=sk_live_example
```
+A lone `-` after a key reads that key's value from stdin, so it never appears
+in the command line, where other people on the same machine can see it. One
+trailing newline is dropped. Only one key per command can read stdin, and it
+must be a pipe or a file, not the terminal.
+
+```sh
+op read op://shop/stripe/key | carlos secrets set --app hello STRIPE_KEY -
+```
+
+A value that starts with its own key and `=`, such as
+`STRIPE_KEY=STRIPE_KEY=sk_live_example`, is refused: the variable name has
+been pasted into the value.
+
A write that reaches a route no pass delivers to says so ("this write did
not reach <host>"), with the two ways out: name the unit that runs the
process on the box, or opt the bundle into file delivery. A stamped route
@@ -2601,6 +2614,15 @@ The secret prints once, same as a fleet token, and the same distinction
applies at the other end: `rotate` refuses the credential's next call with
the old secret, `revoke` stops it whatever secret it holds.
+For a script, `create` and `rotate` take `--json` and print one JSON object
+and nothing else. The secret alone is in its `secret` field, 43 characters,
+without the `CARLOS_SERVICE_TOKEN=` the human output puts in front of it:
+
+```sh
+carlos services create --role publish --app hello --json ci-shipper \
+ | jq -r .secret | carlos secrets set --app hello CARLOS_SERVICE_TOKEN -
+```
+
### carlos add
Writes a route straight into a box's registry: this hostname, served by this