@gobi-ai/cli 0.9.13 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -5,7 +5,8 @@ import { ApiError, GobiError } from "./errors.js";
5
5
  import { registerAuthCommand } from "./commands/auth.js";
6
6
  import { registerInitCommand, printContext } from "./commands/init.js";
7
7
  import { registerSpaceCommand } from "./commands/space.js";
8
- import { registerBrainCommand } from "./commands/brain.js";
8
+ import { registerGlobalCommand } from "./commands/global.js";
9
+ import { registerVaultCommand } from "./commands/vault.js";
9
10
  import { registerSessionsCommand } from "./commands/sessions.js";
10
11
  import { registerSenseCommand } from "./commands/sense.js";
11
12
  import { registerSyncCommand } from "./commands/sync.js";
@@ -32,7 +33,8 @@ export async function cli() {
32
33
  registerAuthCommand(program);
33
34
  registerInitCommand(program);
34
35
  registerSpaceCommand(program);
35
- registerBrainCommand(program);
36
+ registerGlobalCommand(program);
37
+ registerVaultCommand(program);
36
38
  registerSessionsCommand(program);
37
39
  registerSenseCommand(program);
38
40
  registerSyncCommand(program);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobi-ai/cli",
3
- "version": "0.9.13",
3
+ "version": "1.1.0",
4
4
  "description": "CLI client for the Gobi collaborative knowledge platform",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -38,9 +38,8 @@ brew tap gobi-ai/tap && brew install gobi
38
38
 
39
39
  ## Key Concepts
40
40
 
41
- - **Space**: A shared space for a group or community. A logged-in user can be a member of one or more spaces. A space contains threads, sessions, brain updates, and connected vaults.
42
- - **Vault**: A filetree storage of information and knowledge. A local directory becomes a vault when it contains `.gobi/settings.yaml` with a vault slug and a space slug. Each vault is identified by a slug (e.g. `brave-path-zr962w`).
43
- - **Brain**: Another name for a vault when referring to its AI-searchable knowledge. You can search brains, ask them questions, and publish a `BRAIN.md` document to configure your vault's brain.
41
+ - **Space**: A shared space for a group or community. A logged-in user can be a member of one or more spaces. A space contains threads, sessions, and connected vaults.
42
+ - **Vault**: A personal knowledge container — a filetree storage of information and knowledge that can also be searched and asked questions like a knowledge base. A local directory becomes a vault when it contains `.gobi/settings.yaml` with a vault slug and a space slug. Each vault is identified by a slug (e.g. `brave-path-zr962w`). Publish a `PUBLISH.md` document at the vault root to configure the vault's public profile and AI agent.
44
43
 
45
44
  ## First-Time Setup
46
45
 
@@ -56,7 +55,7 @@ This is an **interactive** command that:
56
55
  1. Logs in automatically if not already authenticated (opens a browser URL for Google OAuth)
57
56
  2. Prompts the user to select an existing vault or create a new one
58
57
  3. Writes `.gobi/settings.yaml` in the current directory with the chosen vault slug
59
- 4. Creates a `BRAIN.md` file if one doesn't exist
58
+ 4. Creates a `PUBLISH.md` file if one doesn't exist
60
59
 
61
60
  ### Step 2: Select a Space
62
61
 
@@ -128,7 +127,7 @@ JSON responses have the shape `{ "success": true, "data": ... }` on success or `
128
127
  |------|-------------|
129
128
  | `~/.gobi/credentials.json` | Stored authentication tokens (auto-managed) |
130
129
  | `.gobi/settings.yaml` | Per-project vault and space configuration |
131
- | `BRAIN.md` | Brain document with YAML frontmatter, published via `gobi brain publish` |
130
+ | `PUBLISH.md` | Vault profile document with YAML frontmatter, published via `gobi vault publish` |
132
131
 
133
132
  ## Environment Variables
134
133
 
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  Usage: gobi space [options] [command]
5
5
 
6
- Space commands (threads, replies).
6
+ Space commands. A Space is a shared room of members where they post threads and replies, organized by topics.
7
7
 
8
8
  Options:
9
9
  --space-slug <slug> Space slug (overrides .gobi/settings.yaml)
@@ -11,9 +11,12 @@ Options:
11
11
 
12
12
  Commands:
13
13
  list List spaces you are a member of.
14
+ get [spaceSlug] Get details for a space. Pass a slug or omit to use the current space (from .gobi/settings.yaml or --space-slug).
14
15
  warp [spaceSlug] Select the active space. Pass a slug to warp directly, or omit for interactive selection.
15
16
  list-topics [options] List topics in a space, ordered by most recent content linkage.
16
17
  list-topic-threads [options] <topicSlug> List threads tagged with a topic in a space (cursor-paginated).
18
+ messages [options] List the unified message feed (threads and replies, newest first) in a space.
19
+ ancestors <threadId> Show the ancestor lineage of a thread or reply (root → immediate parent).
17
20
  get-thread [options] <threadId> Get a thread and its replies (paginated).
18
21
  list-threads [options] List threads in a space (paginated).
19
22
  create-thread [options] Create a thread in a space.
@@ -8,7 +8,7 @@ description: >-
8
8
 
9
9
  # Gobi Homepage Developer Guide
10
10
 
11
- A **Gobi Homepage** is a custom HTML page hosted on a vault's webdrive and served as its public homepage at `https://gobispace.com/@{vaultSlug}`. Gobi injects a `window.gobi` bridge before any scripts run, giving the homepage access to vault data, files, brain updates, and chat.
11
+ A **Gobi Homepage** is a custom HTML page hosted on a vault's webdrive and served as its public homepage at `https://gobispace.com/@{vaultSlug}`. Gobi injects a `window.gobi` bridge before any scripts run, giving the homepage access to vault data, files, and chat.
12
12
 
13
13
  > **Sandbox:** The homepage runs in a sandboxed iframe with `origin: null`. Direct `fetch()` / `XMLHttpRequest` calls are blocked by CORS. All data access must go through `window.gobi.*`.
14
14
 
@@ -20,7 +20,7 @@ A **Gobi Homepage** is a custom HTML page hosted on a vault's webdrive and serve
20
20
  ```bash
21
21
  gobi sync
22
22
  ```
23
- 2. Set `homepage` in BRAIN.md (homepage property):
23
+ 2. Set `homepage` in PUBLISH.md (homepage property):
24
24
  - `homepage: "[[app/home.html]]"` — Gobi sidebars visible alongside the homepage
25
25
  - `homepage: "[[app/home.html?nav=false]]"` — full-screen, no Gobi chrome
26
26
 
@@ -67,31 +67,6 @@ function getFileUrl(path) {
67
67
  }
68
68
  ```
69
69
 
70
- ### Brain Updates
71
-
72
- ```js
73
- const { data: updates, pagination } = await gobi.listBrainUpdates({ limit: 10, cursor: null });
74
- // updates[i] → {
75
- // id: 42,
76
- // title: 'New insights',
77
- // content: '## ...', // markdown — MAY contain ![[file|width]] wiki image embeds
78
- // topics: [{ id: 3, name: 'AI', slug: 'ai' }],
79
- // createdAt: '2025-03-01T12:00:00Z'
80
- // }
81
- // pagination → { hasMore: true, nextCursor: 'abc...' }
82
-
83
- // ⚠️ Always call resolveWikiImages() on content before rendering — see Rendering Markdown below.
84
- for (const u of updates) {
85
- el.innerHTML += marked.parse(resolveWikiImages(u.content));
86
- }
87
-
88
- // Pagination — load the next page using the cursor
89
- if (pagination.hasMore) {
90
- const { data: moreUpdates, pagination: nextPage } =
91
- await gobi.listBrainUpdates({ limit: 10, cursor: pagination.nextCursor });
92
- }
93
- ```
94
-
95
70
  ### Chat (login required)
96
71
 
97
72
  `getSessions`, `loadMessages`, and `sendMessage` require the visitor to be logged in. `getSessions` returns an empty array when not logged in — **but also when logged in with no prior sessions**. Don't use it as a definitive auth check.
@@ -119,7 +94,7 @@ const { messages, hasMore, nextCursor } = await gobi.loadMessages('sess_abc', {
119
94
  // sendMessage(sessionId, text, options, onDelta) → Promise<{ content }>
120
95
  //
121
96
  // options.context tells the AI what the user is looking at:
122
- // { brainUpdateId?: number, brainUpdateTitle?: string, filePath?: string }
97
+ // { filePath?: string }
123
98
 
124
99
  let reply = '';
125
100
  await gobi.sendMessage(sessionId, 'Hello', (delta) => {
@@ -128,10 +103,6 @@ await gobi.sendMessage(sessionId, 'Hello', (delta) => {
128
103
  });
129
104
 
130
105
  // With context
131
- await gobi.sendMessage(sessionId, 'Tell me more', {
132
- context: { brainUpdateId: 42, brainUpdateTitle: 'New insights' }
133
- }, (delta) => { reply += delta; renderReply(reply); });
134
-
135
106
  await gobi.sendMessage(sessionId, 'Explain this', {
136
107
  context: { filePath: 'notes/research.md' }
137
108
  }, (delta) => { reply += delta; renderReply(reply); });
@@ -144,7 +115,7 @@ sessionId = crypto.randomUUID();
144
115
 
145
116
  ## Rendering Markdown
146
117
 
147
- Brain update `content` and any markdown read via `readFile` may contain Obsidian-style wiki embeds (`![[path|width]]`). Resolve them before passing to a renderer.
118
+ Markdown read via `readFile` may contain Obsidian-style wiki embeds (`![[path|width]]`). Resolve them before passing to a renderer.
148
119
 
149
120
  The examples below use [marked](https://cdn.jsdelivr.net/npm/marked/marked.min.js) — include it in your `<head>`:
150
121
 
@@ -162,7 +133,7 @@ function resolveWikiImages(md) {
162
133
  });
163
134
  }
164
135
 
165
- const html = marked.parse(resolveWikiImages(update.content));
136
+ const html = marked.parse(resolveWikiImages(text));
166
137
  ```
167
138
 
168
139
  **Open links in a new tab.** The homepage runs in a sandboxed iframe — clicking a rendered link replaces the iframe with the external page. Override the renderer so every `<a>` opens in a new tab:
@@ -175,7 +146,7 @@ renderer.link = (href, title, text) =>
175
146
  marked.setOptions({ renderer });
176
147
  ```
177
148
 
178
- **Plain-text previews.** For BU list cards, render a truncated preview with `escapeHtml(content.substring(0, 200))` — don't run markdown on a random substring, it produces broken HTML. Use `marked.parse(resolveWikiImages(content))` only for the full expanded view. Same for chat: `marked.parse(content)` for assistant messages, `escapeHtml(content)` for human messages.
149
+ **Plain-text previews.** For preview cards, render a truncated preview with `escapeHtml(content.substring(0, 200))` — don't run markdown on a random substring, it produces broken HTML. Use `marked.parse(resolveWikiImages(content))` only for the full expanded view. Same for chat: `marked.parse(content)` for assistant messages, `escapeHtml(content)` for human messages.
179
150
 
180
151
  ---
181
152
 
@@ -202,58 +173,9 @@ Centralize colors and spacing in CSS custom properties so restyling is a one-lin
202
173
 
203
174
  Pair with Google Fonts (e.g. Space Grotesk for headings, IBM Plex Mono for meta, Inter for body) via CDN `<link>`.
204
175
 
205
- ### Knowledge Graph from BU topics
206
-
207
- Brain updates carry a `topics` array. Treat each topic as a node and any two topics co-occurring in the same BU as an edge — you get a force-directed graph of the vault's themes for free. Use [d3](https://cdn.jsdelivr.net/npm/d3@7/dist/d3.min.js).
208
-
209
- ```js
210
- // Separate data-building from rendering so the same graph can be drawn at multiple sizes.
211
- function buildGraphData(updates) {
212
- const counts = new Map(); // name → frequency
213
- const edges = new Map(); // "a|b" → weight
214
- for (const u of updates) {
215
- const names = (u.topics || []).map(t => t.name);
216
- for (const n of names) counts.set(n, (counts.get(n) || 0) + 1);
217
- for (let i = 0; i < names.length; i++)
218
- for (let j = i + 1; j < names.length; j++) {
219
- const key = [names[i], names[j]].sort().join('|');
220
- edges.set(key, (edges.get(key) || 0) + 1);
221
- }
222
- }
223
- // Top 20 by frequency, then drop orphans (nodes with no surviving edges).
224
- const top = [...counts.entries()].sort((a, b) => b[1] - a[1]).slice(0, 20).map(([n]) => n);
225
- const keep = new Set(top);
226
- const links = [...edges].flatMap(([k, w]) => {
227
- const [a, b] = k.split('|');
228
- return keep.has(a) && keep.has(b) ? [{ source: a, target: b, weight: w }] : [];
229
- });
230
- const connected = new Set(links.flatMap(l => [l.source, l.target]));
231
- const nodes = top.filter(n => connected.has(n)).map(n => ({ id: n, count: counts.get(n) }));
232
- return { nodes, links };
233
- }
234
-
235
- function drawGraph(containerId, w, h, data, opts = {}) {
236
- const { nodeRange = [4, 16], fontSize = '9px', distance = 60, charge = -80 } = opts;
237
- const max = Math.max(...data.nodes.map(n => n.count), 1);
238
- const r = d3.scaleSqrt().domain([1, max]).range(nodeRange);
239
- const svg = d3.select('#' + containerId).append('svg').attr('width', w).attr('height', h);
240
- // ... standard d3.forceSimulation with link/charge/center, then clamp in tick:
241
- // node.attr('cx', d => d.x = Math.max(20, Math.min(w - 20, d.x)))
242
- // node.attr('cy', d => d.y = Math.max(20, Math.min(h - 20, d.y)))
243
- // Node fill: accent with opacity 0.3 + 0.7 * (count/max).
244
- // Call d3.drag() on nodes so visitors can rearrange the graph.
245
- }
246
- ```
247
-
248
- Tips:
249
- - **Enrich the data.** One page of 8 BUs makes a sparse graph. Paginate 3–4 times (cap at ~32 BUs) before building.
250
- - **Cache the built data** in a module-level variable so the full-screen overlay can reuse it without refetching.
251
- - **Mini vs full presets.** Pass different `opts` — e.g. mini `{nodeRange:[4,16], fontSize:'9px', distance:60, charge:-80}`, full `{nodeRange:[8,32], fontSize:'12px', distance:120, charge:-200}`.
252
- - Run a **separate simulation** for the full-scale instance — copy the nodes/links rather than sharing references, otherwise both graphs fight over the same positions.
253
-
254
176
  ### Full-screen overlay
255
177
 
256
- Useful for expanding the K-Graph (or any small component) into a focused view:
178
+ Useful for expanding any small component into a focused view:
257
179
 
258
180
  ```js
259
181
  function openOverlay(renderInto) {
@@ -272,27 +194,12 @@ function openOverlay(renderInto) {
272
194
 
273
195
  Always restore `body.overflow` on close, and always remove the `keydown` listener.
274
196
 
275
- ### Brain update card — preview/full toggle
276
-
277
- Show a truncated card that expands in place on click:
278
-
279
- ```js
280
- card.onclick = (event) => {
281
- // Link click guard — don't toggle when the user clicked a link inside the card.
282
- if (event.target.closest('a')) return;
283
- card.classList.toggle('expanded');
284
- card.querySelector('.body').innerHTML = card.classList.contains('expanded')
285
- ? marked.parse(resolveWikiImages(update.content))
286
- : escapeHtml(update.content.substring(0, 200));
287
- };
288
- ```
289
-
290
197
  ### Chat suggestion chips
291
198
 
292
199
  Empty chat looks dead. Show clickable prompt chips until the first message is sent:
293
200
 
294
201
  ```js
295
- const prompts = ['What is this brain about?', 'Summarize the latest update', 'What topics come up most?'];
202
+ const prompts = ['What is this vault about?', 'Summarize the latest notes', 'What topics come up most?'];
296
203
  chips.innerHTML = prompts.map(p => `<button class="chip">${escapeHtml(p)}</button>`).join('');
297
204
  chips.querySelectorAll('.chip').forEach((btn, i) => {
298
205
  btn.onclick = () => { input.value = prompts[i]; chips.remove(); input.focus(); };
@@ -317,7 +224,7 @@ Single breakpoint at `768px` is enough for most homepages:
317
224
 
318
225
  ```css
319
226
  @media (max-width: 768px) {
320
- .hero-grid, .updates-grid { grid-template-columns: 1fr; }
227
+ .hero-grid { grid-template-columns: 1fr; }
321
228
  .hero-content { flex-direction: column; }
322
229
  .btn { width: 100%; }
323
230
  }
@@ -336,9 +243,9 @@ Single breakpoint at `768px` is enough for most homepages:
336
243
  <style>
337
244
  * { box-sizing: border-box; margin: 0; padding: 0; }
338
245
  body { font-family: system-ui, sans-serif; max-width: 720px; margin: 0 auto; padding: 24px; }
339
- .update { margin-bottom: 32px; }
340
- .update h2 { margin-bottom: 8px; }
341
- .update img { border-radius: 8px; }
246
+ .hero { margin-bottom: 32px; }
247
+ .hero h1 { margin-bottom: 8px; }
248
+ .hero p { color: #555; }
342
249
  #chat { margin-top: 40px; border-top: 1px solid #ddd; padding-top: 24px; }
343
250
  .message { margin-bottom: 12px; padding: 8px 12px; border-radius: 8px; }
344
251
  .message[data-role="human"] { background: #e8f0fe; }
@@ -351,7 +258,10 @@ Single breakpoint at `768px` is enough for most homepages:
351
258
  </style>
352
259
  </head>
353
260
  <body>
354
- <div id="updates"></div>
261
+ <div class="hero">
262
+ <h1 id="title"></h1>
263
+ <p id="description"></p>
264
+ </div>
355
265
  <div id="chat">
356
266
  <div id="messages"></div>
357
267
  <div id="chat-input">
@@ -361,7 +271,9 @@ Single breakpoint at `768px` is enough for most homepages:
361
271
  </div>
362
272
 
363
273
  <script>
364
- document.title = gobi.vault.title || 'Brain';
274
+ document.title = gobi.vault.title || 'Vault';
275
+ document.getElementById('title').textContent = gobi.vault.title || '';
276
+ document.getElementById('description').textContent = gobi.vault.description || '';
365
277
 
366
278
  // ── Helpers ──────────────────────────────────────
367
279
 
@@ -389,23 +301,6 @@ Single breakpoint at `768px` is enough for most homepages:
389
301
  `https://gobispace.com/login?redirect_uri=${encodeURIComponent(window.location.href)}`;
390
302
  }
391
303
 
392
- // ── Brain updates ────────────────────────────────
393
-
394
- async function loadUpdates() {
395
- try {
396
- const { data: updates } = await gobi.listBrainUpdates({ limit: 5 });
397
- const el = document.getElementById('updates');
398
- for (const u of updates) {
399
- const div = document.createElement('div');
400
- div.className = 'update';
401
- div.innerHTML = `<h2>${escapeHtml(u.title)}</h2>${marked.parse(resolveWikiImages(u.content))}`;
402
- el.appendChild(div);
403
- }
404
- } catch (err) {
405
- console.error('Failed to load brain updates:', err);
406
- }
407
- }
408
-
409
304
  // ── Chat ─────────────────────────────────────────
410
305
 
411
306
  let sessionId = null;
@@ -466,7 +361,6 @@ Single breakpoint at `768px` is enough for most homepages:
466
361
 
467
362
  // ─────────────────────────────────────────────────
468
363
 
469
- loadUpdates();
470
364
  initChat();
471
365
  </script>
472
366
  </body>
@@ -1,19 +1,20 @@
1
1
  ---
2
2
  name: gobi-space
3
3
  description: >-
4
- Gobi space commands for community interaction: list/create/edit/delete
5
- threads and replies, browse topics and topic threads, explore what's
6
- happening in a space. Use when the user wants to read, write, or manage
7
- threads and replies in their Gobi community spaces.
4
+ Gobi space commands for community interaction: post threads and
5
+ replies, browse the unified message feed and topic feeds, walk reply
6
+ lineage, and post to the global (slugless) space. Use when the user
7
+ wants to read or write threads and replies in their Gobi community
8
+ spaces. Space and member administration is web-UI only.
8
9
  allowed-tools: Bash(gobi:*)
9
10
  metadata:
10
11
  author: gobi-ai
11
- version: "0.8.0"
12
+ version: "0.9.13"
12
13
  ---
13
14
 
14
15
  # gobi-space
15
16
 
16
- Gobi space commands for community interaction (v0.8.0).
17
+ Gobi space commands for community interaction (v0.9.13).
17
18
 
18
19
  Requires gobi-cli installed and authenticated. See gobi-core skill for setup.
19
20
 
@@ -40,19 +41,43 @@ For programmatic/agent usage, always pass `--json` as a **global** option (befor
40
41
  gobi --json space list-threads
41
42
  ```
42
43
 
44
+ > Space and member administration (creating spaces, inviting/approving members, joining/leaving) is web-UI only and not available in the CLI.
45
+
43
46
  ## Available Commands
44
47
 
48
+ ### Space details
49
+ - `gobi space get` — Get details for a space.
50
+
51
+ ### Topics
45
52
  - `gobi space list-topics` — List topics in a space, ordered by most recent content linkage.
46
53
  - `gobi space list-topic-threads` — List threads tagged with a topic in a space (cursor-paginated).
54
+
55
+ ### Feed & lineage
56
+ - `gobi space messages` — List the unified message feed (threads and replies, newest first).
57
+ - `gobi space ancestors` — Show the ancestor lineage of a thread or reply (root → immediate parent).
58
+
59
+ ### Threads
47
60
  - `gobi space get-thread` — Get a thread and its replies (paginated).
48
61
  - `gobi space list-threads` — List threads in a space (paginated).
49
62
  - `gobi space create-thread` — Create a thread in a space.
50
63
  - `gobi space edit-thread` — Edit a thread. You must be the author.
51
64
  - `gobi space delete-thread` — Delete a thread. You must be the author.
65
+
66
+ ### Replies
52
67
  - `gobi space create-reply` — Create a reply to a thread in a space.
53
68
  - `gobi space edit-reply` — Edit a reply. You must be the author.
54
69
  - `gobi space delete-reply` — Delete a reply. You must be the author.
55
70
 
71
+ ### Global thread space
72
+ The global thread space has no slug and is visible across all spaces.
73
+
74
+ - `gobi global messages` — List the global unified message feed (newest first).
75
+ - `gobi global get-thread` — Get a global thread and its direct replies.
76
+ - `gobi global ancestors` — Show the ancestor lineage of a global thread or reply.
77
+ - `gobi global create-thread` — Create a thread in the global space.
78
+ - `gobi global reply` — Reply to a thread in the global space.
79
+
56
80
  ## Reference Documentation
57
81
 
58
82
  - [gobi space](references/space.md)
83
+ - [gobi global](references/global.md)
@@ -0,0 +1,82 @@
1
+ # gobi global
2
+
3
+ ```
4
+ Usage: gobi global [options] [command]
5
+
6
+ Global thread commands. Global is the platform-wide thread feed visible to everyone on Gobi.
7
+
8
+ Options:
9
+ -h, --help display help for command
10
+
11
+ Commands:
12
+ messages [options] List the global unified message feed (threads and replies, newest first).
13
+ get-thread [options] <threadId> Get a global thread and its direct replies (paginated).
14
+ ancestors <threadId> Show the ancestor lineage of a global thread or reply (root → immediate parent).
15
+ create-thread [options] Create a global thread (visible platform-wide).
16
+ reply [options] <threadId> Reply to a global thread.
17
+ help [command] display help for command
18
+ ```
19
+
20
+ ## messages
21
+
22
+ ```
23
+ Usage: gobi global messages [options]
24
+
25
+ List the global unified message feed (threads and replies, newest first).
26
+
27
+ Options:
28
+ --limit <number> Items per page (default: "20")
29
+ --cursor <string> Pagination cursor from previous response
30
+ -h, --help display help for command
31
+ ```
32
+
33
+ ## get-thread
34
+
35
+ ```
36
+ Usage: gobi global get-thread [options] <threadId>
37
+
38
+ Get a global thread and its direct replies (paginated).
39
+
40
+ Options:
41
+ --limit <number> Replies per page (default: "20")
42
+ --cursor <string> Pagination cursor from previous response
43
+ -h, --help display help for command
44
+ ```
45
+
46
+ ## ancestors
47
+
48
+ ```
49
+ Usage: gobi global ancestors [options] <threadId>
50
+
51
+ Show the ancestor lineage of a global thread or reply (root → immediate parent).
52
+
53
+ Options:
54
+ -h, --help display help for command
55
+ ```
56
+
57
+ ## create-thread
58
+
59
+ ```
60
+ Usage: gobi global create-thread [options]
61
+
62
+ Create a global thread (visible platform-wide).
63
+
64
+ Options:
65
+ --title <title> Title of the thread
66
+ --content <content> Thread content (markdown supported, use "-" for stdin)
67
+ --rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
68
+ -h, --help display help for command
69
+ ```
70
+
71
+ ## reply
72
+
73
+ ```
74
+ Usage: gobi global reply [options] <threadId>
75
+
76
+ Reply to a global thread.
77
+
78
+ Options:
79
+ --content <content> Reply content (markdown supported, use "-" for stdin)
80
+ --rich-text <richText> Rich-text JSON array (mutually exclusive with --content)
81
+ -h, --help display help for command
82
+ ```
@@ -3,7 +3,7 @@
3
3
  ```
4
4
  Usage: gobi space [options] [command]
5
5
 
6
- Space commands (threads, replies).
6
+ Space commands. A Space is a shared room of members where they post threads and replies, organized by topics.
7
7
 
8
8
  Options:
9
9
  --space-slug <slug> Space slug (overrides .gobi/settings.yaml)
@@ -11,9 +11,12 @@ Options:
11
11
 
12
12
  Commands:
13
13
  list List spaces you are a member of.
14
+ get [spaceSlug] Get details for a space. Pass a slug or omit to use the current space (from .gobi/settings.yaml or --space-slug).
14
15
  warp [spaceSlug] Select the active space. Pass a slug to warp directly, or omit for interactive selection.
15
16
  list-topics [options] List topics in a space, ordered by most recent content linkage.
16
17
  list-topic-threads [options] <topicSlug> List threads tagged with a topic in a space (cursor-paginated).
18
+ messages [options] List the unified message feed (threads and replies, newest first) in a space.
19
+ ancestors <threadId> Show the ancestor lineage of a thread or reply (root → immediate parent).
17
20
  get-thread [options] <threadId> Get a thread and its replies (paginated).
18
21
  list-threads [options] List threads in a space (paginated).
19
22
  create-thread [options] Create a thread in a space.
@@ -25,6 +28,17 @@ Commands:
25
28
  help [command] display help for command
26
29
  ```
27
30
 
31
+ ## get
32
+
33
+ ```
34
+ Usage: gobi space get [options] [spaceSlug]
35
+
36
+ Get details for a space. Pass a slug or omit to use the current space (from .gobi/settings.yaml or --space-slug).
37
+
38
+ Options:
39
+ -h, --help display help for command
40
+ ```
41
+
28
42
  ## list-topics
29
43
 
30
44
  ```
@@ -50,6 +64,30 @@ Options:
50
64
  -h, --help display help for command
51
65
  ```
52
66
 
67
+ ## messages
68
+
69
+ ```
70
+ Usage: gobi space messages [options]
71
+
72
+ List the unified message feed (threads and replies, newest first) in a space.
73
+
74
+ Options:
75
+ --limit <number> Items per page (default: "20")
76
+ --cursor <string> Pagination cursor from previous response
77
+ -h, --help display help for command
78
+ ```
79
+
80
+ ## ancestors
81
+
82
+ ```
83
+ Usage: gobi space ancestors [options] <threadId>
84
+
85
+ Show the ancestor lineage of a thread or reply (root → immediate parent).
86
+
87
+ Options:
88
+ -h, --help display help for command
89
+ ```
90
+
53
91
  ## get-thread
54
92
 
55
93
  ```
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: gobi-vault
3
+ description: >-
4
+ Gobi vault commands for knowledge management: search public vaults by text
5
+ and semantic similarity, ask vaults questions, and publish/unpublish
6
+ PUBLISH.md. Use when the user wants to search knowledge, ask a vault, or
7
+ publish their vault document.
8
+ allowed-tools: Bash(gobi:*)
9
+ metadata:
10
+ author: gobi-ai
11
+ version: "1.1.0"
12
+ ---
13
+
14
+ # gobi-vault
15
+
16
+ Gobi vault commands for knowledge management (v1.1.0).
17
+
18
+ Requires gobi-cli installed and authenticated. See gobi-core skill for setup.
19
+
20
+ ## Gobi Vault — Knowledge Management
21
+
22
+ `gobi vault` commands manage your vault: search public vaults, ask them questions, and publish/unpublish your `PUBLISH.md`. Public vaults are accessible at `https://gobispace.com/@{vaultSlug}`.
23
+
24
+ > **Vault updates have moved to threads.** To post user-level content, use `gobi global create-thread` (platform-wide global) or `gobi space create-thread` (a specific space). See the **gobi-space** skill.
25
+
26
+ ## Important: JSON Mode
27
+
28
+ For programmatic/agent usage, always pass `--json` as a **global** option (before the subcommand):
29
+
30
+ ```bash
31
+ gobi --json vault search --query "machine learning"
32
+ ```
33
+
34
+ ## Available Commands
35
+
36
+ - `gobi vault search` — Search public vaults by text and semantic similarity.
37
+ - `gobi vault ask` — Ask a vault a question. Creates a targeted session (1:1 conversation).
38
+ - `gobi vault publish` — Upload PUBLISH.md to the vault root on webdrive. Triggers post-processing (vault sync, metadata update, Discord notification).
39
+ - `gobi vault unpublish` — Delete PUBLISH.md from the vault on webdrive.
40
+
41
+ ## PUBLISH.md Frontmatter Reference
42
+
43
+ `PUBLISH.md` is the metadata file at the root of every vault. Its YAML frontmatter controls the vault's public profile, homepage, and AI agent behavior. Example:
44
+
45
+ ```yaml
46
+ ---
47
+ title: My Vault
48
+ tags:
49
+ - topic1
50
+ - topic2
51
+ description: A short description of what this vault is about.
52
+ thumbnail: "[[VAULT.png]]"
53
+ homepage: "[[app/home.html?nav=false]]"
54
+ prompt: "[[system-prompt.md]]"
55
+ ---
56
+ ```
57
+
58
+ ### Fields
59
+
60
+ - **`title`** (required) — Display name of the vault.
61
+ - **`description`** (required for public listing) — Short description shown on the vault card and public profile. Without both `title` and `description`, the vault won't appear in the public catalog.
62
+ - **`tags`** — Tags for categorization and discovery. Supports YAML block list or inline array format:
63
+ ```yaml
64
+ # Block list
65
+ tags:
66
+ - ambient ai
67
+ - wearables
68
+
69
+ # Inline array
70
+ tags: [ambient ai, wearables]
71
+ ```
72
+ - **`thumbnail`** — Profile image for the vault card. Uses wiki-link syntax pointing to an image file in the vault (e.g. `"[[VAULT.png]]"`).
73
+ - **`homepage`** — Custom HTML page to serve as the vault's public homepage at `gobispace.com/@{vaultSlug}`. Uses wiki-link syntax pointing to an HTML file in the vault. Supports a `nav` query parameter to control Gobi's sidebar navigation:
74
+ - `"[[app/home.html]]"` — Shows the Gobi sidebar alongside the homepage (default)
75
+ - `"[[app/home.html?nav=false]]"` — Full-screen, no Gobi sidebar/chrome
76
+ - **`prompt`** — Wiki-link to a custom system prompt file for the vault's AI agent (e.g. `"[[system-prompt.md]]"`).
77
+
78
+ > For details on building custom HTML homepages and using the `window.gobi` API, see the **gobi-homepage** skill.
79
+
80
+ ## Publishing Workflow
81
+
82
+ After editing `PUBLISH.md` frontmatter, follow these steps to make your changes live:
83
+
84
+ 1. **Edit `PUBLISH.md`** in the vault root with the desired frontmatter fields.
85
+ 2. **Sync referenced files** — if the homepage HTML, thumbnail image, or prompt file is new or updated, upload them first:
86
+ ```bash
87
+ gobi sync
88
+ ```
89
+ 3. **Publish the vault**:
90
+ ```bash
91
+ gobi vault publish
92
+ ```
93
+ This uploads `PUBLISH.md` to webdrive, triggers post-processing that extracts metadata (title, description, tags, thumbnail, homepage path), updates the vault's public profile, and sends a Discord notification.
94
+ 4. The vault is now live at `https://gobispace.com/@{vaultSlug}`.
95
+
96
+ > **Important:** Any time you change `PUBLISH.md` frontmatter (e.g. adding or updating `homepage`), you must re-run `gobi vault publish` for the changes to take effect.
97
+
98
+ ## Reference Documentation
99
+
100
+ - [gobi vault](references/vault.md)