Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

docs(init): show the supported thin-client flags in help and INSTALL (#5800, #5816)

garrytanae55ca62ed75
diff --git a/docs/INSTALL.md b/docs/INSTALL.md
index b10bb50806..c9d21e1ce9 100644
--- a/docs/INSTALL.md
+++ b/docs/INSTALL.md
@@ -179,6 +179,8 @@ Connect to someone else's brain without running a local engine:
```bash
gbrain init --mcp-only # configures remote MCP, skips local DB
+# requires: --issuer-url --mcp-url --oauth-client-id --oauth-client-secret
+# (or GBRAIN_REMOTE_ISSUER_URL / GBRAIN_REMOTE_MCP_URL / ... env vars)
```
Useful for: team mounts, brain-as-a-service deployments, dev machines without disk space. Most local commands refuse with a paste-ready hint. See [`docs/architecture/topologies.md`](architecture/topologies.md).
diff --git a/src/commands/init.ts b/src/commands/init.ts
index 63e1add154..f835e31770 100644
--- a/src/commands/init.ts
+++ b/src/commands/init.ts
@@ -1917,7 +1917,7 @@ EXAMPLES
gbrain init --pglite # Local-only, no API keys
gbrain init --supabase # Interactive Supabase setup
gbrain init --url postgresql://... # Use a custom Postgres
- gbrain init --mcp-only --url https://... # Thin-client mode
+ gbrain init --mcp-only --issuer-url https://host:3001 --mcp-url https://host:3001/mcp --oauth-client-id <id> --oauth-client-secret <secret> # Thin-client mode
NOTES
- Bare \`gbrain init\` always defaults to PGLite at ~/.gbrain/brain.pglite.
diff --git a/test/cli.test.ts b/test/cli.test.ts
index 95488c0d0d..e24009009a 100644
--- a/test/cli.test.ts
+++ b/test/cli.test.ts
@@ -285,6 +285,11 @@ describe('CLI dispatch integration', () => {
expect(stdout).toContain('ENGINE SELECTION');
// ...and confirm the generic stub (printCliOnlyHelp) did NOT fire.
expect(stdout).not.toContain('run gbrain --help for the full command list');
+ // #5800: the thin-client example must name the flags initRemoteMcp
+ // actually reads (--issuer-url/--mcp-url/oauth), not `--url`, which it
+ // ignores while requiring --issuer-url.
+ expect(stdout).toContain('--mcp-only --issuer-url');
+ expect(stdout).not.toContain('--mcp-only --url');
expect(existsSync(join(home, '.gbrain', 'config.json'))).toBe(false);
expect(exitCode).toBe(0);
} finally {