carlos / platform Public

services: --json on create and rotate for scripts (#1056)

A script cut the secret out of the human output and kept the
CARLOS_SERVICE_TOKEN= in front of it; every call then answered 401.
With --json, create prints one object (name, account, app, role, rungs,
commands, scope, doors, secret) and rotate prints {name, account,
secret}, and nothing else goes to stdout: no "using" line and no human
text, following carlos email events --json. jq -r .secret gives the bare
secret. Lists are [] rather than null. The clireg golden lines for the
services usage and -h output carry the new flag.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev b280257a0bba9071cecc7e2f7df4790fe0eb4b52 parent 5b9f77a
3 files changed, +191 −17
  • services.go +73 −7
  • services_json_test.go +108 −0
  • testdata/clireg-golden.jsonl +10 −10
diff --git a/services.go b/services.go
index 4feba528f..04d48f987 100644
--- a/services.go
+++ b/services.go
@@ -16,6 +16,7 @@ package main
import (
"context"
+ "encoding/json"
"flag"
"fmt"
"log"
@@ -32,7 +33,7 @@ import (
const servicesUsage = `usage: carlos services <create|ls|rotate|revoke> [flags]
- create --role <publish|deploy|instance|operate|service|run|admin> [--app <app>] [--account <sqid|name>] <name>
+ create --role <publish|deploy|instance|operate|service|run|admin> [--app <app>] [--account <sqid|name>] [--json] <name>
mint a credential a SERVER holds, bound to this account —
not to you. Unlike your own CLI token, its reach is fixed
at mint: adding you to another account later does not widen
@@ -48,6 +49,9 @@ const servicesUsage = `usage: carlos services <create|ls|rotate|revoke> [flags]
--role run needs --app and --commands, the command
prefixes it may run: --commands "import classic,import sync".
Words are matched exactly, from the start of the command.
+ --json prints one JSON object and nothing else, the bare
+ secret in its "secret" field: carlos services create
+ ... --json name | jq -r .secret
ls [--account <sqid|name>]
list every LIVE credential the account owns — name, role,
@@ -55,12 +59,13 @@ const servicesUsage = `usage: carlos services <create|ls|rotate|revoke> [flags]
who minted it. A revoked credential does not appear; there
is no history view here.
- rotate [--account <sqid|name>] <name>
+ rotate [--account <sqid|name>] [--json] <name>
mint a FRESH secret for a credential that already exists,
printed exactly once. This refuses the credential's NEXT
call with the old secret. ROTATION IS NOT REVOCATION: it
does not stop work already in flight, and a credential that
- may be COMPROMISED needs revoke.
+ may be COMPROMISED needs revoke. --json prints one JSON
+ object, {"name", "account", "secret"}, and nothing else.
revoke [--account <sqid|name>] <name-or-id>
the hard stop rotate is not: the credential's next call
@@ -172,10 +177,11 @@ func runServicesCreate(args []string) {
acctRaw := fs.String("account", "", "account (sqid or name) to mint the credential in (default: your only account, or the configured/chosen one)")
acctIDRaw := fs.String("account-id", "", "account sqid, matched as a sqid ONLY — supersedes --account")
consoleFlag := consoleOption(fs, "console to create it through (default: the only logged-in one)")
+ asJSON := fs.Bool("json", false, "print the credential and its bare secret as one JSON object, for a script")
fs.Usage = flagUsage(fs, "")
fs.Parse(args)
const usageMsg = "usage: carlos services create --role <publish|deploy|instance|operate|service|run|team|admin> [--app <app>] " +
- "[--rungs <list>] [--commands <list>] [--scope <name>] [--account <sqid|name>] [--account-id <sqid>] [--console <origin>] <name>"
+ "[--rungs <list>] [--commands <list>] [--scope <name>] [--account <sqid|name>] [--account-id <sqid>] [--console <origin>] [--json] <name>"
if fs.NArg() != 1 || strings.TrimSpace(*role) == "" {
log.Fatal(usageMsg)
}
@@ -217,12 +223,22 @@ func runServicesCreate(args []string) {
}
sess := servicesSignedInSession(*consoleFlag)
- fmt.Fprintf(stdout, "using %s as %s\n", sess.console, sess.address)
+ if !*asJSON {
+ fmt.Fprintf(stdout, "using %s as %s\n", sess.console, sess.address)
+ }
acct := resolvedAccount(sess, acctRaw, acctIDRaw)
token, doors, gotRungs, gotCommands, gotScope, err := sess.createService(context.Background(), acct, name, roleV, appV, rungsV, commandsV, scopeV)
if err != nil {
log.Fatalf("services create: %v", err)
}
+ if *asJSON {
+ writeServiceJSON(serviceCreatedJSON{
+ Name: name, Account: acct.Seg, App: appV, Role: roleV,
+ Rungs: orEmpty(gotRungs), Commands: orEmpty(gotCommands), Scope: gotScope,
+ Doors: orEmpty(doors), Secret: token,
+ })
+ return
+ }
printServiceCreated(acct.Seg, name, roleV, appV, gotRungs, gotCommands, gotScope, token, doors)
}
@@ -267,6 +283,49 @@ func deliverLine(appHint string) string {
return "carlos secrets set --app " + app + " CARLOS_SERVICE_TOKEN=<secret>"
}
+// serviceCreatedJSON is `services create --json`: the credential as minted
+// and its bare secret, for a script (#1056: a script that cut the secret out
+// of the human text kept the CARLOS_SERVICE_TOKEN= in front of it, and every
+// call answered 401). Field names follow `services ls`'s wire shape; lists
+// are [] rather than null, and app is "" for an account-wide credential.
+type serviceCreatedJSON struct {
+ Name string `json:"name"`
+ Account string `json:"account"`
+ App string `json:"app"`
+ Role string `json:"role"`
+ Rungs []string `json:"rungs"`
+ Commands [][]string `json:"commands"`
+ Scope string `json:"scope"`
+ Doors []string `json:"doors"`
+ Secret string `json:"secret"`
+}
+
+// serviceRotatedJSON is `services rotate --json`. The rotate door answers
+// with the secret alone, so the name and account are what the caller gave.
+type serviceRotatedJSON struct {
+ Name string `json:"name"`
+ Account string `json:"account"`
+ Secret string `json:"secret"`
+}
+
+// writeServiceJSON prints v as the only thing on stdout, indented like
+// `carlos email events --json`. Nothing else is printed in this mode, not
+// even the "using" line: a script reads stdout whole. Marshalling strings
+// and string slices cannot fail.
+func writeServiceJSON(v any) {
+ enc := json.NewEncoder(stdout)
+ enc.SetIndent("", " ")
+ enc.Encode(v)
+}
+
+// orEmpty is s, or an empty slice for nil, so JSON says [] and not null.
+func orEmpty[T any](s []T) []T {
+ if s == nil {
+ return []T{}
+ }
+ return s
+}
+
// printServiceCreated is the ONE place a service credential's secret
// reaches stdout on create — printed exactly once, immediately, with the
// scope it was minted into stated in words (requirement: an app-scoped
@@ -391,11 +450,12 @@ func runServicesRotate(args []string) {
acctRaw := fs.String("account", "", "account (sqid or name) the credential belongs to (default: your only account, or the configured/chosen one)")
acctIDRaw := fs.String("account-id", "", "account sqid, matched as a sqid ONLY — supersedes --account")
consoleFlag := consoleOption(fs, "console to rotate through (default: the only logged-in one)")
+ asJSON := fs.Bool("json", false, "print the name, account and bare secret as one JSON object, for a script")
fs.Usage = flagUsage(fs, "")
fs.Parse(args)
if fs.NArg() != 1 {
log.Fatal("usage: carlos services rotate [--account <sqid|name>] [--account-id <sqid>] " +
- "[--console <origin>] <name>")
+ "[--console <origin>] [--json] <name>")
}
name := strings.TrimSpace(fs.Arg(0))
if err := validServiceName(name); err != nil {
@@ -403,12 +463,18 @@ func runServicesRotate(args []string) {
}
sess := servicesSignedInSession(*consoleFlag)
- fmt.Fprintf(stdout, "using %s as %s\n", sess.console, sess.address)
+ if !*asJSON {
+ fmt.Fprintf(stdout, "using %s as %s\n", sess.console, sess.address)
+ }
acct := resolvedAccount(sess, acctRaw, acctIDRaw)
token, err := sess.rotateService(context.Background(), acct, name)
if err != nil {
log.Fatalf("services rotate: %v", err)
}
+ if *asJSON {
+ writeServiceJSON(serviceRotatedJSON{Name: name, Account: acct.Seg, Secret: token})
+ return
+ }
printServiceRotated(acct.Seg, name, token)
}
diff --git a/services_json_test.go b/services_json_test.go
new file mode 100644
index 000000000..0e1163168
--- /dev/null
+++ b/services_json_test.go
@@ -0,0 +1,108 @@
+// Tests for `carlos services create|rotate --json` (#1056): a script that
+// extracted the whole `CARLOS_SERVICE_TOKEN=<secret>` line from the human
+// output and stored it as the app's secret made every call answer 401.
+// --json hands a script one object with the bare secret, and nothing else
+// on stdout.
+package main
+
+import (
+ "encoding/json"
+ "errors"
+ "io"
+ "strings"
+ "testing"
+)
+
+// decodeOnlyObject decodes out as exactly one JSON object and fails if
+// anything but whitespace follows it: --json's stdout is for a parser.
+func decodeOnlyObject(t *testing.T, out string, v any) {
+ t.Helper()
+ dec := json.NewDecoder(strings.NewReader(out))
+ dec.DisallowUnknownFields()
+ if err := dec.Decode(v); err != nil {
+ t.Fatalf("stdout is not one JSON object of the expected shape: %v\n%s", err, out)
+ }
+ var extra json.RawMessage
+ if err := dec.Decode(&extra); !errors.Is(err, io.EOF) {
+ t.Fatalf("stdout carries more than one JSON value (next: %s, err %v):\n%s", extra, err, out)
+ }
+}
+
+func TestServicesCreateJSONIsOneObjectWithTheBareSecret(t *testing.T) {
+ servicesCLIFixture(t)
+ buf := captureStdout(t)
+
+ RunServices([]string{"create", "-role", "publish", "-app", "titogo", "-account", "bab", "--json", "amadan-hub"})
+
+ out := buf.String()
+ var got struct {
+ Name string `json:"name"`
+ Account string `json:"account"`
+ App string `json:"app"`
+ Role string `json:"role"`
+ Rungs []string `json:"rungs"`
+ Commands [][]string `json:"commands"`
+ Scope string `json:"scope"`
+ Doors []string `json:"doors"`
+ Secret string `json:"secret"`
+ }
+ decodeOnlyObject(t, out, &got)
+ if got.Name != "amadan-hub" || got.Account != "bab" || got.App != "titogo" || got.Role != "publish" {
+ t.Fatalf("object = %+v", got)
+ }
+ if got.Secret != tokenFor(1) {
+ t.Fatalf("secret = %q, want the bare %q", got.Secret, tokenFor(1))
+ }
+ if got.Rungs == nil || got.Commands == nil {
+ t.Fatalf("rungs/commands must be [] rather than null for a script: %s", out)
+ }
+ if len(got.Doors) != 3 {
+ t.Fatalf("doors = %v, want the console's three", got.Doors)
+ }
+ if n := strings.Count(out, tokenFor(1)); n != 1 {
+ t.Fatalf("secret appeared %d times, want exactly 1:\n%s", n, out)
+ }
+ for _, prose := range []string{"CARLOS_SERVICE_TOKEN", "using ", "shown once", "deliver it"} {
+ if strings.Contains(out, prose) {
+ t.Fatalf("--json stdout carries the human text %q:\n%s", prose, out)
+ }
+ }
+}
+
+func TestServicesCreateJSONAccountWideHasAnEmptyApp(t *testing.T) {
+ servicesCLIFixture(t)
+ buf := captureStdout(t)
+
+ RunServices([]string{"create", "-role", "publish", "-account", "bab", "-json", "amadan-hub"})
+
+ var got map[string]any
+ if err := json.Unmarshal(buf.Bytes(), &got); err != nil {
+ t.Fatalf("not JSON: %v\n%s", err, buf)
+ }
+ if app, ok := got["app"]; !ok || app != "" {
+ t.Fatalf("app = %v (present %v), want \"\" for an account-wide credential", app, ok)
+ }
+}
+
+func TestServicesRotateJSONIsOneObjectWithTheBareSecret(t *testing.T) {
+ servicesCLIFixture(t)
+ buf := captureStdout(t)
+
+ RunServices([]string{"rotate", "-account", "bab", "--json", "amadan-hub"})
+
+ out := buf.String()
+ var got struct {
+ Name string `json:"name"`
+ Account string `json:"account"`
+ Secret string `json:"secret"`
+ }
+ decodeOnlyObject(t, out, &got)
+ if got.Name != "amadan-hub" || got.Account != "bab" || got.Secret != tokenFor(1) {
+ t.Fatalf("object = %+v", got)
+ }
+ for _, prose := range []string{"CARLOS_SERVICE_TOKEN", "using ", "ROTATION", "deliver it"} {
+ if strings.Contains(out, prose) {
+ t.Fatalf("--json stdout carries the human text %q:\n%s", prose, out)
+ }
+ }
+}
diff --git a/testdata/clireg-golden.jsonl b/testdata/clireg-golden.jsonl
index 37f8bf388..35b651163 100644
--- a/testdata/clireg-golden.jsonl
+++ b/testdata/clireg-golden.jsonl
@@ -681,20 +681,20 @@
{"case":"secrets | bare","argv":["secrets"],"exit":1,"stdout":"","stderr":"usage: carlos secrets <command>\n\ncommands:\n set --app <a> [--environment <name>] KEY=value [KEY2=value2 ...] seal and set one or more secrets\n unset --app <a> [--environment <name>] KEY [KEY2 ...] remove secrets\n list --app <a> [--environment <name>] list a secret's key names only — never values\n genkey mint a CARLOS_SECRETS_KEY/PUBKEY pair\n fingerprint [--file <path>] print the fingerprint of the key in a host.env, never the key\n\n--environment names a bundle at apps/<acct>/<app>/environments/<name>.json —\nsee \"carlos env\" for the full explanation; the same bundle backs both env\nvars and secrets, sealed or not. \"carlos env environments --app <a>\" lists\nan app's bundle names.\n\nset/unset/list also work through a logged-in console (carlos auth login)\nwhen CARLOS_DEPLOYMENT_BUCKET/CARLOS_DEPLOYMENT_DIR are unset —\n[--console <origin>] picks which logged-in console when more than one is\nconfigured; the store env vars win outright when set (direct-bucket mode,\nunchanged). In that mode \"secrets set\" seals with CARLOS_SECRETS_PUBKEY if\nit's set in this terminal's own environment, otherwise the console's own\nserved public key (Config.SecretsPub) if it has one — CARLOS_SECRETS_KEY\n(the PRIVATE half) never leaves the box holding it either way.\ngenkey and fingerprint are always local, in both modes.\nfor an app placed on a fleet the console serves the fleet's own key, so leave\nCARLOS_SECRETS_PUBKEY unset. register that key with \"carlos fleets secrets-key\".\n"}
{"case":"secrets | help","argv":["secrets","help"],"exit":1,"stdout":"","stderr":"usage: carlos secrets <command>\n\ncommands:\n set --app <a> [--environment <name>] KEY=value [KEY2=value2 ...] seal and set one or more secrets\n unset --app <a> [--environment <name>] KEY [KEY2 ...] remove secrets\n list --app <a> [--environment <name>] list a secret's key names only — never values\n genkey mint a CARLOS_SECRETS_KEY/PUBKEY pair\n fingerprint [--file <path>] print the fingerprint of the key in a host.env, never the key\n\n--environment names a bundle at apps/<acct>/<app>/environments/<name>.json —\nsee \"carlos env\" for the full explanation; the same bundle backs both env\nvars and secrets, sealed or not. \"carlos env environments --app <a>\" lists\nan app's bundle names.\n\nset/unset/list also work through a logged-in console (carlos auth login)\nwhen CARLOS_DEPLOYMENT_BUCKET/CARLOS_DEPLOYMENT_DIR are unset —\n[--console <origin>] picks which logged-in console when more than one is\nconfigured; the store env vars win outright when set (direct-bucket mode,\nunchanged). In that mode \"secrets set\" seals with CARLOS_SECRETS_PUBKEY if\nit's set in this terminal's own environment, otherwise the console's own\nserved public key (Config.SecretsPub) if it has one — CARLOS_SECRETS_KEY\n(the PRIVATE half) never leaves the box holding it either way.\ngenkey and fingerprint are always local, in both modes.\nfor an app placed on a fleet the console serves the fleet's own key, so leave\nCARLOS_SECRETS_PUBKEY unset. register that key with \"carlos fleets secrets-key\".\n"}
{"case":"secrets | zz-unknown","argv":["secrets","zz-unknown"],"exit":1,"stdout":"","stderr":"usage: carlos secrets <command>\n\ncommands:\n set --app <a> [--environment <name>] KEY=value [KEY2=value2 ...] seal and set one or more secrets\n unset --app <a> [--environment <name>] KEY [KEY2 ...] remove secrets\n list --app <a> [--environment <name>] list a secret's key names only — never values\n genkey mint a CARLOS_SECRETS_KEY/PUBKEY pair\n fingerprint [--file <path>] print the fingerprint of the key in a host.env, never the key\n\n--environment names a bundle at apps/<acct>/<app>/environments/<name>.json —\nsee \"carlos env\" for the full explanation; the same bundle backs both env\nvars and secrets, sealed or not. \"carlos env environments --app <a>\" lists\nan app's bundle names.\n\nset/unset/list also work through a logged-in console (carlos auth login)\nwhen CARLOS_DEPLOYMENT_BUCKET/CARLOS_DEPLOYMENT_DIR are unset —\n[--console <origin>] picks which logged-in console when more than one is\nconfigured; the store env vars win outright when set (direct-bucket mode,\nunchanged). In that mode \"secrets set\" seals with CARLOS_SECRETS_PUBKEY if\nit's set in this terminal's own environment, otherwise the console's own\nserved public key (Config.SecretsPub) if it has one — CARLOS_SECRETS_KEY\n(the PRIVATE half) never leaves the box holding it either way.\ngenkey and fingerprint are always local, in both modes.\nfor an app placed on a fleet the console serves the fleet's own key, so leave\nCARLOS_SECRETS_PUBKEY unset. register that key with \"carlos fleets secrets-key\".\n"}
-{"case":"services create | --zz-unknown-flag","argv":["services","create","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos services create [flags]\nflags:\n --account <string> account (sqid or name) to mint the credential in (default: your only account, or the configured/chosen one)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account\n --app, -a <string> bind the credential to one app (default: account-wide)\n --commands <string> command prefixes a run credential may run, comma-separated, words space-separated: \"import classic,import sync\" (required with --role run)\n --console <string> console to create it through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n --role <string> role: publish, deploy, instance, operate, service, run, team or admin (required)\n --rungs <string> rungs a deploy credential may move, comma-separated: canary, edge, beta (required with --role deploy)\n --scope <string> scope name a team credential holds: the environments it owns (required with --role team, with --app)\n"}
-{"case":"services create | -h","argv":["services","create","-h"],"exit":0,"stdout":"","stderr":"usage: carlos services create [flags]\nflags:\n --account <string> account (sqid or name) to mint the credential in (default: your only account, or the configured/chosen one)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account\n --app, -a <string> bind the credential to one app (default: account-wide)\n --commands <string> command prefixes a run credential may run, comma-separated, words space-separated: \"import classic,import sync\" (required with --role run)\n --console <string> console to create it through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n --role <string> role: publish, deploy, instance, operate, service, run, team or admin (required)\n --rungs <string> rungs a deploy credential may move, comma-separated: canary, edge, beta (required with --role deploy)\n --scope <string> scope name a team credential holds: the environments it owns (required with --role team, with --app)\n"}
+{"case":"services create | --zz-unknown-flag","argv":["services","create","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos services create [flags]\nflags:\n --account <string> account (sqid or name) to mint the credential in (default: your only account, or the configured/chosen one)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account\n --app, -a <string> bind the credential to one app (default: account-wide)\n --commands <string> command prefixes a run credential may run, comma-separated, words space-separated: \"import classic,import sync\" (required with --role run)\n --console <string> console to create it through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n --json print the credential and its bare secret as one JSON object, for a script\n --role <string> role: publish, deploy, instance, operate, service, run, team or admin (required)\n --rungs <string> rungs a deploy credential may move, comma-separated: canary, edge, beta (required with --role deploy)\n --scope <string> scope name a team credential holds: the environments it owns (required with --role team, with --app)\n"}
+{"case":"services create | -h","argv":["services","create","-h"],"exit":0,"stdout":"","stderr":"usage: carlos services create [flags]\nflags:\n --account <string> account (sqid or name) to mint the credential in (default: your only account, or the configured/chosen one)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account\n --app, -a <string> bind the credential to one app (default: account-wide)\n --commands <string> command prefixes a run credential may run, comma-separated, words space-separated: \"import classic,import sync\" (required with --role run)\n --console <string> console to create it through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n --json print the credential and its bare secret as one JSON object, for a script\n --role <string> role: publish, deploy, instance, operate, service, run, team or admin (required)\n --rungs <string> rungs a deploy credential may move, comma-separated: canary, edge, beta (required with --role deploy)\n --scope <string> scope name a team credential holds: the environments it owns (required with --role team, with --app)\n"}
{"case":"services ls | --zz-unknown-flag","argv":["services","ls","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos services ls [flags]\nflags:\n --account <string> account (sqid or name) to list credentials for (default: your only account, or the configured/chosen one)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account\n --console <string> console to list through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n"}
{"case":"services ls | -h","argv":["services","ls","-h"],"exit":0,"stdout":"","stderr":"usage: carlos services ls [flags]\nflags:\n --account <string> account (sqid or name) to list credentials for (default: your only account, or the configured/chosen one)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account\n --console <string> console to list through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n"}
{"case":"services revoke | --zz-unknown-flag","argv":["services","revoke","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos services revoke [flags]\nflags:\n --account <string> account (sqid or name) the credential belongs to (default: your only account, or the configured/chosen one)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account\n --console <string> console to revoke through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n"}
{"case":"services revoke | -h","argv":["services","revoke","-h"],"exit":0,"stdout":"","stderr":"usage: carlos services revoke [flags]\nflags:\n --account <string> account (sqid or name) the credential belongs to (default: your only account, or the configured/chosen one)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account\n --console <string> console to revoke through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n"}
-{"case":"services rotate | --zz-unknown-flag","argv":["services","rotate","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos services rotate [flags]\nflags:\n --account <string> account (sqid or name) the credential belongs to (default: your only account, or the configured/chosen one)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account\n --console <string> console to rotate through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n"}
-{"case":"services rotate | -h","argv":["services","rotate","-h"],"exit":0,"stdout":"","stderr":"usage: carlos services rotate [flags]\nflags:\n --account <string> account (sqid or name) the credential belongs to (default: your only account, or the configured/chosen one)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account\n --console <string> console to rotate through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n"}
-{"case":"services | --help","argv":["services","--help"],"exit":1,"stdout":"","stderr":"usage: carlos services <create|ls|rotate|revoke> [flags]\n\n create --role <publish|deploy|instance|operate|service|run|admin> [--app <app>] [--account <sqid|name>] <name>\n mint a credential a SERVER holds, bound to this account —\n not to you. Unlike your own CLI token, its reach is fixed\n at mint: adding you to another account later does not widen\n it, and it draws on its own rate-limit budgets rather than\n yours.\n THE SECRET IS PRINTED EXACTLY ONCE, HERE. Only its hash is\n stored, so losing this output means rotate, not a re-run.\n --role admin INCLUDES `store grant`, which mints a\n path-scoped IAM user. It is a real handover, not a\n convenience bundle. Prefer the narrowest role that works.\n --app binds it to ONE app, which also means it cannot create\n apps. Omit --app for an account-scoped credential.\n --role run needs --app and --commands, the command\n prefixes it may run: --commands \"import classic,import sync\".\n Words are matched exactly, from the start of the command.\n\n ls [--account <sqid|name>]\n list every LIVE credential the account owns — name, role,\n scope, when it was minted and last rotated and used, and\n who minted it. A revoked credential does not appear; there\n is no history view here.\n\n rotate [--account <sqid|name>] <name>\n mint a FRESH secret for a credential that already exists,\n printed exactly once. This refuses the credential's NEXT\n call with the old secret. ROTATION IS NOT REVOCATION: it\n does not stop work already in flight, and a credential that\n may be COMPROMISED needs revoke.\n\n revoke [--account <sqid|name>] <name-or-id>\n the hard stop rotate is not: the credential's next call\n fails, whatever secret it holds. Idempotent — revoking a\n name twice, or one that never existed, answers the same.\n Takes a credential's name, or the listing id `ls` shows\n (the only handle a nameless legacy credential has).\n\n --account <sqid|name> account the credential belongs to (default: your only\n account, or the configured/chosen one) —\n resolved by the console against your own\n memberships.\n --account-id <sqid> account sqid, matched as a sqid ONLY — supersedes\n --account\n --console <origin> which logged-in console to use (only needed with\n several)\n\nEvery verb here is signed-in only (carlos auth login), owner-only, and\nclosed to a service credential itself — no service credential can create,\nrotate or revoke any credential, not even itself, not even an admin one.\nService credentials are console-tracked state with no bucket-direct fallback.\n"}
-{"case":"services | --zz-unknown-flag","argv":["services","--zz-unknown-flag"],"exit":1,"stdout":"","stderr":"usage: carlos services <create|ls|rotate|revoke> [flags]\n\n create --role <publish|deploy|instance|operate|service|run|admin> [--app <app>] [--account <sqid|name>] <name>\n mint a credential a SERVER holds, bound to this account —\n not to you. Unlike your own CLI token, its reach is fixed\n at mint: adding you to another account later does not widen\n it, and it draws on its own rate-limit budgets rather than\n yours.\n THE SECRET IS PRINTED EXACTLY ONCE, HERE. Only its hash is\n stored, so losing this output means rotate, not a re-run.\n --role admin INCLUDES `store grant`, which mints a\n path-scoped IAM user. It is a real handover, not a\n convenience bundle. Prefer the narrowest role that works.\n --app binds it to ONE app, which also means it cannot create\n apps. Omit --app for an account-scoped credential.\n --role run needs --app and --commands, the command\n prefixes it may run: --commands \"import classic,import sync\".\n Words are matched exactly, from the start of the command.\n\n ls [--account <sqid|name>]\n list every LIVE credential the account owns — name, role,\n scope, when it was minted and last rotated and used, and\n who minted it. A revoked credential does not appear; there\n is no history view here.\n\n rotate [--account <sqid|name>] <name>\n mint a FRESH secret for a credential that already exists,\n printed exactly once. This refuses the credential's NEXT\n call with the old secret. ROTATION IS NOT REVOCATION: it\n does not stop work already in flight, and a credential that\n may be COMPROMISED needs revoke.\n\n revoke [--account <sqid|name>] <name-or-id>\n the hard stop rotate is not: the credential's next call\n fails, whatever secret it holds. Idempotent — revoking a\n name twice, or one that never existed, answers the same.\n Takes a credential's name, or the listing id `ls` shows\n (the only handle a nameless legacy credential has).\n\n --account <sqid|name> account the credential belongs to (default: your only\n account, or the configured/chosen one) —\n resolved by the console against your own\n memberships.\n --account-id <sqid> account sqid, matched as a sqid ONLY — supersedes\n --account\n --console <origin> which logged-in console to use (only needed with\n several)\n\nEvery verb here is signed-in only (carlos auth login), owner-only, and\nclosed to a service credential itself — no service credential can create,\nrotate or revoke any credential, not even itself, not even an admin one.\nService credentials are console-tracked state with no bucket-direct fallback.\n"}
-{"case":"services | -h","argv":["services","-h"],"exit":1,"stdout":"","stderr":"usage: carlos services <create|ls|rotate|revoke> [flags]\n\n create --role <publish|deploy|instance|operate|service|run|admin> [--app <app>] [--account <sqid|name>] <name>\n mint a credential a SERVER holds, bound to this account —\n not to you. Unlike your own CLI token, its reach is fixed\n at mint: adding you to another account later does not widen\n it, and it draws on its own rate-limit budgets rather than\n yours.\n THE SECRET IS PRINTED EXACTLY ONCE, HERE. Only its hash is\n stored, so losing this output means rotate, not a re-run.\n --role admin INCLUDES `store grant`, which mints a\n path-scoped IAM user. It is a real handover, not a\n convenience bundle. Prefer the narrowest role that works.\n --app binds it to ONE app, which also means it cannot create\n apps. Omit --app for an account-scoped credential.\n --role run needs --app and --commands, the command\n prefixes it may run: --commands \"import classic,import sync\".\n Words are matched exactly, from the start of the command.\n\n ls [--account <sqid|name>]\n list every LIVE credential the account owns — name, role,\n scope, when it was minted and last rotated and used, and\n who minted it. A revoked credential does not appear; there\n is no history view here.\n\n rotate [--account <sqid|name>] <name>\n mint a FRESH secret for a credential that already exists,\n printed exactly once. This refuses the credential's NEXT\n call with the old secret. ROTATION IS NOT REVOCATION: it\n does not stop work already in flight, and a credential that\n may be COMPROMISED needs revoke.\n\n revoke [--account <sqid|name>] <name-or-id>\n the hard stop rotate is not: the credential's next call\n fails, whatever secret it holds. Idempotent — revoking a\n name twice, or one that never existed, answers the same.\n Takes a credential's name, or the listing id `ls` shows\n (the only handle a nameless legacy credential has).\n\n --account <sqid|name> account the credential belongs to (default: your only\n account, or the configured/chosen one) —\n resolved by the console against your own\n memberships.\n --account-id <sqid> account sqid, matched as a sqid ONLY — supersedes\n --account\n --console <origin> which logged-in console to use (only needed with\n several)\n\nEvery verb here is signed-in only (carlos auth login), owner-only, and\nclosed to a service credential itself — no service credential can create,\nrotate or revoke any credential, not even itself, not even an admin one.\nService credentials are console-tracked state with no bucket-direct fallback.\n"}
-{"case":"services | bare","argv":["services"],"exit":1,"stdout":"","stderr":"usage: carlos services <create|ls|rotate|revoke> [flags]\n\n create --role <publish|deploy|instance|operate|service|run|admin> [--app <app>] [--account <sqid|name>] <name>\n mint a credential a SERVER holds, bound to this account —\n not to you. Unlike your own CLI token, its reach is fixed\n at mint: adding you to another account later does not widen\n it, and it draws on its own rate-limit budgets rather than\n yours.\n THE SECRET IS PRINTED EXACTLY ONCE, HERE. Only its hash is\n stored, so losing this output means rotate, not a re-run.\n --role admin INCLUDES `store grant`, which mints a\n path-scoped IAM user. It is a real handover, not a\n convenience bundle. Prefer the narrowest role that works.\n --app binds it to ONE app, which also means it cannot create\n apps. Omit --app for an account-scoped credential.\n --role run needs --app and --commands, the command\n prefixes it may run: --commands \"import classic,import sync\".\n Words are matched exactly, from the start of the command.\n\n ls [--account <sqid|name>]\n list every LIVE credential the account owns — name, role,\n scope, when it was minted and last rotated and used, and\n who minted it. A revoked credential does not appear; there\n is no history view here.\n\n rotate [--account <sqid|name>] <name>\n mint a FRESH secret for a credential that already exists,\n printed exactly once. This refuses the credential's NEXT\n call with the old secret. ROTATION IS NOT REVOCATION: it\n does not stop work already in flight, and a credential that\n may be COMPROMISED needs revoke.\n\n revoke [--account <sqid|name>] <name-or-id>\n the hard stop rotate is not: the credential's next call\n fails, whatever secret it holds. Idempotent — revoking a\n name twice, or one that never existed, answers the same.\n Takes a credential's name, or the listing id `ls` shows\n (the only handle a nameless legacy credential has).\n\n --account <sqid|name> account the credential belongs to (default: your only\n account, or the configured/chosen one) —\n resolved by the console against your own\n memberships.\n --account-id <sqid> account sqid, matched as a sqid ONLY — supersedes\n --account\n --console <origin> which logged-in console to use (only needed with\n several)\n\nEvery verb here is signed-in only (carlos auth login), owner-only, and\nclosed to a service credential itself — no service credential can create,\nrotate or revoke any credential, not even itself, not even an admin one.\nService credentials are console-tracked state with no bucket-direct fallback.\n"}
-{"case":"services | help","argv":["services","help"],"exit":1,"stdout":"","stderr":"usage: carlos services <create|ls|rotate|revoke> [flags]\n\n create --role <publish|deploy|instance|operate|service|run|admin> [--app <app>] [--account <sqid|name>] <name>\n mint a credential a SERVER holds, bound to this account —\n not to you. Unlike your own CLI token, its reach is fixed\n at mint: adding you to another account later does not widen\n it, and it draws on its own rate-limit budgets rather than\n yours.\n THE SECRET IS PRINTED EXACTLY ONCE, HERE. Only its hash is\n stored, so losing this output means rotate, not a re-run.\n --role admin INCLUDES `store grant`, which mints a\n path-scoped IAM user. It is a real handover, not a\n convenience bundle. Prefer the narrowest role that works.\n --app binds it to ONE app, which also means it cannot create\n apps. Omit --app for an account-scoped credential.\n --role run needs --app and --commands, the command\n prefixes it may run: --commands \"import classic,import sync\".\n Words are matched exactly, from the start of the command.\n\n ls [--account <sqid|name>]\n list every LIVE credential the account owns — name, role,\n scope, when it was minted and last rotated and used, and\n who minted it. A revoked credential does not appear; there\n is no history view here.\n\n rotate [--account <sqid|name>] <name>\n mint a FRESH secret for a credential that already exists,\n printed exactly once. This refuses the credential's NEXT\n call with the old secret. ROTATION IS NOT REVOCATION: it\n does not stop work already in flight, and a credential that\n may be COMPROMISED needs revoke.\n\n revoke [--account <sqid|name>] <name-or-id>\n the hard stop rotate is not: the credential's next call\n fails, whatever secret it holds. Idempotent — revoking a\n name twice, or one that never existed, answers the same.\n Takes a credential's name, or the listing id `ls` shows\n (the only handle a nameless legacy credential has).\n\n --account <sqid|name> account the credential belongs to (default: your only\n account, or the configured/chosen one) —\n resolved by the console against your own\n memberships.\n --account-id <sqid> account sqid, matched as a sqid ONLY — supersedes\n --account\n --console <origin> which logged-in console to use (only needed with\n several)\n\nEvery verb here is signed-in only (carlos auth login), owner-only, and\nclosed to a service credential itself — no service credential can create,\nrotate or revoke any credential, not even itself, not even an admin one.\nService credentials are console-tracked state with no bucket-direct fallback.\n"}
-{"case":"services | zz-unknown","argv":["services","zz-unknown"],"exit":1,"stdout":"","stderr":"usage: carlos services <create|ls|rotate|revoke> [flags]\n\n create --role <publish|deploy|instance|operate|service|run|admin> [--app <app>] [--account <sqid|name>] <name>\n mint a credential a SERVER holds, bound to this account —\n not to you. Unlike your own CLI token, its reach is fixed\n at mint: adding you to another account later does not widen\n it, and it draws on its own rate-limit budgets rather than\n yours.\n THE SECRET IS PRINTED EXACTLY ONCE, HERE. Only its hash is\n stored, so losing this output means rotate, not a re-run.\n --role admin INCLUDES `store grant`, which mints a\n path-scoped IAM user. It is a real handover, not a\n convenience bundle. Prefer the narrowest role that works.\n --app binds it to ONE app, which also means it cannot create\n apps. Omit --app for an account-scoped credential.\n --role run needs --app and --commands, the command\n prefixes it may run: --commands \"import classic,import sync\".\n Words are matched exactly, from the start of the command.\n\n ls [--account <sqid|name>]\n list every LIVE credential the account owns — name, role,\n scope, when it was minted and last rotated and used, and\n who minted it. A revoked credential does not appear; there\n is no history view here.\n\n rotate [--account <sqid|name>] <name>\n mint a FRESH secret for a credential that already exists,\n printed exactly once. This refuses the credential's NEXT\n call with the old secret. ROTATION IS NOT REVOCATION: it\n does not stop work already in flight, and a credential that\n may be COMPROMISED needs revoke.\n\n revoke [--account <sqid|name>] <name-or-id>\n the hard stop rotate is not: the credential's next call\n fails, whatever secret it holds. Idempotent — revoking a\n name twice, or one that never existed, answers the same.\n Takes a credential's name, or the listing id `ls` shows\n (the only handle a nameless legacy credential has).\n\n --account <sqid|name> account the credential belongs to (default: your only\n account, or the configured/chosen one) —\n resolved by the console against your own\n memberships.\n --account-id <sqid> account sqid, matched as a sqid ONLY — supersedes\n --account\n --console <origin> which logged-in console to use (only needed with\n several)\n\nEvery verb here is signed-in only (carlos auth login), owner-only, and\nclosed to a service credential itself — no service credential can create,\nrotate or revoke any credential, not even itself, not even an admin one.\nService credentials are console-tracked state with no bucket-direct fallback.\n"}
+{"case":"services rotate | --zz-unknown-flag","argv":["services","rotate","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos services rotate [flags]\nflags:\n --account <string> account (sqid or name) the credential belongs to (default: your only account, or the configured/chosen one)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account\n --console <string> console to rotate through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n --json print the name, account and bare secret as one JSON object, for a script\n"}
+{"case":"services rotate | -h","argv":["services","rotate","-h"],"exit":0,"stdout":"","stderr":"usage: carlos services rotate [flags]\nflags:\n --account <string> account (sqid or name) the credential belongs to (default: your only account, or the configured/chosen one)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account\n --console <string> console to rotate through (default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n --json print the name, account and bare secret as one JSON object, for a script\n"}
+{"case":"services | --help","argv":["services","--help"],"exit":1,"stdout":"","stderr":"usage: carlos services <create|ls|rotate|revoke> [flags]\n\n create --role <publish|deploy|instance|operate|service|run|admin> [--app <app>] [--account <sqid|name>] [--json] <name>\n mint a credential a SERVER holds, bound to this account —\n not to you. Unlike your own CLI token, its reach is fixed\n at mint: adding you to another account later does not widen\n it, and it draws on its own rate-limit budgets rather than\n yours.\n THE SECRET IS PRINTED EXACTLY ONCE, HERE. Only its hash is\n stored, so losing this output means rotate, not a re-run.\n --role admin INCLUDES `store grant`, which mints a\n path-scoped IAM user. It is a real handover, not a\n convenience bundle. Prefer the narrowest role that works.\n --app binds it to ONE app, which also means it cannot create\n apps. Omit --app for an account-scoped credential.\n --role run needs --app and --commands, the command\n prefixes it may run: --commands \"import classic,import sync\".\n Words are matched exactly, from the start of the command.\n --json prints one JSON object and nothing else, the bare\n secret in its \"secret\" field: carlos services create\n ... --json name | jq -r .secret\n\n ls [--account <sqid|name>]\n list every LIVE credential the account owns — name, role,\n scope, when it was minted and last rotated and used, and\n who minted it. A revoked credential does not appear; there\n is no history view here.\n\n rotate [--account <sqid|name>] [--json] <name>\n mint a FRESH secret for a credential that already exists,\n printed exactly once. This refuses the credential's NEXT\n call with the old secret. ROTATION IS NOT REVOCATION: it\n does not stop work already in flight, and a credential that\n may be COMPROMISED needs revoke. --json prints one JSON\n object, {\"name\", \"account\", \"secret\"}, and nothing else.\n\n revoke [--account <sqid|name>] <name-or-id>\n the hard stop rotate is not: the credential's next call\n fails, whatever secret it holds. Idempotent — revoking a\n name twice, or one that never existed, answers the same.\n Takes a credential's name, or the listing id `ls` shows\n (the only handle a nameless legacy credential has).\n\n --account <sqid|name> account the credential belongs to (default: your only\n account, or the configured/chosen one) —\n resolved by the console against your own\n memberships.\n --account-id <sqid> account sqid, matched as a sqid ONLY — supersedes\n --account\n --console <origin> which logged-in console to use (only needed with\n several)\n\nEvery verb here is signed-in only (carlos auth login), owner-only, and\nclosed to a service credential itself — no service credential can create,\nrotate or revoke any credential, not even itself, not even an admin one.\nService credentials are console-tracked state with no bucket-direct fallback.\n"}
+{"case":"services | --zz-unknown-flag","argv":["services","--zz-unknown-flag"],"exit":1,"stdout":"","stderr":"usage: carlos services <create|ls|rotate|revoke> [flags]\n\n create --role <publish|deploy|instance|operate|service|run|admin> [--app <app>] [--account <sqid|name>] [--json] <name>\n mint a credential a SERVER holds, bound to this account —\n not to you. Unlike your own CLI token, its reach is fixed\n at mint: adding you to another account later does not widen\n it, and it draws on its own rate-limit budgets rather than\n yours.\n THE SECRET IS PRINTED EXACTLY ONCE, HERE. Only its hash is\n stored, so losing this output means rotate, not a re-run.\n --role admin INCLUDES `store grant`, which mints a\n path-scoped IAM user. It is a real handover, not a\n convenience bundle. Prefer the narrowest role that works.\n --app binds it to ONE app, which also means it cannot create\n apps. Omit --app for an account-scoped credential.\n --role run needs --app and --commands, the command\n prefixes it may run: --commands \"import classic,import sync\".\n Words are matched exactly, from the start of the command.\n --json prints one JSON object and nothing else, the bare\n secret in its \"secret\" field: carlos services create\n ... --json name | jq -r .secret\n\n ls [--account <sqid|name>]\n list every LIVE credential the account owns — name, role,\n scope, when it was minted and last rotated and used, and\n who minted it. A revoked credential does not appear; there\n is no history view here.\n\n rotate [--account <sqid|name>] [--json] <name>\n mint a FRESH secret for a credential that already exists,\n printed exactly once. This refuses the credential's NEXT\n call with the old secret. ROTATION IS NOT REVOCATION: it\n does not stop work already in flight, and a credential that\n may be COMPROMISED needs revoke. --json prints one JSON\n object, {\"name\", \"account\", \"secret\"}, and nothing else.\n\n revoke [--account <sqid|name>] <name-or-id>\n the hard stop rotate is not: the credential's next call\n fails, whatever secret it holds. Idempotent — revoking a\n name twice, or one that never existed, answers the same.\n Takes a credential's name, or the listing id `ls` shows\n (the only handle a nameless legacy credential has).\n\n --account <sqid|name> account the credential belongs to (default: your only\n account, or the configured/chosen one) —\n resolved by the console against your own\n memberships.\n --account-id <sqid> account sqid, matched as a sqid ONLY — supersedes\n --account\n --console <origin> which logged-in console to use (only needed with\n several)\n\nEvery verb here is signed-in only (carlos auth login), owner-only, and\nclosed to a service credential itself — no service credential can create,\nrotate or revoke any credential, not even itself, not even an admin one.\nService credentials are console-tracked state with no bucket-direct fallback.\n"}
+{"case":"services | -h","argv":["services","-h"],"exit":1,"stdout":"","stderr":"usage: carlos services <create|ls|rotate|revoke> [flags]\n\n create --role <publish|deploy|instance|operate|service|run|admin> [--app <app>] [--account <sqid|name>] [--json] <name>\n mint a credential a SERVER holds, bound to this account —\n not to you. Unlike your own CLI token, its reach is fixed\n at mint: adding you to another account later does not widen\n it, and it draws on its own rate-limit budgets rather than\n yours.\n THE SECRET IS PRINTED EXACTLY ONCE, HERE. Only its hash is\n stored, so losing this output means rotate, not a re-run.\n --role admin INCLUDES `store grant`, which mints a\n path-scoped IAM user. It is a real handover, not a\n convenience bundle. Prefer the narrowest role that works.\n --app binds it to ONE app, which also means it cannot create\n apps. Omit --app for an account-scoped credential.\n --role run needs --app and --commands, the command\n prefixes it may run: --commands \"import classic,import sync\".\n Words are matched exactly, from the start of the command.\n --json prints one JSON object and nothing else, the bare\n secret in its \"secret\" field: carlos services create\n ... --json name | jq -r .secret\n\n ls [--account <sqid|name>]\n list every LIVE credential the account owns — name, role,\n scope, when it was minted and last rotated and used, and\n who minted it. A revoked credential does not appear; there\n is no history view here.\n\n rotate [--account <sqid|name>] [--json] <name>\n mint a FRESH secret for a credential that already exists,\n printed exactly once. This refuses the credential's NEXT\n call with the old secret. ROTATION IS NOT REVOCATION: it\n does not stop work already in flight, and a credential that\n may be COMPROMISED needs revoke. --json prints one JSON\n object, {\"name\", \"account\", \"secret\"}, and nothing else.\n\n revoke [--account <sqid|name>] <name-or-id>\n the hard stop rotate is not: the credential's next call\n fails, whatever secret it holds. Idempotent — revoking a\n name twice, or one that never existed, answers the same.\n Takes a credential's name, or the listing id `ls` shows\n (the only handle a nameless legacy credential has).\n\n --account <sqid|name> account the credential belongs to (default: your only\n account, or the configured/chosen one) —\n resolved by the console against your own\n memberships.\n --account-id <sqid> account sqid, matched as a sqid ONLY — supersedes\n --account\n --console <origin> which logged-in console to use (only needed with\n several)\n\nEvery verb here is signed-in only (carlos auth login), owner-only, and\nclosed to a service credential itself — no service credential can create,\nrotate or revoke any credential, not even itself, not even an admin one.\nService credentials are console-tracked state with no bucket-direct fallback.\n"}
+{"case":"services | bare","argv":["services"],"exit":1,"stdout":"","stderr":"usage: carlos services <create|ls|rotate|revoke> [flags]\n\n create --role <publish|deploy|instance|operate|service|run|admin> [--app <app>] [--account <sqid|name>] [--json] <name>\n mint a credential a SERVER holds, bound to this account —\n not to you. Unlike your own CLI token, its reach is fixed\n at mint: adding you to another account later does not widen\n it, and it draws on its own rate-limit budgets rather than\n yours.\n THE SECRET IS PRINTED EXACTLY ONCE, HERE. Only its hash is\n stored, so losing this output means rotate, not a re-run.\n --role admin INCLUDES `store grant`, which mints a\n path-scoped IAM user. It is a real handover, not a\n convenience bundle. Prefer the narrowest role that works.\n --app binds it to ONE app, which also means it cannot create\n apps. Omit --app for an account-scoped credential.\n --role run needs --app and --commands, the command\n prefixes it may run: --commands \"import classic,import sync\".\n Words are matched exactly, from the start of the command.\n --json prints one JSON object and nothing else, the bare\n secret in its \"secret\" field: carlos services create\n ... --json name | jq -r .secret\n\n ls [--account <sqid|name>]\n list every LIVE credential the account owns — name, role,\n scope, when it was minted and last rotated and used, and\n who minted it. A revoked credential does not appear; there\n is no history view here.\n\n rotate [--account <sqid|name>] [--json] <name>\n mint a FRESH secret for a credential that already exists,\n printed exactly once. This refuses the credential's NEXT\n call with the old secret. ROTATION IS NOT REVOCATION: it\n does not stop work already in flight, and a credential that\n may be COMPROMISED needs revoke. --json prints one JSON\n object, {\"name\", \"account\", \"secret\"}, and nothing else.\n\n revoke [--account <sqid|name>] <name-or-id>\n the hard stop rotate is not: the credential's next call\n fails, whatever secret it holds. Idempotent — revoking a\n name twice, or one that never existed, answers the same.\n Takes a credential's name, or the listing id `ls` shows\n (the only handle a nameless legacy credential has).\n\n --account <sqid|name> account the credential belongs to (default: your only\n account, or the configured/chosen one) —\n resolved by the console against your own\n memberships.\n --account-id <sqid> account sqid, matched as a sqid ONLY — supersedes\n --account\n --console <origin> which logged-in console to use (only needed with\n several)\n\nEvery verb here is signed-in only (carlos auth login), owner-only, and\nclosed to a service credential itself — no service credential can create,\nrotate or revoke any credential, not even itself, not even an admin one.\nService credentials are console-tracked state with no bucket-direct fallback.\n"}
+{"case":"services | help","argv":["services","help"],"exit":1,"stdout":"","stderr":"usage: carlos services <create|ls|rotate|revoke> [flags]\n\n create --role <publish|deploy|instance|operate|service|run|admin> [--app <app>] [--account <sqid|name>] [--json] <name>\n mint a credential a SERVER holds, bound to this account —\n not to you. Unlike your own CLI token, its reach is fixed\n at mint: adding you to another account later does not widen\n it, and it draws on its own rate-limit budgets rather than\n yours.\n THE SECRET IS PRINTED EXACTLY ONCE, HERE. Only its hash is\n stored, so losing this output means rotate, not a re-run.\n --role admin INCLUDES `store grant`, which mints a\n path-scoped IAM user. It is a real handover, not a\n convenience bundle. Prefer the narrowest role that works.\n --app binds it to ONE app, which also means it cannot create\n apps. Omit --app for an account-scoped credential.\n --role run needs --app and --commands, the command\n prefixes it may run: --commands \"import classic,import sync\".\n Words are matched exactly, from the start of the command.\n --json prints one JSON object and nothing else, the bare\n secret in its \"secret\" field: carlos services create\n ... --json name | jq -r .secret\n\n ls [--account <sqid|name>]\n list every LIVE credential the account owns — name, role,\n scope, when it was minted and last rotated and used, and\n who minted it. A revoked credential does not appear; there\n is no history view here.\n\n rotate [--account <sqid|name>] [--json] <name>\n mint a FRESH secret for a credential that already exists,\n printed exactly once. This refuses the credential's NEXT\n call with the old secret. ROTATION IS NOT REVOCATION: it\n does not stop work already in flight, and a credential that\n may be COMPROMISED needs revoke. --json prints one JSON\n object, {\"name\", \"account\", \"secret\"}, and nothing else.\n\n revoke [--account <sqid|name>] <name-or-id>\n the hard stop rotate is not: the credential's next call\n fails, whatever secret it holds. Idempotent — revoking a\n name twice, or one that never existed, answers the same.\n Takes a credential's name, or the listing id `ls` shows\n (the only handle a nameless legacy credential has).\n\n --account <sqid|name> account the credential belongs to (default: your only\n account, or the configured/chosen one) —\n resolved by the console against your own\n memberships.\n --account-id <sqid> account sqid, matched as a sqid ONLY — supersedes\n --account\n --console <origin> which logged-in console to use (only needed with\n several)\n\nEvery verb here is signed-in only (carlos auth login), owner-only, and\nclosed to a service credential itself — no service credential can create,\nrotate or revoke any credential, not even itself, not even an admin one.\nService credentials are console-tracked state with no bucket-direct fallback.\n"}
+{"case":"services | zz-unknown","argv":["services","zz-unknown"],"exit":1,"stdout":"","stderr":"usage: carlos services <create|ls|rotate|revoke> [flags]\n\n create --role <publish|deploy|instance|operate|service|run|admin> [--app <app>] [--account <sqid|name>] [--json] <name>\n mint a credential a SERVER holds, bound to this account —\n not to you. Unlike your own CLI token, its reach is fixed\n at mint: adding you to another account later does not widen\n it, and it draws on its own rate-limit budgets rather than\n yours.\n THE SECRET IS PRINTED EXACTLY ONCE, HERE. Only its hash is\n stored, so losing this output means rotate, not a re-run.\n --role admin INCLUDES `store grant`, which mints a\n path-scoped IAM user. It is a real handover, not a\n convenience bundle. Prefer the narrowest role that works.\n --app binds it to ONE app, which also means it cannot create\n apps. Omit --app for an account-scoped credential.\n --role run needs --app and --commands, the command\n prefixes it may run: --commands \"import classic,import sync\".\n Words are matched exactly, from the start of the command.\n --json prints one JSON object and nothing else, the bare\n secret in its \"secret\" field: carlos services create\n ... --json name | jq -r .secret\n\n ls [--account <sqid|name>]\n list every LIVE credential the account owns — name, role,\n scope, when it was minted and last rotated and used, and\n who minted it. A revoked credential does not appear; there\n is no history view here.\n\n rotate [--account <sqid|name>] [--json] <name>\n mint a FRESH secret for a credential that already exists,\n printed exactly once. This refuses the credential's NEXT\n call with the old secret. ROTATION IS NOT REVOCATION: it\n does not stop work already in flight, and a credential that\n may be COMPROMISED needs revoke. --json prints one JSON\n object, {\"name\", \"account\", \"secret\"}, and nothing else.\n\n revoke [--account <sqid|name>] <name-or-id>\n the hard stop rotate is not: the credential's next call\n fails, whatever secret it holds. Idempotent — revoking a\n name twice, or one that never existed, answers the same.\n Takes a credential's name, or the listing id `ls` shows\n (the only handle a nameless legacy credential has).\n\n --account <sqid|name> account the credential belongs to (default: your only\n account, or the configured/chosen one) —\n resolved by the console against your own\n memberships.\n --account-id <sqid> account sqid, matched as a sqid ONLY — supersedes\n --account\n --console <origin> which logged-in console to use (only needed with\n several)\n\nEvery verb here is signed-in only (carlos auth login), owner-only, and\nclosed to a service credential itself — no service credential can create,\nrotate or revoke any credential, not even itself, not even an admin one.\nService credentials are console-tracked state with no bucket-direct fallback.\n"}
{"case":"ship | --zz-unknown-flag","argv":["ship","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos ship [flags]\nflags:\n --account <string> account (sqid or name) the app belongs to (default: your only account, or the configured/chosen one; ops in direct mode)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account; this is the flag an ambiguity error tells you to use\n --app, -a <string> app name\n --assets <value> a folder your build writes files to, for example /assets/. repeat the flag for up to 8 folders. servers near your visitors may keep copies of the files in them\n --capabilities <string> path to a JSON capability block (internal/caps) to embed in the manifest\n --check run the rootfs image here with Docker or Podman, the way a box would, and ship nothing\n --console <string> console origin to ship through (API mode only; default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n --env <value> with --check, give every process a variable as KEY=VALUE, such as a placeholder secret. repeat it for more than one\n --hibernate let this rootfs app hibernate when idle. rootfs apps are always on unless their first release opts in\n --jit let this rootfs release's processes run a JIT compiler, as Node, Bun, Deno, the JVM and Ruby's YJIT need. without it a box never lets memory be writable and executable at once\n --kind <string> binary | static (default: binary)\n --label <string> one-line human label for this release (\"fixing modals\")\n --message <string> Add a short note describing this change (shown alongside the recorded action).\n --no-prompt Skip the optional change description prompt.\n --notes <string> changelog fragment for this release\n --notes-file <string> file holding the changelog fragment (mutually exclusive with --notes)\n --processes <string> JSON file holding the rootfs release's processes: web, any workers, release and console\n --program-change accept that this release's Go main package differs from the app's previous release (recorded in the manifest)\n --registry <string> registry database (resolves --account) (default: $DIR/data/registry.db)\n --rootfs <string> an OCI image (a layout directory, a docker save archive or a local image name) or a directory, shipped as a rootfs release\n --stateless this release keeps no local database. CARLOS_DB, SQLite, restore and Litestream are off\n --swap <string> hold: this release stops each instance before starting it, for a migration the previous build cannot share the database with\n --target <string> GOOS-GOARCH the binary was built for (binary kind, single file) (default: linux-arm64)\n --version, -v <string> version (git short sha); omit to mint the next iteration under the app's version target\n"}
{"case":"ship | -h","argv":["ship","-h"],"exit":0,"stdout":"","stderr":"usage: carlos ship [flags]\nflags:\n --account <string> account (sqid or name) the app belongs to (default: your only account, or the configured/chosen one; ops in direct mode)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account; this is the flag an ambiguity error tells you to use\n --app, -a <string> app name\n --assets <value> a folder your build writes files to, for example /assets/. repeat the flag for up to 8 folders. servers near your visitors may keep copies of the files in them\n --capabilities <string> path to a JSON capability block (internal/caps) to embed in the manifest\n --check run the rootfs image here with Docker or Podman, the way a box would, and ship nothing\n --console <string> console origin to ship through (API mode only; default: the only logged-in one)\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n --env <value> with --check, give every process a variable as KEY=VALUE, such as a placeholder secret. repeat it for more than one\n --hibernate let this rootfs app hibernate when idle. rootfs apps are always on unless their first release opts in\n --jit let this rootfs release's processes run a JIT compiler, as Node, Bun, Deno, the JVM and Ruby's YJIT need. without it a box never lets memory be writable and executable at once\n --kind <string> binary | static (default: binary)\n --label <string> one-line human label for this release (\"fixing modals\")\n --message <string> Add a short note describing this change (shown alongside the recorded action).\n --no-prompt Skip the optional change description prompt.\n --notes <string> changelog fragment for this release\n --notes-file <string> file holding the changelog fragment (mutually exclusive with --notes)\n --processes <string> JSON file holding the rootfs release's processes: web, any workers, release and console\n --program-change accept that this release's Go main package differs from the app's previous release (recorded in the manifest)\n --registry <string> registry database (resolves --account) (default: $DIR/data/registry.db)\n --rootfs <string> an OCI image (a layout directory, a docker save archive or a local image name) or a directory, shipped as a rootfs release\n --stateless this release keeps no local database. CARLOS_DB, SQLite, restore and Litestream are off\n --swap <string> hold: this release stops each instance before starting it, for a migration the previous build cannot share the database with\n --target <string> GOOS-GOARCH the binary was built for (binary kind, single file) (default: linux-arm64)\n --version, -v <string> version (git short sha); omit to mint the next iteration under the app's version target\n"}
{"case":"sidecars create | --zz-unknown-flag","argv":["sidecars","create","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nUsage of sidecars create:\n -account string\n \taccount (sqid or name) the app belongs to (default: your only account, or the configured/chosen one)\n -account-id string\n \taccount sqid, matched as a sqid ONLY — supersedes -account\n -app string\n \tapp the sidecar belongs to\n -channel string\n \trelease channel the sidecar follows (default: the manifest's, then stable)\n -console string\n \tconsole to create through (default: the only logged-in one)\n -d value\n \talias for --destination\n -destination name\n \tuse the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n -region string\n \tregion code for the record (subject to the manifest's allow-list, or the app's own placement)\n"}